ERROR ITMS-90174: "Missing Provisioning Profile - iOS Apps must contain a provisioning profile in a file named embedded.mobileprovision." - ios

When I upload to Application Loader I receive the following message:
ERROR ITMS-90174: "Missing Provisioning Profile - iOS Apps must contain a provisioning profile in a file named embedded.mobileprovision."
I have this contained in my app folder. When I compress no matter how obvious I make the provisioning profile, I receive this error trying to upload my app for Apple.

If you are using Ionic / Cordova like I am see this announcement...
https://github.com/apache/cordova-ios/issues/407
It's just one setting, then re-run your Archive to Submit to the Apple Store like normal.
Go to "File" > "Project Settings..."
then select "Legacy Build System"

To upload a archive to AppStoreConnect I had to change the default build system in xcode10 within "File > Project / Workspace Settings" and change it to the Legacy Build system.
This worked for me

Access https://developer.apple.com/account
1 - Certificates, IDs & Profiles
2 - Provisioning Profiles
3 - Distribution
4 - Add Button
5 - Distribution -> App Store -> Continue
6 - Choose Apple Id -> Continue
7 - Select certificates -> Continue
8 - Set Profile Name -> Continue
9 - Download
10 - In Xcode -> Product -> Archive, In Re-sign "App Name" make option Manually manage signing -> choose the Distribution certificate and import your provisioning profile downloaded on step 9.
Sorry for my English, I'm from Brazil

If you submit your build to the AppStore in an IPA archive format (example: Game.ipa), make sure that the Payload folder is at the root of the archive, otherwise you'll get the error: Missing Provisioning Profile - - Apps must contain a provisioning profile in a file named embedded.mobileprovision.

in .plist add
Application requires iPhone environment , Yes !
I tested this , really worked !

I've faced same problem and solved by following below points.
For our clarification, please re-download your distribution provisional profile.
Please make sure you are generating ipa by setting "Generic iOS Device" in xcode.
Clean and build your project.
Place your product file in "Payload" folder and compress this folder and change .zip to .ipa
Now upload your ipa. It worked for me.
Hope this helps.

For those that are using the command line to build, and were using the flag (UseModernBuildSystem=0) to avoid this problem, seems that since the release of package cordova-ios 5.0.0, it's no longer needed. So if you update your Ionic / Cordova App dependency, will work normally.

I can confirm your solution works. To summarize the hacks so far:
1. While building, we need to do (if using ionic) ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
2. When you open it in Xcode, you can continue using "Automatic Sign" for the project, but when you upload the archive to App Store (for TestFlight or App Store) , you need to select "manually manage signing". When you select manual signing you will see there is no associated provisioning profile (huh...) so select one, and the right distribution profile.
I've managed to upload and distribute successfullly.

To locate the embedded provisioning profile in the app binary:
In Xcode, select your project in the project navigator.
Click the disclosure triangle next to the project to reveal the contents.
Click the disclosure triangle next to Products to reveal the binary.
Control-click the binary file, and choose “Show in Finder” from the shortcut menu to go to the Xcode build location in the Finder.
In the Finder, Control-click the binary file, and choose Show Package Contents from the shortcut menu.
For iOS apps, a provisioning profile called embedded.mobileprovision appears in the Finder window.
For Mac apps, the embedded file is called embedded.provisionprofile.
To verify the entitlements of the embedded provisioning profile
Launch Terminal (located in /Applications/Utilities), and enter this text (do not press Return):
security cms -D -i
In the Finder, drag the provisioning profile in the app binary to Terminal.
Press Return.
This command outputs a property list in XML format.
If you don't have an embedded.mobileprovision file, that seems to be the problem and you probably did not build the app properly for app store distribution.

I redid the 'Upload to App XStore..." and it worked the second time.

Related

Missing Provisioning Profile :Apps must contain a provisioning profile in a file named embedded.mobileprovision

App is already submitted to App Store from xcode-9 and now I have to update new version.But now xcode is updated i.e.xcode 10.During Validating it shows
'Apps must contain a provisioning profile in a file named embedded.mobileprovision..' .App is working fine on simulator
Even I have downloaded provisioning certificated.
I tried to clear out the provisioning profiles and none of it did help. What changed from the previous XCode version to this one is the build system. By changing your build system back to the legacy one, this was resolved for me.
You can switch out the build system under file > workspace settings (or project settings) and then select Legacy Build System under Build System (see screenshot).
Edit: As of cordovo iOS 5.0.0 the new build system is now supported. Changelog can be found over here: https://cordova.apache.org/announcements/2019/02/09/cordova-ios-release-5.0.0.html
If running/building from the CLI, use this command to use the legacy build system instead of the new one
cordova build ios --buildFlag="-UseModernBuildSystem=0"
You can also create a new build.json file at the root of your cordova project, if you don't already have one, and add the following json data. This basically tell the build process for "ios" to use the legacy build system. It will automatically add the build flags in the build.json file to your build command e.g. cordova build ios --prod will also run as though it was typed as cordova build ios --prod --buildFlag="-UseModernBuildSystem=0".
{
"ios": {
"debug": {
"buildFlag": [
"-UseModernBuildSystem=0"
]
},
"release": {
"buildFlag": [
"-UseModernBuildSystem=0"
]
}
}
}
Clean your build (Cmd + Shift + K). Quit XCode (don't just close the project, make sure XCode has completely quit).
Delete everything in the ~/Library/MobileDevice/Provisioning Profiles folder.
Re-start XCode and load your project.
If you have XCode set to Automatically Manage Signing, you should be able to select your team and then it should re-download your provisioning profiles for you. If you don't, you'll have to manually download them from your Apple Developer account and then select "import" from the Debug signing dropdown and the Distribution signing dropdown.
If you then try to run the app on a device and you get a "Valid Provisioning Profile cannot be found for this executable" you need to go to Window | Devices & Simulators. Find your device on the left side of the window, ctrl+click on it, select "See Provisioning Profiles". Click on each individual profile and click the minus sign at the bottom. When the list is empty, click on the plus sign to add a new one, then find the profiles you downloaded and import each of them, one at a time to that list.
That should hopefully fix any provisioning profile issues that XCode is giving you.
Good luck!
If you have the above problem and it is being solved by switching to legacy build system. The alternative with new (default) build system is to to manual signing.
When uploading or validating your archive pick 'manual' option and select your Team and download the provisioning profile. (Or import after a download from the developer portal).
I created a new provisioning profile and selected "Manually Manage Signing" and selected the profile I had manually created.
It then complained about missing a 1024x1024 icon which I fixed with this answer: Missing App Store Icon. iOS Apps must include a 1024x1024px App Store > Icon in PNG format

IPA file extraction

How to extract IPA file from project to run it on a real device to check the functionalities .I'm extracting it through the product folder and compressing it but it is showing error in iPhone that this file can't run.
To test an app on real device ,you must have development and adhoc provisioning profile for the app.
To know how to create certificates and provisioning profile, you can check this link: App id, certificates and provisioning profile
Then set the provisioning profile to your app target. If everything is right so far, then create an archive by Choosing Product -> Archive in Xcode and follow the steps. When Organizer window open in this process, tap on Export, appears on the right side of the window to extract the IPA file.
To test your app on real device you need a developer account,once you got a developer account just go to general on project target and enable automatic signing,it will create automatic provisional profile and certificate for you.i will let you know the steps below.
1)Get developer account with 99 dollars per annum.
2)Import your developer account by selecting Xcode->Preferences->Accounts and add your account by entering account name and password.
3)Now goto general and enable automatic signing,it will register your device and create provisional profile with certificate automatically.
4)Clean build and run your project with your device by connecting to Xcode.
Enjoy.....
You need to reverse work .
1 . You need to change .ipa extension to .zip
2 . Now you can watch .app file now drag this file to your device from Windows > Device
Another way for creating of ipa
If you want to work this ipa file then you need to create ipa as below:
Add necessary profiles and adjust build settings.
Set device as target to run the application.
Build the product.
Go to Products->yourAppName.app. Right click and show in finder.
Drag & drop to itunes profile and binary file.
Select app in iTunes and right click to show in Finder. And there you can get the .ipa file.

Watchkit Extension - No matching provisioning profiles found

I have created an iPhone app that also includes a WatchKit extension, I can run this fine in the simulator but when trying to deploy to an iPhone I get a provisioning issue for the WatchKit Extention target:
"The provisioning profile specified in your build settings (“XXXX”) has an AppID of “XXXX” which does not match your bundle identifier “XXXX.watchkitextension”. Xcode can resolve this issue by downloading a new provisioning profile from the Member Center."
Xcode automatically created the WatchKit targets with the suffix .watchkitextension and .watchkitapp but this seems to cause the issues when using a provisioning profile and deploying to an iPhone.
If I remove the watchkit targets it runs fine, but this is obviously not a solution.
Thanks for your help
You need to create two new AppIDs in the Developer Portal with the correct bundle identifier for your Watchkit app and Watchkit extension. The bundle identifier has to extend the main apps identifier, so if your app is com.myapp it should be com.myapp.watchkitextension and com.myapp.watchkitapp
You also need to create the related Provisioning Profiles for the AppIDs, one for the extension and one for the app.
Add required add ons (like Keychain) if you are using them in your Watch app.
All in all you will need six PPs, 3 for development, 3 for archiving/store. With Xcode 6.3 team provisioning for development stopped working (for me)
Next goto Xcode > Preferences > Accounts > YOUR_ACCOUNT > View Details ..., CTRL+Click one of the Profiles and open in Finder. Move all Profiles to Trash, then refresh the Profiles.
In your targets make sure you have the correct Team set for your main App target, the Watchkit extension target and the Watchkit App target, also make sure you have the right Provisioning Profiles assigned to main App target and the Watchkit extension target (Watchkit app Provisioning Profile can not be set but will be assigned automatically Edit: With Xcode 6.3 it can has to be set).
To be sure all is fine clean build folder: In Xcode hold command and do Product > Clean build folders ...
Now you are ready to archive.
Im my case I've clean all my provisioning profile as suggested by other users, then I had to delete "code signing entitlements" from "Build Settings" in both App parent and extention target and after rebuild and archive, all work fine.
I made 3 App IDs (for container app, watchkit extension, and watchkit app) belong with 3 provisioning profiles. (I was going to use AppGroup, so my app cannot share single App ID.)
Setting 2 provisioning profiles for container app and watchkit extension, the archive of the my app could not pass the Xcode's validation process.
In my case, the critical point is to set the provisioning profile of the WATCHKIT APP. Setting it, it pass the validation process, and succeed to submit the app.
My procedure of the setting is the following:
In Xcode, open "TARGET" of WatchKit App.
Select the "Build Settings" tab.
In the next line of the tab, choose "All" not "Basic."
The you can find "Provisioning Profile" line in "Code Signing" section.
Set the appropriate provisioning profile of yours.
For a while, I have believed 3rd party app developer cannot set provisioning profiles of WatchKit Apps in Xcode.
Noticing that we can set it, the answer is now clear...
I followed the Technical Q&A QA1814 and that solved it all for me. Basically you set everything to Automatic and iOS Developer. Very important to set the Team: None first, do the changes and then change back to your Team, then restart Xcode.
My situation was that I already had the provisioning profiles and certificates set up for a "normal" iOS app. I had successfully published apps with that. Now I needed to get it to work after I added a new WatchKit target to my existing app. I got many error like "No matching provisioning profiles" etc. After many hours of trouble I followed the routes in the QA1814 article and voila! - Xcode solved everything for me. Didn't need to change/resolve/update anything in Member Center etc.
Also important to use the Bundle ID's correctly. The WatchKit app and WatchKit Extension must use the same bundle ID prefix as the iOS App target.
If the iOS app has bundle ID: [Bundle ID], the WatchKit targets needs to be:
WatchKit App: [Bundle ID].watchkit
WatchKit Extension: [Bundle ID].watchkit.extension
usually when you get that error its because your bundle id doesn't match the app id that is on the provision.
In the case of the watch extension, you need to add the application service App Group to your app id identifier that is associated with your provision, on the developer.apple.com portal if you are sharing data or files between the extension and your app
https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/DesigningaWatchKitApp.html
In my case problem was different than others. I try everything but didn't solve my problem.
Let me explain my situation before explain how I solve it.
First it starts with adding Today Extension to my project. I created different bundle ID for my App Extension. For example if my application's bundle ID com.company.appname, I created for my Extension something like this "com.company.appname.TodayExtension". I'm using XCode Version 6.3.2 (6D2105), and XCode automatically (The provisioning profile specified in your build settings (“AppName”) has an AppID of “BundleID” which does not match your bundle identifier “BundleID2”. Xcode can resolve this issue by downloading a new provisioning profile from the Member Center...Of course I click the 'Fix Issue' button) create an provision profile for Today Extension.
And just after that I added "app group" to my application and go on coding for a while. But when I try to send my application to the AppStore (Product/Archive/Submit to AppStore), I get this error that says "None of the valid provisioning profiles allowed the specified entitlements: beta-reports-active, com.apple.security.application-groups".
You must know that "app group" could be the key point for you too...
Please go to member center/Certificates, Identifiers & Profiles/Provisioning Profiles/Distribution section. Find your application's Distribution profile and select it. As you can see that status for your profile is "Invalid (like in my case). Then here's the solution, click Edit button, after that Generate button. Now please repeat this action for all "Invalid" profiles. After all your profiles are re validated, now you can go back to your XCode project and update local provisions in your Mac. Go to : Xcode > Preferences > Accounts > YOUR_ACCOUNT > View Details ..., CTRL+Click one of the Profiles and open in Finder. Move all Profiles to Trash, then refresh the Profiles".
Now Product/Clean and (hopefully for the last time) Product/Archive and Submit to AppStore.
Generally speaking, it's happen because you add app group to your application, but you didn't validate all of your profiles after that.
Maybe this will helps someone.
When you are in the Xcode update Your certificate and compile Your program again, real machine commissioning will be "Your build Settings specify a provisioning profile have the UUID 'XXX', clear, no to provisioning profile was found. The Xcode can resolve this issue by downloading a new provisioning profile from the Member Center.".
Close the project, find project file XXXX. Xcodeproj, right-click on the file, select "Show Package Contents" (Show Package Contents).Will open a new Finder.
Find the project in the newly opened Finder. Pbxproj, and open, find the UUID you all contain an error 'XXX' line, delete.
Save, restart the project, then build, with respect to OK.

Xcode 6.0/6.1 and building with client's provisioning profile

I downloaded the latest Xcode 6.1 and with having my client's provisioning profile/certificate, I tried to build IPA file for them (for ad-hoc deployment) but in the new Xcode 6.1 when you start archiving, it tries to connect to my apple developer account and since my client's App Id doesn't exist, it says:
Xcode attempted to locate or generate matching signing assets and failed to do so because of the following issues: An App ID with identifier 'com.myclient.something' is not available. Please enter a different string.
I used to do the same thing in Xcode 5.1.1 and I could archive and create the IPA file for my client with their provisioning profile. DO you know guys how can I build the IPA file for their in-house distribution in Xcode 6.1?
Thanks in advance,
Cam
Locate your .xcarchive file. Right click on it and select Show Package Contents. In the Products/Application folder you will find your app. Drag it onto the iTunes. iTunes will add it to the Applications tab. Go to the Applications tab in iTunes. Right click on your app and select Show In Finder. There you have your .ipa file

TestFlight beta-testing iOS app

I completed to develop my first app. Right now i want to distribute my beta throught https://testflightapp.com
I tried to create .ipa file with this tutorial - http://help.testflightapp.com/customer/portal/articles/402782-how-to-create-an-ipa-xcode-4
In the very beginning i should select Entitlements, but there is not such category as Code Signing..
Any helps? Thnx.
PS I have a developer account.
UPD. Does somebody create ipa files for TestFlight on XCode 4.3? How do you do that?
I skipped entitlements altogether. With Xcode 4.2 and later I have not needed them.
Make sure your Archive Scheme uses your Debug configuration. Then just do an Archive of the project (under the Product menu). Save the Archive someplace. Then drag that Archive file onto the TestFlightApp's green "Upload Build" button. That easy. No messing around with entitlements, etc.
Before you do this, make sure you can actually build a correctly formed archive by building, and e-mailing it to one of your testers and see if it can be loaded. There are a bunch of things that have to work before you can use TestFlightApp. Just because you can Build and Run from Xcode doesn't mean that it will work on a remote device that doesn't already have your provisioning file. For example, you have to have your App ID, provisioning profiles and Device ID's all configured correctly via the Provisioning Portal. Once I did that, and verified that my .ipa files can be installed manually, then just uploading to TestFlightApp.com worked without having to do entitlements.
I wrote this up and put it on TestFlightApp's support forum, but for some reason TestFlightApp.com won't let me into the support area so I can find it - I can't use my login to access their "Tender" account.
That's because that tuturial was done for another version of Xcode.
Just create a new property list file (Entitlements.plist) in your Xcode project and it let you edit it as a Entitlements file just fine.
The What's New in Xcode (pdf) documentation states that:
The iOS platform has supported entitlements for a while, and with Lion, Mac OS X does as well. With Xcode 4.1, the project editor provides a UI for setting up entitlements for Mac OS X applications. You can set entitlements for each target in the project editor. There is also a default code-signing entitlements file available in the file templates in the utilities pane.
In the Summary tab of your project editor is a section titled Entitlements. Check the "Enable Entitlements" box to have Xcode automatically create an Entitlements plist for you. This section also governs the entitlements' interaction with iCloud and Keychain.

Resources