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

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

Related

Automatic signing is unable to resolve an issue with the "myProject" target's entitlements [duplicate]

This post relates to a rapidly changing event.
I've tried all the other questions and searched everything on this that I could already, a lot of the other questions involved existing apps that were being updated or people with developer accounts but this is like my second time using Xcode and it has worked before.
This just happened out of nowhere. I keep getting these two errors and it allows me to run simulators but not build onto my iPhone:
Automatic signing is unable to resolve an issue with the "LearningSpriteKit" target's entitlements.
Automatic signing can't add the application-identifier and keychain-access-groups entitlements to your provisioning profile. Switch to manual signing and resolve the issue by downloading a matching provisioning profile from the developer website. Alternatively, to continue using automatic signing, remove these entitlements from your entitlements file and their associated functionality from your code.
Provisioning profile "iOS Team Provisioning Profile: #####.LearningSpriteKit" doesn't include the application-identifier and keychain-access-groups entitlements.
This issue is related to Bug 1534145. SSL.com: P-384 curve / ecdsa-with-SHA256 certificates.
A representative from Apple estimated 558,000 certificates to become invalidated: Bug 1533655. DigiCert: Apple: Non-compliant Serial Numbers
GoDaddy, Google, Apple and Facebook (that would explain why Facebook was glitchy today) are affected.
They are working on resolving the issue right now.
That would explain our problems, folks!
Update: The issue has been resolved. Try to refresh your projects.
Workaround: change Bundle Identifier and/or Version.
I restored a profile from Time Machine when this was working and upon launch, Xcode immediately deletes and replaces it with a new one. The key difference seems to be the old profile has the get-task-allow entitlement while the new one has NO entitlements. This is definitely broken at Apple's end.
Edit: The entitlements should also include a keychain access group, but again, no entitlements at all. Should look like:
It seems Apple broke the automatic signing system.
I was playing around with a few projects and Xcode just fetches the incorrect profile.
This worked for me:
Turn off "Automatically manage signing" in project target
Go to ~/Library⁩/⁨MobileDevice⁩/⁨Provisioning Profiles⁩
Remove previously downloaded profiles
Turn on "Automatically manage signing" again
EDIT
As per latest update Apple successfully resolved Automatically Code
Sign with Free Account issue.
I tried it and I can confirm its resolved.
Please try at your end.
Update
Tested with Latest XCode 10.2 and it's working fine + they improved
performance of overall Xcode & codesign feature.
I am also facing the same issue while I am creating a new Profile from Xcode and if I go to other projects and check over there also I am facing the same issue as below.
Due to this issue, none of my projects can build with the old profile and certificate.
The strange issue, so I checked a newly created Profile and compared with the old one, and I found that App ID is unknown as well as there were no Entitlement details in the newly created profile.
Check the below screenshots of the old and new profile comparison:
Old Profile:
New Profile:
So it means it's not able to set App Id and Entitlements in the new profile. So the end result does not work all old profiles and giving the same error in all projects.
Issue Workaround:
Step1: Go to Provisioning Profile folder (path: ~⁨Library⁩ ▸ ⁨MobileDevice⁩ ▸ ⁨Provisioning Profiles⁩).
Or use a shortcut to jump directly into this folder like CMD + Shift + G and enter ~/Library/MobileDevice/Provisioning Profiles it will redirect your finder directly on the Provisioning Profiles folder.
Step2: Sort the files inside that folder by Date Modified.
Step3: Check profile with Unknown App Id and delete all unknown profiles.
Step4: Come back on Xcode and check all old projects will work as expected.
Note: Make sure none of your project open while doing above changes.
Otherwise, it will create a new profile with Unknown App Id.
I hope this will help and Apple will solve this bug soon!
UPDATE: This solution still works as on 2019/Mar/20 7:00 UTC+0
SOLUTION: no Xcode reinstallation is required. I used a brand new free AppleId, but later checked with my old AppleID and it also works.
In Xcode, under the General tab, untick the Automatically manage signing option
Close Xcode.
Erase old profiles in ~/Library/MobileDevice/Provisioning Profiles:
cd ~/Library/MobileDevice/Provisioning\ Profiles
rm -rf *
On MacOS, run Launchpad → Other → Keychain Access and remove all certificates related to iPhone development, like the following four on the picture:
Apple Worldwide Developer Relations Certification Authority
Developer ID Certification Authority
iPhone Developer: your_name_or_email
Uninstall the old app on iPhone. Restart both iPhone and Mac
Open Xcode and change the Bundle Identifier of your app, at least one character (later you may revert this change)
Enable the Automatically manage signing option in Xcode.
After this you should be able to run and debug your app on your device.
If you have a “iPhone has denied the launch request” problem, the solution is in an answer to Stack Overflow question iOS 12 iPad Denied Launch Request - Xcode.
In short, you need in Xcode to go to menu Product → Scheme → Edit Scheme... and select Executable: ask on launch.
This issue has been resolved, BUT some people still have a problem with it. If you're one of them, try the following:
1. In the General tab of target settings - uncheck the Automatically manage signing option
2. Close Xcode (fully, not just your project)
3. Erase .mobileprovision files under ~/Library/MobileDevice/Provisioning Profiles/
4. In Keychain Access, delete the following:
iPhone Developer: youremail#email.com
Developer ID Certification Authority
Apple Worldwide Developer Relations Certification Authority 3.
5. Delete the app on your iOS devices
6. Restart your Mac and iOS devices
7. Open Xcode again
8. Change the Bundle Identifier (even if it's a single character, you'd change it back to the original after you get it going)
9. Check the Automatically manage signing option
10. Use USB to connect your iPhone/iPad.
11. Make sure you trust your certificate on your iOS devices
This should do work for you.
It seems that this problem has been resolved now and the personal accounts can resign their apps automatically again.
Regarding to #Paul answer, it is not related to uninstalling Xcode. It is fixed from the server side.
The only thing that is required is removing Apple Developer Certificate (for the personal account) from your keychain, so that Xcode retries to generate and download a new one.
Here is the solution:
Let Xcode be open.
Select your developer account and let the error appear again.
Go to the keychain app
4.a) Goto certificate section
4.b) Remove All (valid and invalids) certificates (I have three valid and many invalid!)
After removing the last certificate, macOS will recreate a new certificate for the active developer account automatically.
Run your app in your iDevice. You need to enter your system password to add newly created certificate into the Keychain.
If in the second run it says
Your iPhone has denied the launch request
Just go to:
Product → Scheme → *edit scheme: uncheck "Debug executable"
I hope it solves your problem.
I got it to work by doing the following steps:
Go to Xcode
Preferences
Accounts
Manage certificates
Plus sign
iOS Development
Done
Download manual Profiles
Close
Go to your target
Change development team to none
Change development team to your previous team
It should work.
I am finally able to deploy to our iOS devices again. Here are the steps I took to make it work.
First, I followed all 10 steps in Zameer's answer here. I have copied them below:
Open your project in XCode.
Select your project from the project navigator and then select your target from the column.
Click on the General tab and under the Signing section, make sure "Automatically manage signing" is enabled.
Click on the Capabilities tab and turn On both the "App Groups" and "Keychain Sharing" settings. This might raise an
"Automatic signing failed" popup error, just click cancel to make it go away.
This should generate a entitlements file for you named nameProject.entitlements in the project folder of your project navigator.
Move this entitlements file outside of the folder, just below your project file.
Select your target again and return to the Capabilities tab to turn Off both the "App Groups" and "Keychain Sharing"
settings. This again might raise an "Automatic signing failed" popup
error, just click cancel to make it go away.
Now select your project above the target and go to Building Settings tab.
Scroll down to the Code Signing Identity setting under the Signing header and select iOS Developer from each drop down.
Under the above Signing header, double click the text field beside the Code Signing Entitlements and enter the name of your
entitlements file, nameProject.entitlements.
After completing those 10 steps, the 2 red entitlement error messages in XCode went away and I was able to build and deploy the XCode test app to the iPhone and run it.
Although that XCode test app could build and deploy, I develop on a PC using Xamarin and I was unable to deploy my Xamarin.iOS application to my iOS devices and kept getting an error in Visual Studio: the executable was signed with invalid entitlements. I did the following things and now I can deploy my Xamarin app and run it on my iOS devices:
I deleted the provisioning profile from the Mac in the ~/Library/MobileDevice/Provisioning Profiles directory. XCode immediately generated a new provisioining profile (I'm not sure if this step was necessary but I'm just writing it because that's what I did).
I changed my Xamarin.iOS.csproj file and removed Entitlements.plist from the CodesignEntitlements element so it now just looks like <CodesignEntitlements></CodesignEntitlements>. Visual Studio automatically added two elements to the same propertygroup in the project which are probably not necessary but I thought I'd mention: <CodesignExtraArgs /> and <CodesignResourceRules />.
Maybe forum post [iOS 12 SDK] - deadline March 2019 - Legacy Mode might help.
It talks about Apple refusing to build iOS applications under SDK 12 as of March 2019 (OP from Dec 2018).
I've not yet tried this, but it may be linked to the issue. I have a free developer account and am also experiencing this bug.
Here's a screenshot in case the link changes (screenshot 1 below).
This is the link from the first screenshot (screenshot 2 below)
1
2
There is one other potential source of this error. If you do not have a valid signed development certificate setup within your Xcode environment it will throw similar errors as posted by the OP.
You can check out your development certificates status following the Apple link here.
For macOS Big Sur Beta
Archive in Xcode 11
Upload with Xcode 12 beta organizer (Window -> Organizer)
For me, it finally works again. Either they just fixed it or any of my other steps helped:
Uninstall Xcode and all related files (using AppCleaner)
Install Xcode via the App Store
Change the Bundle Identifier of the App
Remove all "iOS Developer" Keys from Keychain
Here is a temporary workaround:
Change Bundle Identifier: Target → General → Identity → Bundle Identifier (set this to a different value than it is right now)
Change Version: Target → General → Identity → Version
Disable debug executable: Product → Scheme → Edit Scheme (uncheck the box that says "debug executable")
Delete Provisioning Profiles: ~/Library/MobileDevice/Provisioning Profiles delete everything in this folder.
You now should be able to build and run projects on simulators and devices.

Unity Xcode Build "Automatic signing is unable to resolve an issue" [duplicate]

This post relates to a rapidly changing event.
I've tried all the other questions and searched everything on this that I could already, a lot of the other questions involved existing apps that were being updated or people with developer accounts but this is like my second time using Xcode and it has worked before.
This just happened out of nowhere. I keep getting these two errors and it allows me to run simulators but not build onto my iPhone:
Automatic signing is unable to resolve an issue with the "LearningSpriteKit" target's entitlements.
Automatic signing can't add the application-identifier and keychain-access-groups entitlements to your provisioning profile. Switch to manual signing and resolve the issue by downloading a matching provisioning profile from the developer website. Alternatively, to continue using automatic signing, remove these entitlements from your entitlements file and their associated functionality from your code.
Provisioning profile "iOS Team Provisioning Profile: #####.LearningSpriteKit" doesn't include the application-identifier and keychain-access-groups entitlements.
This issue is related to Bug 1534145. SSL.com: P-384 curve / ecdsa-with-SHA256 certificates.
A representative from Apple estimated 558,000 certificates to become invalidated: Bug 1533655. DigiCert: Apple: Non-compliant Serial Numbers
GoDaddy, Google, Apple and Facebook (that would explain why Facebook was glitchy today) are affected.
They are working on resolving the issue right now.
That would explain our problems, folks!
Update: The issue has been resolved. Try to refresh your projects.
Workaround: change Bundle Identifier and/or Version.
I restored a profile from Time Machine when this was working and upon launch, Xcode immediately deletes and replaces it with a new one. The key difference seems to be the old profile has the get-task-allow entitlement while the new one has NO entitlements. This is definitely broken at Apple's end.
Edit: The entitlements should also include a keychain access group, but again, no entitlements at all. Should look like:
It seems Apple broke the automatic signing system.
I was playing around with a few projects and Xcode just fetches the incorrect profile.
This worked for me:
Turn off "Automatically manage signing" in project target
Go to ~/Library⁩/⁨MobileDevice⁩/⁨Provisioning Profiles⁩
Remove previously downloaded profiles
Turn on "Automatically manage signing" again
EDIT
As per latest update Apple successfully resolved Automatically Code
Sign with Free Account issue.
I tried it and I can confirm its resolved.
Please try at your end.
Update
Tested with Latest XCode 10.2 and it's working fine + they improved
performance of overall Xcode & codesign feature.
I am also facing the same issue while I am creating a new Profile from Xcode and if I go to other projects and check over there also I am facing the same issue as below.
Due to this issue, none of my projects can build with the old profile and certificate.
The strange issue, so I checked a newly created Profile and compared with the old one, and I found that App ID is unknown as well as there were no Entitlement details in the newly created profile.
Check the below screenshots of the old and new profile comparison:
Old Profile:
New Profile:
So it means it's not able to set App Id and Entitlements in the new profile. So the end result does not work all old profiles and giving the same error in all projects.
Issue Workaround:
Step1: Go to Provisioning Profile folder (path: ~⁨Library⁩ ▸ ⁨MobileDevice⁩ ▸ ⁨Provisioning Profiles⁩).
Or use a shortcut to jump directly into this folder like CMD + Shift + G and enter ~/Library/MobileDevice/Provisioning Profiles it will redirect your finder directly on the Provisioning Profiles folder.
Step2: Sort the files inside that folder by Date Modified.
Step3: Check profile with Unknown App Id and delete all unknown profiles.
Step4: Come back on Xcode and check all old projects will work as expected.
Note: Make sure none of your project open while doing above changes.
Otherwise, it will create a new profile with Unknown App Id.
I hope this will help and Apple will solve this bug soon!
UPDATE: This solution still works as on 2019/Mar/20 7:00 UTC+0
SOLUTION: no Xcode reinstallation is required. I used a brand new free AppleId, but later checked with my old AppleID and it also works.
In Xcode, under the General tab, untick the Automatically manage signing option
Close Xcode.
Erase old profiles in ~/Library/MobileDevice/Provisioning Profiles:
cd ~/Library/MobileDevice/Provisioning\ Profiles
rm -rf *
On MacOS, run Launchpad → Other → Keychain Access and remove all certificates related to iPhone development, like the following four on the picture:
Apple Worldwide Developer Relations Certification Authority
Developer ID Certification Authority
iPhone Developer: your_name_or_email
Uninstall the old app on iPhone. Restart both iPhone and Mac
Open Xcode and change the Bundle Identifier of your app, at least one character (later you may revert this change)
Enable the Automatically manage signing option in Xcode.
After this you should be able to run and debug your app on your device.
If you have a “iPhone has denied the launch request” problem, the solution is in an answer to Stack Overflow question iOS 12 iPad Denied Launch Request - Xcode.
In short, you need in Xcode to go to menu Product → Scheme → Edit Scheme... and select Executable: ask on launch.
This issue has been resolved, BUT some people still have a problem with it. If you're one of them, try the following:
1. In the General tab of target settings - uncheck the Automatically manage signing option
2. Close Xcode (fully, not just your project)
3. Erase .mobileprovision files under ~/Library/MobileDevice/Provisioning Profiles/
4. In Keychain Access, delete the following:
iPhone Developer: youremail#email.com
Developer ID Certification Authority
Apple Worldwide Developer Relations Certification Authority 3.
5. Delete the app on your iOS devices
6. Restart your Mac and iOS devices
7. Open Xcode again
8. Change the Bundle Identifier (even if it's a single character, you'd change it back to the original after you get it going)
9. Check the Automatically manage signing option
10. Use USB to connect your iPhone/iPad.
11. Make sure you trust your certificate on your iOS devices
This should do work for you.
It seems that this problem has been resolved now and the personal accounts can resign their apps automatically again.
Regarding to #Paul answer, it is not related to uninstalling Xcode. It is fixed from the server side.
The only thing that is required is removing Apple Developer Certificate (for the personal account) from your keychain, so that Xcode retries to generate and download a new one.
Here is the solution:
Let Xcode be open.
Select your developer account and let the error appear again.
Go to the keychain app
4.a) Goto certificate section
4.b) Remove All (valid and invalids) certificates (I have three valid and many invalid!)
After removing the last certificate, macOS will recreate a new certificate for the active developer account automatically.
Run your app in your iDevice. You need to enter your system password to add newly created certificate into the Keychain.
If in the second run it says
Your iPhone has denied the launch request
Just go to:
Product → Scheme → *edit scheme: uncheck "Debug executable"
I hope it solves your problem.
I got it to work by doing the following steps:
Go to Xcode
Preferences
Accounts
Manage certificates
Plus sign
iOS Development
Done
Download manual Profiles
Close
Go to your target
Change development team to none
Change development team to your previous team
It should work.
I am finally able to deploy to our iOS devices again. Here are the steps I took to make it work.
First, I followed all 10 steps in Zameer's answer here. I have copied them below:
Open your project in XCode.
Select your project from the project navigator and then select your target from the column.
Click on the General tab and under the Signing section, make sure "Automatically manage signing" is enabled.
Click on the Capabilities tab and turn On both the "App Groups" and "Keychain Sharing" settings. This might raise an
"Automatic signing failed" popup error, just click cancel to make it go away.
This should generate a entitlements file for you named nameProject.entitlements in the project folder of your project navigator.
Move this entitlements file outside of the folder, just below your project file.
Select your target again and return to the Capabilities tab to turn Off both the "App Groups" and "Keychain Sharing"
settings. This again might raise an "Automatic signing failed" popup
error, just click cancel to make it go away.
Now select your project above the target and go to Building Settings tab.
Scroll down to the Code Signing Identity setting under the Signing header and select iOS Developer from each drop down.
Under the above Signing header, double click the text field beside the Code Signing Entitlements and enter the name of your
entitlements file, nameProject.entitlements.
After completing those 10 steps, the 2 red entitlement error messages in XCode went away and I was able to build and deploy the XCode test app to the iPhone and run it.
Although that XCode test app could build and deploy, I develop on a PC using Xamarin and I was unable to deploy my Xamarin.iOS application to my iOS devices and kept getting an error in Visual Studio: the executable was signed with invalid entitlements. I did the following things and now I can deploy my Xamarin app and run it on my iOS devices:
I deleted the provisioning profile from the Mac in the ~/Library/MobileDevice/Provisioning Profiles directory. XCode immediately generated a new provisioining profile (I'm not sure if this step was necessary but I'm just writing it because that's what I did).
I changed my Xamarin.iOS.csproj file and removed Entitlements.plist from the CodesignEntitlements element so it now just looks like <CodesignEntitlements></CodesignEntitlements>. Visual Studio automatically added two elements to the same propertygroup in the project which are probably not necessary but I thought I'd mention: <CodesignExtraArgs /> and <CodesignResourceRules />.
Maybe forum post [iOS 12 SDK] - deadline March 2019 - Legacy Mode might help.
It talks about Apple refusing to build iOS applications under SDK 12 as of March 2019 (OP from Dec 2018).
I've not yet tried this, but it may be linked to the issue. I have a free developer account and am also experiencing this bug.
Here's a screenshot in case the link changes (screenshot 1 below).
This is the link from the first screenshot (screenshot 2 below)
1
2
There is one other potential source of this error. If you do not have a valid signed development certificate setup within your Xcode environment it will throw similar errors as posted by the OP.
You can check out your development certificates status following the Apple link here.
For macOS Big Sur Beta
Archive in Xcode 11
Upload with Xcode 12 beta organizer (Window -> Organizer)
For me, it finally works again. Either they just fixed it or any of my other steps helped:
Uninstall Xcode and all related files (using AppCleaner)
Install Xcode via the App Store
Change the Bundle Identifier of the App
Remove all "iOS Developer" Keys from Keychain
Here is a temporary workaround:
Change Bundle Identifier: Target → General → Identity → Bundle Identifier (set this to a different value than it is right now)
Change Version: Target → General → Identity → Version
Disable debug executable: Product → Scheme → Edit Scheme (uncheck the box that says "debug executable")
Delete Provisioning Profiles: ~/Library/MobileDevice/Provisioning Profiles delete everything in this folder.
You now should be able to build and run projects on simulators and devices.

Xcode Failed to load profile

My Xcode suddenly got a weird issue that there's some provisioning profiles I couldn't download or even import them manually. Got an error message all the time.
I tried to uninstall and reinstall Xcode again, and still got the problem. Also, I manually copied the profile into ~Library/Mobile Device/Provisioning Profiles folder, and my Xcode wouldn't recognize it.
Have anyone seen the issue before? Please don't ask me to delete and re-create the profile as it's a company provisioning profile, and it worked on my colleagues' computer.
Just recognize I was able to load or install all distribution profiles, all development profiles got the issue.
Here are a few checks I go through when I get anomalous behavior from Xcode with respect to development provisioning profiles.
Check to ensure that you have selected the correct Apple ID and correct Team by clicking Xcode > Preferences > Accounts > select the correct Apple ID on the left-hand side of the panel, and select the correct Team at the lower-right hand side of the panel
Check to ensure that you have installed the necessary components for Xcode by clicking Xcode > Preferences > Components > ensure the correct Toolchain is selected, then > Check and Install Now
Download the provisioning profile manually from the Apple Developer Portal, then drag-and-drop it onto your Xcode dock icon.
Open your project in Xcode and click on the project icon in Project navigator > Build Settings > scroll down to Code Signing Identity > ensure is set to iOS Developer
While still in Build Settings, scroll down to Provisioning Profile > ensure the name of the profile you expect is selected or that it is set to Automatic
Try to build.
If that doesn't work, you can try altering step 4. by doing the following instead:
Make sure to not select "Automatic" for the "Provisioning Profile" field(s) in Xcode > Build Settings
Instead, set all "Provisioning Profile" fields specifically to the profile with which you are trying to build
open the Terminal app
cd to the directory of your Xcode project
cd into your Xcode project, like so: cd MyProject.xcodeproj/
cd xcuserdata
open project.pbxproj -a TextEdit
hold the "command" key and tap "F" on your keyboard
enter 'PROVISIONING_PROFILE' and press 'return'
if 1 or more results are found, ensure the value to the right of the PROVISIONING_PROFILE variable is set to the UUID of the profile you want (i.e. compare to what you see in Quick Look to ensure a match)... if 0 options are found, something else may be wrong with your xcodeproj file
the UUID should be a string (surrounded by double-quotes), e.g. PROVISIONING_PROFILE = "abcdef01-2345-6789-abcd-ef0123456789";
save the file with TextEdit and then close TextEdit
try to build again
For those who also got this issue, I was able to resolve this bug by deleting complete my XCode 9.4.1 and all local provisioning profiles, and update to latest XCode 10.0. After that, I can install and load all profiles as usual.
Kindly make sure installed mobileprovision file is valid, otherwise kindly regenerate the mobileprovision from developer.apple.com site and import it manually in xcodeproject IDE.

Xcode has conflicting provisioning settings

I have an Ionic 2 app, which builds and is testable in Xcode 8.2.1 Simulator environment, e.g. iPhone7 (Build Successful).
When I try Archive the app to create an ipa file to set on a device, I follow these instructions. But Product -> Archive is greyed out. So I change the active scheme to Generic iOS Device.
But then when I click Product -> Archive, I get Build Failed.
theWhoZoo has conflicting provisioning settings. theWhoZoo is
automatically signed for development, but a conflicting code signing
identity iPhone Distribution has been manually specified. Set the code
signing identity value to "iPhone Developer" in the build settings
editor, or switch to manual signing in the project editor. Code
signing is required for product type 'Application' in SDK 'iOS 10.2'
If anyone could advise how I can fix this to build an Archive, I would appreciate it.
This worked perfectly for me. Give a try :)
Step 1:
Select the Project Target-- > Build Settings. Search PROVISIONING_PROFILE and delete whatever nonsense is there.
Step 2:
Uncheck "Automatically manage signing", then check it again and reselect the Team. Xcode then fix whatever was causing the issue on its own.
The problem is in Code Signing Identity. This is a new problem that showed up on the latest release of Xcode. Go to Code Signing Identity, then add other and type in "iPhone Developer" as shown in the error message and save then this will display.
If this does not work show me your General signing. and your Code Signing Identity from both your Project and your Targets
The problem is in Code Signing Identity. This is a new problem that showed up on the latest release of Xcode. Go to Code Signing Identity, make all IOS Developer rather that IOS distribution.
UPDATE Just figured out the real issue [assuming that your app has the correct provisioning profiles, but a target for your app does not]: Navigate to your target and change the provisioning profile there. See below:
I got this error when I added a target to enable rich push notifications. The project/workspace, "Spontit" did not have this error but the target "RichNotification" did.
I tried several things, and the last thing I did, that seemed to be responsible for it finally working, was:
Un-add and re-add the embedded binary for the target "RichNotification" in the "General" tab of the project, "Spontit".
Another thing to check is to make sure that it is added as a "Target Dependency" in the "Build Phases" tab.
For this particular problem, make sure to clean your project (Cmd Shift K) before building it, every time. Otherwise, you might fix it and try to build it and think it's not working, but really it's using the old settings- so clean it first.
For me Only this worked.I tried changing the Provisioning Profile(Deprecated) Value to Automatic.
This worked for me and I hope it would be helpful
for someone.
Project Target -> Build Settings -> Code Signing Identity -> Change the Debug and Release to iOS Developer and iOS Distribution.
If you have error message like this:
[target name] is automatically signed, but provisioning profile xxxxx-xxxx-xxxx-xxx-xxx has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor, or switch to manual signing in the project editor.
You can fix like this:
1. Check Automatically code sign in
2. Uncheck Automatically code sign in, then check it again and reselect the Team. Xcode then fixed whatever was causing the issue on its own
3. If still not work, find project.pbxproj, search the profile, and just delete that line, then save it.
This work for me!
Close Xcode project.
Using finder go to project folder.
Right click on .xcodeproj and choose "Show Package Contents"
Right click on project.pbxproj go on "Open With" and choose TextEdit
Now search for your Provision Profile instanceId specified in the error message.
Delete all found texts and let Provisioning Profiles clean.
Save & Close.
Open Xcode
Enable automatically manage signing
Source: https://www.codegrepper.com/code-examples/whatever/has+conflicting+provisioning+settings+xcode
I tried multiple things mentioned in stack but nothing worked except above solution.
HERE IS THE FIX
FOLLOW THESE STEPS:
open your project in xcode, in my case I used xcode 9.
INSIDE THE GENERAL TAB DO THE FOLLOWING
UNCHECK THE FOLLOWING OPTION:
Automatically manage signing
THEN SIGN YOUR DEBUG PROFILE
provisioning profile should be your development profile from the dropdown
Team : will be populated because of the above provisioning profile
Sigining Certificate: will be populated.
THEN SIGN YOUR RELEASE PROFILE
provisioning profile should be your release profile from the dropdown
Team : will be populated because of the above provisioning profile
Sigining Certificate: will be populated.
That is all, clean and archive your project.

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

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.

Resources