Sign cordova ios app - provisioning profile error - ios

I'm trying to build and sign a cordova ios app without success.
I created a certificate, App ID and Provisioning profile (for distribution) in Apple Developer Portal.
Then I try to run:
cordova build ios --release --codeSignIdentity="XXX" --provisioningProfile="YYY"
But it says:
"no matching provisioning profiles found"
I've tried with both setting the path and UUID for the --provisioningProfile flag.
Very thankful for any kind of help!

Related

Command xcodebuild failed with exit code 70 - Nativescript

I'm using Nativescript (using VScode) and trying to upload my app in App Store Connect following steps from official {N} documentation. When I'm done with all steps: set Bundle ID, edit Info.plist and build.xcconfig, create distribution certificate, app identifier, provisioning distribution profile. I run the following command in VS code:
tns publish iOS *My_Apple_ID* *My_Apple_Password* *Provisioning_Profile_UUID* iPhone Distribution --appleApplicationSpecificPassword *password_for_two_factor_auth*
and then I get this error:
Error Domain=IDEProvisioningErrorDomain Code=9 ""nsvue.app" requires a
provisioning profile." UserInfo={IDEDistributionIssueSeverity=3,
NSLocalizedDescription="nsvue.app" requires a provisioning profile.,
NSLocalizedRecoverySuggestion=Add a profile to the
"provisioningProfiles" dictionary in your Export Options property
list.}
** EXPORT FAILED **
Command xcodebuild failed with exit code 70
My question is:
What I'm doing wrong? How to make it work?
Here's in detail what I had done so far:
Certificates, Identifiers & Profiles
Distribution certificate generated by Xcode
Registered App Identifier (BundleID) is "com.nativescript.nsvue" (my app's name is "nsvue" and I had tried BundleId to be same as the app name, but without success same error again)
Provisioning profile (where the REAL problem is) name of the provisioning profile with App ID - "My_Development_Team.com.nativescript.nsvue". Then I dowloaded it and installed it on my Mac.
App Store Connect
Create app with same BundleId as my app's and prepare it for submission now only I need to upload my app in App Store Connect
Package.json, Info.plist and build.xcconfig
Thats how my Info.plist looks like. And that's build.xcconfig. Id of my app in package.json is "com.nativescript.nsvue" too.
There is a related issue in the NativeScript GitHub Issues: https://github.com/NativeScript/nativescript-cli/issues/3222
While I'm not 100% sure why this problem exists, I have found that you can work around the problem by explicitly passing your provisioning profile uuid on the command line with the --provision flag, like this:
tns appstore upload *My_Apple_ID* *My_Apple_Password* --appleApplicationSpecificPassword *password_for_two_factor_auth* --provision *Provisioning_Profile_UUID*
Note: I think tns publish has been replaced with tns appstore upload...but under the covers, I think they're the same command...FWIW
Hope this helps as a work around for others that find this thread.

Ionic Pro- iOS Build Code signing

I have this problem, when build the code in Ionic pro xcode 9 fails and show the next message:
▸ Automatic signing is unable to resolve an issue with the "..." target's entitlements file. Remove the entitlements or switch to manual signing and resolve the issue by downloading a provisioning profile from the developer website.
▸ Provisioning profile "..." doesn't include the aps-environment entitlement.
▸ Code signing is required for product type 'Application' in SDK 'iOS 10.3'
The code has the correct certificate also i changed xcode9 to xcode8, reinstalled plugins and check one per one but the error continues.
iOS have new version of sdk so generate one new Provisioning Profile and update the app in IONIC.
Apple now requires an explicit app id instead of a wildcard. You'll need to generate a new provisioning profile directly in your apple developer account using the full bundle id. Here's what I see in your the build logs for an xcode9 build.

No installed provisioning profiles match the installed iOS signing identities

I am attempting to launch my test app to a real iOS device through iOS xamarin. However, upon building or deploying, the error notes:
No installed provisioning profiles match the installed iOS signing identities
I have followed every step concerning creating certificates for the app, partitioning devices, creating an apple developer account and linking to Xcode, yet this error persists...
update:
I revoked the certificate an recreated the provisioning file, now downloaded through Xcode. However, Xamarin can now build, but not deploy out to my iPhone as there is no Run option:
How can this be alleviated?

"ionic run ios" How to add provisioning profiles

I wish to use Ionic to run my app on my iOs device with livereload enabled. According to the docs this should be easy:
ionic run ios --device -l
Of course I have to add provisioning profiles, but how am I supposed to do it?
I have the .mobileprovision and the .p12 of the certificate, but no matter what I do I still get this error when running the command:
No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier “<MyBundleID>” were found
How am I supposed to add my provisioning profiles? I'm not able to find any info about this in the framework docs.
Note: I can reploy the project using Xcode, but then I don't get the livereload. Plus I'd prefer doing everything from the CLI.
You need to go into XCode and add those provisioning profiles to your device.
Set those provisioning profiles into the build process and add the profile to the device as well.
Though you may not be using Visual Studio, their explanation on the setup works for all methods of building Ionic apps.
The documentation is here, but to tell you what's going on:
Make sure you have a developer account to make provisioning profiles.
You would sign into Itunes Connect to add your device as a testing device
Create an App ID
Create a provisioning profile associated to that App ID
Download the provisioning file into Xcode
Add the provisioning file to your device via Xcode
Run ionic run ios --device -l
That should do the trick.
Follow the setup guide by Microsoft starting at create your provisioning profile.

Problems with installing AppStore distribution build on device with AdHoc profile

I have problem with installing Appstore distribution build/release into my iphone.
After reading the post Testing App Store "Distribution" version and How to test the final distribution build before submitting it for review to the iPhone app store?
I know that it is possible to install Appstore distribution build into iphone/device after installing AdHoc provisioning profile (see the posts I read). However, I couldn't do it and i dont know why.
Here is a list of what I have done:
Created AppID from developer portal.
Added the device.
Created certificate.
Created Adhoc provisioning profile with the device.
Created AppStore provisioning profile with the same certificate.
Installed both profiles and certificate into build machine.
Build the AdHoc release.
Installed the Adhoc profile to device.
Test the Adhoc build. The app works on device.
Remove the app from device.
Build the AppStore release with AppStore profile.
Install the app to device and error.
Error message: "Unable to Download Application".
If I drag and drop it from xcode, it will give me the following errors: The executable was signed with invalid entitlements.
The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.
0xE8008016
Any idea how i can resolve it?
Thank you. B.
If you created build with distribution certificate ( AppStore release ) then you can not install it on device from any tools. You should upload this build to appstore and install if from appstore( after it approved from apple)

Resources