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.
Related
I built a flutter app and am struggling to upload ipa file for testflight now. I built ipa file with following steps:
$ flutter build ios -t lib/main_stg.dart
Get Runner.app from step 1
Create ProjectName folder and put the app file in it
Zip ProjectName folder and rename it ProjectName.ipa
$ xcrun altool --upload-app -f ProjectName.ipa -t ios -u username -p pass
Then got the error after step 5.
*** Error: Error uploading 'ProjectName.ipa'.
*** Error: ERROR ITMS-90174: "Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision." (-18000)
I saw below page and changed "New build system" to "Legacy Build System" at Build System, but am still getting the same error:
Missing Provisioning Profile :Apps must contain a provisioning profile in a file named embedded.mobileprovision
I checked the contents of Runner.app generated at step 2 and found "embedded.mobileprovision" there. However not sure where to check for provisioning profile and how to add it if its missing.
I'm using MacOS Big sur, xcode 12.5.1, flutter 2.3.0-17.0.
You can check the Provisioning profile in Xcode like image below
I'm using Fastlane which will handle sharing provisioning profiles to your team but anyways You can go check in Xcode to see if you download and install provisioning profile correctly. If it's correct it shouldn't show any warning or errors
After reading Einzeln's answer, I checked xcode settings.
Firstly, I unticked "Automatically manage signing" and noticed similar error message "Provisioning profile xxx doesn't include signing certiicate" at "Signing Certificate" part.
I added "Apple Distribution" in Xcode->Preferences->Manage Certificates. Then added profile with "Apple Distribution" in Apple Developer Portal. At this stage (or rebooted mac was necessary?) error message was gone on xcode.
I still got the same error with xcrun command somehow. However, building from xcode GUI worked this time(It didn't work before so I decided to use command. probably because Provisioning Profile wasn't set). Then build the app->distribute done successfully.
Building an Ionic app to try and test on my iPhone. I downloaded XCode last night and went in and created a profile with my Apple ID, as well as changing the bundle identified in the "General" and "Signing & Capabilities" tab. However when I run "ionic cordova build ios --prod" I get the error:
error: No profiles for 'io.ionic.starter' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'io.ionic.starter'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'MyApp' from project 'MyApp')
** ARCHIVE FAILED **
xcodebuild: Command failed with exit code 65
[ERROR] An error occurred while running subprocess cordova.
cordova build ios exited with exit code 65.
Re-running this command with the --verbose flag may provide more information.
It seems to me as though I have done the necessary code signing procedures that I read from Ionic's website, so I am unsure why it still isn't working.
To run the app in your iPhone there are several steps, check these:
You have created your app ID in the website.
You have created your provisioning profile in the website, and downloaded to your computer and added to your Mac (web -> download profile -> double-click)
You have created a development certificate (search how to create a certificate using a Certificate Signing Request generated in your Mac ) and then downloaded that certificate and added to your Mac.
There are two certificates. Distribution certificate is used to publish the app, but development certificate is used simply to run the project in your iPhone, you need that.
But honestly, it's all much easier if you use XCode instead of the console. In the console run the command without --prod, to apply ionic changes to the iOS project. Then if you want to run the app, it's easier if you open XCode and just click play.
With XCode there's the option "Automatically manage signing" that will handle most of this for you automatically. You just have to login to your account using XCode (it will prompt you) and let it do it for you.
I want to publish an update of my NativeScript app into AppStore. Until yesterday the following steps worked:
move into app directory (from Terminal)
execute tns publish ios
enter valid e-mail & password combination
Now I need to do another update, but I keep getting the following error:
=== BUILD TARGET HandyApp OF PROJECT HandyApp WITH CONFIGURATION Release ===
Check dependencies
Code Sign error: No matching provisioning profiles found: No provisioning profiles matching an applicable signing identity were found.
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Command xcodebuild failed with exit code 65
# publish ios
I am working under Xcode 7.3. I checked my iPhone Developer certificate in Xcode and in my keychain, it is active and not expired. The Provisioning Profile is shown in Xcode. I ensured to use the certificate that is saved in apple.developer.com (by downloading it and replacing the old one in that directory).
I got:
my .mobileprovision
my .cer
my .p12
everything in the same directory.
Still there seems something not to be matching. I just can't figure out what might be running wrong. Does anyone know what else I could try to get it working?
I'm starting to have an issue with fastlane. When I run a custom lane that runs pilot the app starts to compile but eventually terminates with an error. In the fastlane log I have:
Provisioning profile "match AppStore com.mycompany.myapp-test" doesn't include signing certificate "iPhone Developer: Bob Trotter (XXXXXXXXX)".
Code signing is required for product type 'Application' in SDK 'iOS 10.0'.
I have logged into the apple developer website. Gone into the provisioning profile and added myself. I have tried doing a project clean and downloading the certificates in xocode. I have also run fastlane certs. Any idea what I am doing wrong here? Any pointers on this would be great!!
It seems that you are trying to use pilot with a developer certificate.
As pilot is used to submit your app to TestFlight and subsequently to ApStore, it seems consistent that the error message saying match AppStore ... for the provisioning profile and iPhone Developer: ... for the certificate would generate errors.
It looks like you are setting the correct provisioning profile but not the correct certificate to match. You can check that on XCode by going to you project target -> Build settings -> Code Signing Identity (Release) and selecting iPhone Distribution
If you are using cert you might as well create Distribution certificates, which your App Store provisioning should be matching.
Alternatively (and personally my option of choice today) you can use match to create you provisioning profiles for both development and distribution, which will also configure your sigh environment variables to be used by XCode.
Based on your example bundle identifier, you could do this by executing the following command(s)
$ sudo gem install match
$ match appstore -a com.mycompany.myapp-test
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.