Xcode 10 - iPhone has denied request to launch - ios

I'm running Xcode 10 and iOS 12.1 on my iPhone 6S Plus. The app works when running in simulator, but when running my app in Xcode with my phone connected, i get this error:
iPhone has denied the launch request.
My iPhone is a trusted device on my mac, and i have my signing certificate. I've spent hours googling for a solution but none of them are working for me.
Anyone have any ideas?

I was also facing similar issue.
What work for me is to change the trust to "Use System Defaults" (Previously it was always ask) in "Apple worldwide developer relation certificate authority" in keychain.

My solution worked: Menu Xcode - Product - Scheme - Edit scheme - Build Configuration -> [Release] (instead of Debug) + Debug executable -> [remove the cross]

I have faced the same issue when I run the build-in ad hoc profile and I have fixed it by unchecking the " Debug executable " option from the Product -> Scheme -> Edit Scheme.

Try upgrading from XCode 10 to XCode 10.1. The SDKs for iOS 12.1 were added in XCode 10.1, so XCode might be having trouble communicating with your device because it's on a higher OS version than it understands.

Select the Project> Target > Build Settings. Search PROVISIONING_PROFILE and remove whatever is there. Then run.

Check you certificate in keychain if its double delete one of them > Quit XCODE > Clean > Build again ( This work to me )

edit scheme > uncheck debug executable.....this works but make you lose debug capabilities.
what is really worked for me without losing the debug capabilities is doing the following
open keychain
search for iphone developer certificate
delete it (Xcode will create another one for you)
relaunch the app Xcode will ask for your computer password type it and you are done
i found this answer thanks to Tommy Callaway on youtube
video link

The solution for me was to delete ALL my apple dev certs locally, then approve them during the next build process.
But def make sure you've set the provisioning profile for your project, that's a classic..
Keychain Access

On my device, I went to Settings -> General -> Profiles & Device Management. I then tapped on the 'developer app entry' which displayed my personal development team. On the next screen I chose to trust apps from this developer (me).

In project , open your project's TARGETS.
1.Check your Provisioning Profile whether is match Signing certificate
2.In debug their are develope profile and certificate,and in release their are distribution profile and certificate
3.[enter link description here][1]if you don't determine, there is a easy way to help you,xcode offer the Automatically manage signing ,just in xocode tick this option.look this here
This will help: iPhone has denied the launch request

Related

Xcode 10.1 signing problems for the iOS Qt kit [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 10: Provisioning Profile has get-task-allow false resulting in "iPhone has denied the launch request" [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.

"iPhone has denied the launch request." can not debug [duplicate]

Using Xcode beta 9 (v4), I'm trying to launch the app by clicking on the "play" button. I get a "build succeeded" but right before launching, a popup message appears in Xcode:
"iPhone has denied the launch request."
It used to work yesterday. It does work on the simulator. I've rebooted my computer, the iPhone, uninstall the app, cleaned the build. Running out of ideas.
It may be code sign issue. Make sure you're signing with developer, not distribution.
It happens using Xcode 9.x or newer.
I tracked this problem down to the "debug executable" checkbox in the product scheme (product->scheme->edit scheme->info->debug executable checkbox). I unchecked that and this stopped happening (as well as a couple other weird issues - no output in console being one).
I have a workaround:
If you change the scheme to 'Ask on Launch' it works.
In Xcode top bar
Product > Scheme > Edit Scheme > 'Info' tab > Executable: "Ask on Launch"
http://upload-images.jianshu.io/upload_images/663014-d5d182e310052664.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240
It's slightly annoying but it works.
This issue can be resolved by unchecking Debug Executable in Edit Scheme.
After getting "denied launch request" error, do this:
Edit Scheme -> Info -> Executable -> Ask on Launch
This worked for me with adhoc profile.
The problem for me was that I was using a free developer account (simply signed in with my Apple ID). When looking at the device logs I found (bold added)
(RequestDenied); reason: "The request was denied by service delegate
(SBMainWorkspace) for reason: Security ("Unable to launch
{com.my.bundleID} because it has an invalid code signature, inadequate
entitlements or its profile has not been explicitly trusted by the
user")"
That made me realize that I needed to go into Settings -> General -> Device Management -> {My Apple ID} -> Trust
After that, everything worked as expected.
In previous versions of iOS I would encounter a dialog on my device that would tell me that this was the problem. Maybe Apple took it out for iOS 11. 🤔
Simple restarting of the iPhone helped me out.
For me issue was due to code signing the app with Ad hoc profile.
After changing the code signing to developer profile,from xcode settings general tab the above issue got resolved.
I got this issue recently and I found the solution for this crazy issue. This are the Scheme Issue to fix this issue follow following steps.
Click Edit Scheme top Navigator Tab.
Click Info on Run menu.
On Executable dropdown select "Ask on Launch" option -> Then Close and run the build once.
This solved my problem when I got this issue.
Apple Reference
Got this with Xcode 9.0 while deploying to a non-simulated iPhone 6s with iOS 10.3.
I had force-quit the app right before this arose. Otherwise, nothing had changed; all the developer signing credentials was still trusted, and the app was still marked Verified in the iPhone's Settings.
The trick that fixed it was turning the iPhone off and then turning it back on again.
Looking at my logs, it appears applicationWillTerminate was triggered a while before this happened; the instance of the app that I thought I force-quit must have been some zombie process?
The problem is that xcode 'times out' after certain seconds. The fix is to edit the scheme and ask xcode to 'wait' until the executable is launched.
In Edit Scheme, check 'Wait for executable to be launched' instead of 'Automatically'
I attentively read all answers but they don't help me. My solution:
Go to Xcode preferences, select accounts (⌘ + ,)
Select your Apple ID, choose team and click Manage Certificates
In Pop up menu in bottom left corner click + button and select iOS Development, then click done and close popup
Try to relaunch application, now it's should fine.
It may cause with switched a wrong branch with Git, Make sure the branch you switch not too old(since it may cause code sign issue), And on the right branch if this still bothering, select the development Provisioning Profile under Signing(Debug) if u r not Automatically manage siging.
Just tick "Automatically manage signing" in General -> Signing properties of the Target. It will create Development provisioning profile for you and running on the device will work.
These simple steps helped me.
Remove your connected iPhone, iPad from the mac.
Restart your device.
Select "Automatically manage signing" in Xcode settings.
Reconnect your iPhone, iPad.
I know there are lots of answers in this thread. I've tried every one of them but none worked for me.
TLDR:
Here is the solution:
Update to xcode 11.4.1 or newer
Going through all the certificates in Keychain access I found out that all of my developer certificates has a invalid status. And, I believe that, this is the root cause of this issue. I've tried the solution here saying delete Apple Worldwide Developer Relations Intermediate Certificate and everything. But, It didn't work.
Then I came across this link. Apparently, the Apple Worldwide Developer Relations Intermediate certificate (AWDRI) is set to expire in 2023 and developer certificates or any other certificates issued after January 28, 2021 won't be using that particular AWDRI certificate. Instead of that they use a renewed certificate which is set to expire in 2030. And here comes the problem, The new renewed certificate only works in xcode versions of 11.4.1 or newer. And, I have an older version of xcode.
When I updated my xcode to latest version - 12.4 (I had to go through making space on my machine, updating macos and all) The problem went away. All my developer certificates on Keychain access are now showing valid. And, I could see two AWDRI certificates on my Keychain access one expiring on 2023 and another one in 2030.
Description from the link I shared:
The current Apple Worldwide Developer Relations Certification Intermediate Certificate (intermediate certificate) is set to expire on February 7, 2023. The renewed certificate will be used to sign new software signing certificates issued after January 28, 2021 for the Apple Developer Programs. Remaining service certificates will be updated in the future and this page will be updated to reflect additional certificate changes.
And more...
This requirement also impacts all software signing certificates generated after January 28, 2021, by developers with Personal accounts in Xcode, as well as members of the Apple Developer Program, Apple Developer Enterprise Program, and iOS University Developer Program.
The new Apple Worldwide Developer Relations Intermediate Certificate is downloaded automatically by Xcode 11.4.1 or later and is available for download on the Certificate Authority page. Confirm that the correct intermediate certificate is installed by verifying that the expiration date is set to 2030.
Also they are mentioning about an issue with older versions:
Xcode 11.4.0 and earlier may not be able to sign software using signing certificates issued by the new Apple Worldwide Developer Relations Certification Intermediate Certificate. If you’re unable to upgrade to a supporting version of macOS or Xcode on your build machine, you can build and archive your app using an earlier Xcode client and sign it for distribution using the latest release. Alternatively, you can utilize the codesign tool to sign your software using the command line.
I face this issue on Xcode 9.1
Scenario: I checked "Connect via Network" option for device. And trying to run app to this device with USB cable attached.
Fix: Simply remove USB cable and run.
I'have tried all the answers nothing worked for me,
The problem is coming form Xcode itself and has nothing to do with profiles and certificate :
Product > Scheme > Edit Scheme
In Run (Section) / info (tab) [select] the Release instead of debug as Build Configuration as follow :
It's a regression since Xcode 10.1
Config : Xcode Version 10.1 (10B61)
Iphone X / IOS 12.1.4
I had the same issue . Its a bug in Xcode 9.1. There is a trick to make it work for now. Lock your phone. Run the code. Xcode will ask to unlock the iPhone.
I just cleared the profiles with the Apple Configurator, restarted the iDevice and worked again as usual.
It's an intermittent bug in Xcode - I just stopped and started all my devices and it magically worked (after messing about for 1/2 hour)
I had upgraded MacOS overnight to 10.13.04 which obviously upset something!
Xcode 9.3, iOS 11.3 watchOS 4.3
Let me tell you a workaround which solves my problem:
Step 1: Windows > Devices and simulator.
Step 2: Unpair device.
Step 3: Reconnect device and trust.
Step 4: Run the application. BINGO.
For me this issue was related to a Manually installed Enterprise Certificate and having to use it for both development and release schemes. I had to trust the certificate on the device before it would allow the app to be launched, but it would never launch as I kept getting that denied message. Eventually, editing the scheme and setting it to wait for the app to be attached before debugging did the trick.
Open the App Groups in Capabilities, wait App... effective,then close the App Groups, it worked:
After seeing all the solutions given across web, i finally found one and here are those:
Error occurs because of it makes Runner confused about what profile to use.
You will most often get this error, when you have added new account in profile in Xcode > Targets > Signing.
You can remove this error by just using before one Profile.
There is no need to create New Users.
or you can sign in with account you are using in Profile in your iPhone (i did this!)
Happy Days :)
In case this problem occurred for you a couple of days before today, 2019-Mar-20, it is very likely related to the fact that faulty code signing certificates were issued. In that case you should be able to resolve it by just recreating the code signing certificate. This SO question already has an answer that explains you how to do so.
I'm not sure whether it's a fix, or just another workaround, but uninstalling the application from my device helped. I'm still not sure what caused it, but #MrRogers answer helped me figure it out.
For me the issue came-up because, I was using the Distribution Provisioning Profile to debug.
We cannot debug with Distribution Provisioning Profile, changing it to Development Provisioning Profile fixed the issue.
Steps: (Xcode 11.2.1)
Select Project, Under TARGETS, select the correct target.
Switch to Signing & Capabilities
Under Singing section, change the Provisioning Profile to Development profile or you can just check Automatically manage signing
None of the other answered worked -
Xcode 11+
Click Edit Scheme on the top Navigator Tab.
Launch option choose Wait for executable to be launched
You will have to run the application on your device manually but that will keep the debugger attached as for some of the other solutions debugger get detached.
Today,I also meet this question.This is my way to solve.
Xcode 9.0,iPhone 6s,Automatically manage signing with my account.
When I select "iPhone 6s",I found that there is an logo after the iPhone 6s
It's the new function of Xcode 9.0 that can run an app on the iPhone without a string connect computer(iPhone and Mac must connect the same Network).
So, I try to change this kind of connect way.
Open "Devices and Simulators"-> unselect "Connect via network"
And then, I clean, rebuild and run my project.It works!
I will be happy if this method can help you.

I get conflicting provisioning settings error when I try to archive to submit an iOS app

Now I'm trying to Product>Archive my iOS app to submit. However, I am getting following errors:
AppName has conflicting provisioning settings. AppName 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.1'`
The situation won't change even those I've retry a whole process to recreate iOS certificates or provisioning profile.
I was setting as iOS Distribution in TARGETS > Code Signing Identity > Release > Any iOS SDK. When I changed the setting as iOS Developer here, and changed the setting in PROJECTS > Code Signing Identity > Release > Any iOS SDK as iOS Distribution, I've succeeded in archiving. I'm wondering is it necessary to set as iOS Distribution in the target editor or not. And if it's mandatory, please someone let me know how can I work around this error.
My XCode version is 8.1.
I had this same error, but I had already checked "Automatically manage signing".
The solution was to uncheck it, then check it again and reselect the Team. Xcode then fixed whatever was causing the issue on its own.
I had the same problem, I noticed that If you want to make a release of your iOs app and publish it on the App Store you don't need at all to put in the "Code Signing Identity" as release, just keep it as iOs developer.
Go to Your project -> Build Settings -> Code Signing Identity and put everything to iOs developer.
For those coming from Ionic or Cordova, you can try the following:
Open the file yourproject/platforms/ios/cordova/build-release.xcconfig and change from this:
CODE_SIGN_IDENTITY = iPhone Distribution
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution
into this:
CODE_SIGN_IDENTITY = iPhone Developer
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
and try to run the ios cordova build ios --release again to compile a release build.
Reference: https://forum.ionicframework.com/t/ios-build-release-error-is-automatically-signed-for-development-but-a-conflicting-code-signing-identity-iphone-distribution-has-been-manually-specified/100633/7
You are way over-thinking this. The process is vastly improved and extremely easy in Xcode 8. Take advantage of that fact.
Step One: Do not, in any way, shape, or form, attempt to set the Code Signing settings in the Build Settings. Don't go near them. You will absolutely mess this up. Instead, edit the target and do all the work in the General pane. Best approach: set yourself up for automatic code signing - just enter your Team and check the checkbox, like this:
Step Two: Make sure you have an iOS Distribution Identity (Certificate). You can check this under Xcode Preferences > Accounts, View Details. It would also be a good idea at this time to go to the member center and get yourself an App Store mobile provision for this app, and download and install it.
Step Three: Choose "Generic iOS Device" as your Destination, and choose Product > Archive. The app will be compiled, the archive is created, and you are now ready to submit to the App Store.
If you get this error
App has conflicting provisioning settings.
App is automatically signed, but provisioning profile 'ID' 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.
then make sure that you have empty PROVISIONING_PROFILE option in Target Build Settings:
Don't forget to do this,
Select the Project -- > Build Settings. Search PROVISIONING_PROFILE and delete whatever nonsense is there.
If you are from Ionic world. You might get a "conflict code signing" error when you in the "archive" stage, as below:
... 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.x'
In this case, please go to Build Settings/under signing, code signing identity, and select both as iOS Developer, not Distribution.
Go to the menu: Product/Archive again, then the issue will be fixed.
For those coming from Ionic or Cordova, you can try the following:
Disconnect your ios devices from the computer before ios cordova build ios --release (seems to change the targeted device for xcode signing).
The only solution worked 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
Enjoy! Hope it will be useful!
Go to build settings, search for code signing identity, and set Any iOS SDK value for iOS Developer:
For me change Code Signing Identity to all iOS Developer for both of Debug and Release.
And Code Signing Style to Automatic.
In my case, i set the "automatic" option in Build Settings.
I was struggles long time, I tried all proposed solutions. Nothing work for me.
Then I found the issue: there was a "User Defined Settings" for "PROVISIONING_PROFILE" at the end of Build Settings tab. I delete it for both Project and Target build settings. Then Automatic signing worked perfect.
I hope this will help somebody else. :)
This worked perfectly for me.
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.
Try either of the following
1.Removing and adding ios platform and rebuild the project for ios
ionic cordova platform rm ios
ionic cordova platform add ios
ionic cordova build ios --release
2.Changing the Xcode Build Setting
The solution was to uncheck it, then check it again and reselect the Team. Xcode then fixed whatever was causing the issue on its own.
3.Change the following code in platform
This didn’t make any sense to me, since I had set the project to auto sign in xcode. Like you, the check and uncheck didn’t work. But then I read the last file path given and followed it. The file path is APP > Platforms > ios > Cordova > build-release.xconfig
And in the file, iPhone Distribution is explicitly set for CODE_SIGN_IDENTITY.
Change:
CODE_SIGN_IDENTITY = iPhone Distribution
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution
To:
CODE_SIGN_IDENTITY = iPhone Developer
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
Find .xcodeproj file and open it with a text editor
Find fields below and make them like this
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
General -> Signing -> check automatically manage signing and select team
Build settings -> Signing -> Code Signing Identity -> SET ALL TO "IOS developer"
Only thing worked for me.
Open the project -> Select your target -> Go to Build Settings -> Search PROVISIONING and delete the selected profiles.
In my case I had to login to Apple Developer Website and reset the list of devices.
It appears they now require you to do it every year when the subscription is renewed, before being able to add new devices and generate certificates.
I had the same problem
Mine was fixed by searching for "provisioning profile" in the build setting of share extension
Then there was two "Provisioning Profile"s fields there, one regular and one deprecated. The regular one was on Automatic but the deprecated one was not. Changing that one to Automatic too fixed my error.
For me, I had dragged the dump_syms binary and a bunch of scripts into my build target when I manually installed the Firebase SDK. Removing those from my target and project solved the issue.
Using Xcode 10: None of the other solutions here worked for me.
I had to revert to Xcode 9 to resolve this issue, and then update back to Xcode 10 so I could run my application on iOS 12 on a non-emulator device.
Any other solutions found on Stack Overflow or elsewhere, used in Xcode 10, sent me into an endless cycle of provisioning conflicts or signing certificate issues. It seems like signing is broken in Xcode 10 whether you're using the automatic method or manually selecting provisioning profiles and certificates.
You can revert to Xcode 9 by first deleting Xcode 10 from your Applications folder. Then, install Xcode 9 using the .xip file listed on this Apple Developers page.
In Xcode 9, use the automatic build option. You may have to uncheck 'Automatically manage signing' and reselect it, and you also may be required to revoke an existing certificate at developer.apple.com.
After you get the app to successfully build in Xcode 9, you can update back to Xcode 10 using the App Store. After reopening the application in Xcode 10, everything still worked. You may not need to do this, but I needed to in order to build for iOS 12 which requires Xcode 10.
I opened the project file in a text editor "Atom" then I searched for the provisioning profile id and deleted it.
The problem is in the Cordova settings.
Note this:
iPhone Distribution has been manually specified
This didn’t make any sense to me, since I had set the project to auto sign in xcode. Like you, the check and uncheck didn’t work. But then I read the last file path given and followed it. The file path is APP > Platforms > ios > Cordova > build-release.xconfig
And in the file, iPhone Distribution is explicitly set for CODE_SIGN_IDENTITY.
Change:
CODE_SIGN_IDENTITY = iPhone Distribution
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution
To:
CODE_SIGN_IDENTITY = iPhone Developer
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
It a simple thing, and the error message does make it clear that iPhone Distribution has been manually specified, but it doesn’t really say where unless you follow the path. I looked and fiddled with xcode for about three hours trying to figure this out. Hopes this helps anyone in the future.
Another cordova/ionic possible cause of this is if you're using the common branch-cordova-sdk plugin.
For some reason the plugin was overwriting code signing identities that had been correctly set in build.json when running ionic cordova build ios.
I tracked it down to identities that have been set in /plugins/branch-cordova-sdk/src/scripts/ios/enableEntitlements.js file
Make sure the debug and release vals are both set to "iPhone Developer" and this will save you having to do a manual fix in XCodes Build Settings after every build process
const DEBUGCODESIGNIDENTITY = "iPhone Developer";
const RELEASECODESIGNIDENTITY = "iPhone Developer"; // NOT "iPhone Distribution"
This doesn't happen on a different machine with same project/plugin so unsure precise root cause but sharing in case it helps others as this ate up a few hours.
It was found by searching for occurrences of "iPhone Distribution" in the project folder. Do the same to identify any other plugin/library that might be interfering for you.
Change your code sign in to destribution certificate .
After updating to Xcode 8.3.2 i had the same error with a Cordova project. I needed to upgrade Cordova (v7.0.0) and the iOS platform (v4.4.0) for code signing to work.
You need to add a Production Certificate and (or) Download one from your Development Acoount
Please make sure the "Product Bundle Identifier" in Build settings name matches actual bundle identifier.This worked for me.
For me, I need to switch from auto to manual, and switch to auto, same error. Switch to manual, and change those provisioning profiles and code signing settings and build and get errors, and switch back to auto, then it just success.

iOS 9.2 missing Profile section from General Settings

I was trying to activate a developer app in iOS 9.2 and the app was not trusted due to security settings. I tried to go into the Profile area under General Settings, but it wasn't there. What gives? It was there this morning . . .
Apple renamed the Profile section to Device Management. It is still under General Settings and performs the same function.
This somewhat worked for me: Instead of looking in the device, go to XCode, Devices (Under Window), ctrl -click on the device and you should see a "Show Provisioning Profiles" menu item.
I had the same problem and I couldn't debug my apps anymore.
I used the Apple Configurator (https://itunes.apple.com/de/app/apple-configurator-2/id1037126344?mt=12) to delete all of my profiles on the iPhone. Afterwards I installed another signed app again and now I can debug again.
But I still can't see "Device Management" in Settings.
I was successful doing this when I accidentally went to Product>Profile once the build is finished head over to your phone then Settings>General> then the Device Management will instantly appear under VPN.
I am at iOS 12.1.2(16C101) and was trying to verify that the Developer App certificate for my account is trusted on my device. Found the option at
General -> Profiles & Device Management.
If "Device Management" doesn't appear you must restart your device to see it.
This worked on ios 9.

Resources