199

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:

  1. 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.

  2. Provisioning profile "iOS Team Provisioning Profile: #####.LearningSpriteKit" doesn't include the application-identifier and keychain-access-groups entitlements.

mfaani
  • 33,269
  • 19
  • 164
  • 293
Jack A
  • 1,265
  • 2
  • 7
  • 16
  • 9
    Also experiencing this. Might be a global thing, asking other developers to confirm on https://ios-developers.slack.com – yeralin Mar 13 '19 at 03:13
  • 8
    Same here! Cant run on an iphone. only emulator – Renan Aguiar Mar 13 '19 at 03:51
  • 6
    Same here. Not a paid developer account. – Tieda Wei Mar 13 '19 at 05:38
  • 6
    yes, I am also facing same issue. I think it also an issue with free account – Piyush Mar 13 '19 at 10:02
  • 3
    I got this problem today only for free apple developer account. – Bikshapathi Kumbala Mar 13 '19 at 11:17
  • 4
    Same problem. NOT a free account, but using the Personal Team – Jan Mar 13 '19 at 14:48
  • 9
    Same problem, Paid Account – byemute Mar 13 '19 at 14:53
  • 3
    There is actually a work-around, I mean it works for me. https://stackoverflow.com/questions/55146587/automatic-signing-is-unable-to-resolve-an-issue-with-the-project-targets-enti – L_Cleo Mar 14 '19 at 00:32
  • 1
    It looks like the problem only occurs with personal teams, according to the comments in this thread. Is there a way to change from personal to any other team type? maybe this would help. – flo071 Mar 13 '19 at 18:59
  • 1
    This seems to be occurring on any free developer accounts, and new projects on paid developer accounts. However, some people have also reported new developer account enrollment to be broken :/ – Bilfred Mar 13 '19 at 21:53
  • 1
    I believe that is correct. Once my team added me, I selected the team in Xcode and build errors went away. – David Gish Mar 13 '19 at 23:58
  • 1
    Still broken. Apple forum is disgruntled too: https://forums.developer.apple.com/thread/114539 – Oscar Mar 14 '19 at 01:08
  • 1
    Same issue when attempting to sideload – Sam Mar 14 '19 at 05:05
  • 1
    Issue resolved now try again with new identifire its resolved by Apple. – CodeChanger Mar 14 '19 at 05:25
  • 2
    There will be a workaround here for the above problem. https://stackoverflow.com/questions/55146587/automatic-signing-is-unable-to-resolve-an-issue-with-the-project-targets-enti – Bikshapathi Kumbala Mar 14 '19 at 05:38
  • 1
    Go to capabilities and enable keychain sharing. – Dnyaneshwar Shinde Mar 13 '19 at 11:02
  • 2
    Apple's server may be down because of all of us meet the same question. – 冯剑龙 Mar 13 '19 at 04:29
  • 1
    Yes I too think so, same problem with my free account – siva prasanna Mar 13 '19 at 06:35
  • 1
    Can somebody confirm if this is a temporary issue? – Timur X. Mar 13 '19 at 07:00
  • 1
    same here. yesterday it is okay, but now after i change the bundle id, it give me this error – Susy Valentina Rahardjo Mar 13 '19 at 08:35
  • 1
    I think its not server issue as i have checked status of `Xcode Automatic Configuration` and its in active state check status here https://developer.apple.com/system-status/ may be some other issue or glitch by apple. – CodeChanger Mar 13 '19 at 10:06
  • 1
    Definitely still happening for me, this is the first time it's ever happened – Tanner H. Mar 13 '19 at 13:43
  • 1
    @CodeChanger working as intended ;) – Bilfred Mar 13 '19 at 21:55
  • 4
    Now it does not show up the Entitlements error. Instead it shows Build Succeeded but while launching the app on device, following error is thrown "iPhone has denied the launch request." This error is coming on every xcode project on every iOS device. – Amish Mar 14 '19 at 07:40
  • @Amish check this out https://stackoverflow.com/questions/55159807/i-got-a-solution-for-provisioning-profile-doesnt-include-the-application-identi . He uncheck Debug Executable checkbox and it works. – Andrei Calazans Mar 14 '19 at 11:21
  • I know people with paid developer accounts and it works for them. – Jack A Mar 14 '19 at 19:48
  • The issue seems to be fixed on Apple's end. As of 3/14. – Adel Ahmadyan Mar 14 '19 at 19:59
  • 3
    I encounter "iPhone has denied the launch request" error today. Is this related to this problem? – SinLok Mar 16 '19 at 15:59
  • 1
    @SinLok, same here. It is unclear to me whether it is the same problem or whether part of the fix (deleting certificates in my case) is causing secondary issues. Turning off debug executable in the scheme is a workaround (not a good one, because you cannot then debug the device) for now. I guess we have to then wait to see what develops. I fear more messing around with certificates and settings may just break more things! – Ali Beadle Mar 16 '19 at 18:51
  • 3
    Any solution here yet? I am still getting this problem –  Mar 16 '19 at 23:10
  • Hello everyone, I've created a StackOverflow room to chat about the "iPhone has denied launch request" issue: https://chat.stackoverflow.com/rooms/190218/iphone-has-denied-the-launch-request-issue – Qbyte Mar 17 '19 at 21:52
  • Free accounts seem to only have this problem –  Mar 19 '19 at 19:21

16 Answers16

64

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
yeralin
  • 1,357
  • 13
  • 24
  • 3
    Glad to hear Apple is dealing with this/has spoken out about the issue – Jake Mar 13 '19 at 23:39
  • How long should this take? I'm looking to deploy my app to my watch as soon as I can. – Tanner H. Mar 13 '19 at 23:46
  • 5
    Invalidated certs don't explain why new ones Apple is issuing are missing the necessary entitlements. – David Gish Mar 14 '19 at 00:01
  • 3
    @DavidGish from what I can gather from the report, they're actually not issuing any certificates at the moment. On 2019-03-7 they stopped issuance of TLS certs, unsure if or how that applies. – Bilfred Mar 14 '19 at 00:30
  • 2
    Are there any updates to this? I feel like this should have highest priority. Any new ideas for workarounds? – Linus Mar 14 '19 at 14:12
  • this is the biggest cluster fumble I've ever come across in my life... to deliberately destroy $80+ million worth of certificates over some pedantic nonsense is joke... I just hope this is a lie and they were actually hacked and shut the whole thing off – Mr Heelis Mar 14 '19 at 15:02
  • Apple fixed it. – Jack A Mar 14 '19 at 20:39
  • 9
    Right now I am not getting this error but instead I am getting "iPhone has denied the launch request".. any ideas? – bezoadam Mar 14 '19 at 22:56
  • 1
    @bezoadam I'm also having this problem. Unfortunately I have no fix but just a **workaround: Edit Scheme... -> Run -> Info -> "disable" Debug executable**. This means e.g. that you cannot use breakpoints. Hope this helps! – Qbyte Mar 14 '19 at 23:58
  • 1
    By looking at the phone logs I see these messages when debug executable is selected: `SpringBoard [bundleidentifier] Provision violated for watchdog process-exit: ; violated: YES> SpringBoard Not terminating "bundleidentifier" for violated provision because: "process is being debugged"` – Fabio Felici Mar 15 '19 at 14:40
  • @bezoadam I also started getting "iPhone has denied the launch request" Idk what exactly helped, but I tried (1) restarting laptop, (2) restarting iphone, (3) deleting app from iphone and reinstalling it again, and then eventually error went away – yeralin Mar 15 '19 at 20:05
  • @karabara any luck finding on how to do it? – N. Der Mar 16 '19 at 00:53
  • I continue to have this problem.. What do I do I have tried deleting world wide developer certificate and changing bundle identifier. Nothing is working –  Mar 16 '19 at 21:57
  • @FabioFelici Hello everyone, I've created a StackOverflow room to chat about the "iPhone has denied launch request" issue: https://chat.stackoverflow.com/rooms/190218/iphone-has-denied-the-launch-request-issue – Qbyte Mar 17 '19 at 21:54
25

Workaround: change Bundle Identifier and/or Version.

sanmai
  • 29,083
  • 12
  • 64
  • 76
yycking
  • 1,017
  • 1
  • 9
  • 14
  • 6
    Works here. If it doesn't, try disabling "Automatically manage signing," delete the offending provisioning profile, change Bundle Identifier, enable auto signing, then add your team. – Chase Patterson Mar 14 '19 at 05:52
  • Does not work. It gives no errors or warnings, but the app refuses to launch on the device, like described here https://stackoverflow.com/questions/45421179/xcode-9-error-iphone-has-denied-the-launch-request – Fedorov7890 Mar 14 '19 at 08:24
  • What to write for Bundle Identifier and Version, please? I'm self-employed developer working at my own office. I wrote two a string and a number respectively for them and the sign errors are vanished, but I think can't run my app using the iOS kit (on Qt Creator)! – Franky Mar 14 '19 at 14:27
  • @Fedorov7890 To get the app launching on the device, you need to disable the _debug executable_ checkbox in the scheme as explained in this comment [iPhone has denied the launch request](https://stackoverflow.com/a/47084160/230825). This work around works for me after removing my dev account, cleaning up `~/Library/MobileDevice/Provisioning Profiles` and changing the bundle identifier. – david Mar 14 '19 at 15:56
  • @david Thank you, I've already found an alternative solution without disable debug executable, https://stackoverflow.com/a/55160300/3824328 – Fedorov7890 Mar 14 '19 at 16:00
23

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:

Good entitlements

David Gish
  • 750
  • 6
  • 14
21

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.

Enter image description here

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:

Enter image description here

New Profile:

Enter image description here

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!

CodeChanger
  • 7,953
  • 5
  • 49
  • 80
  • 1
    Where is that ~Library path, please? – Franky Mar 13 '19 at 20:39
  • 1
    @Franky ~/Library⁩/⁨MobileDevice⁩/⁨Provisioning Profiles. Although this fix does not work for me (and others, as seen in other answers). Your mileage may vary. – Bilfred Mar 13 '19 at 21:52
  • 1
    @Bilfred My macOS X is Sierra 10.13.6 and there isn't such a path in ~Library! – Franky Mar 13 '19 at 21:58
  • Thank you, please note that, there is only one *..mobileprovision* file in that folder and that file contains three sections: **iOS TEAM PROVISIONING PROFILE**, **CERTIFICATES** and **PROVISION DEVICES**. In the **iOS TEAM PROVISIONING PROFILE** there is a line with *App Unknown ID:* as in [this image](https://pasteboard.co/I5lQe9K.png). Now should I delete the file? – Franky Mar 14 '19 at 08:07
  • 1
    yes delete that file and one more thing try again apple resolved above mention issue. – CodeChanger Mar 14 '19 at 08:48
  • Its clearly says that provided bundle identifier already created so you need to create new bundle id to resolve this issue. – CodeChanger Mar 14 '19 at 12:02
21

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:

  1. Turn off "Automatically manage signing" in project target
  2. Go to ~/Library⁩/⁨MobileDevice⁩/⁨Provisioning Profiles⁩
  3. Remove previously downloaded profiles
  4. Turn on "Automatically manage signing" again
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Oleh Zayats
  • 2,423
  • 1
  • 16
  • 26
18

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.

  1. In Xcode, under the General tab, untick the Automatically manage signing option
  2. Close Xcode.
  3. Erase old profiles in ~/Library/MobileDevice/Provisioning Profiles:

    cd ~/Library/MobileDevice/Provisioning\ Profiles
    
    rm -rf *
    
  4. On MacOS, run LaunchpadOtherKeychain 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

      Remove certificates

  5. Uninstall the old app on iPhone. Restart both iPhone and Mac

  6. Open Xcode and change the Bundle Identifier of your app, at least one character (later you may revert this change)
  7. 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 ProductSchemeEdit Scheme... and select Executable: ask on launch.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Fedorov7890
  • 1,173
  • 13
  • 28
  • for denied lunch if i remove the debugger option, i cant debug while using the device. only simulator – Renan Aguiar Mar 14 '19 at 15:42
  • @RenanAguiar you don't need to remove debugger option, just change 'Executable' from the drop-down list to "ask on launch". See link in my post that shows how to do that in pictures. – Fedorov7890 Mar 14 '19 at 15:54
  • when i do that, same thing happens. i cant see the debugger icons like step and location. only on the simulator – Renan Aguiar Mar 14 '19 at 16:19
  • It looks like debugger is not fully functional. I can get console output from device, but breakpoints don't work; neither do step over / step into commands – Fedorov7890 Mar 14 '19 at 17:36
  • I can confirm that the above answer worked for me. Specifically, the app is built, singed and downloaded to my iPhone. I am using free developer's account. (March 14, 2019) – FractalSpace Mar 14 '19 at 23:56
  • I did have this “iPhone has denied the launch request” issue, which went away with the above "ask to launch" workaround, but it is still annoying. – FractalSpace Mar 14 '19 at 23:59
  • In the updated solution debugger is fully functional. – Fedorov7890 Mar 20 '19 at 08:11
18

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Dani
  • 3,427
  • 3
  • 28
  • 54
11

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Husein Behboudi Rad
  • 5,434
  • 11
  • 57
  • 115
10

Here is the solution:

  1. Let Xcode be open.

  2. Select your developer account and let the error appear again.

  3. 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!)

Remove certificates

  1. After removing the last certificate, macOS will recreate a new certificate for the active developer account automatically.

  2. 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:

ProductScheme → *edit scheme: uncheck "Debug executable"

I hope it solves your problem.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Alirezak
  • 455
  • 5
  • 14
9

I got it to work by doing the following steps:

  1. Go to Xcode
  2. Preferences
  3. Accounts
  4. Manage certificates
  5. Plus sign
  6. iOS Development
  7. Done
  8. Download manual Profiles
  9. Close
  10. Go to your target
  11. Change development team to none
  12. Change development team to your previous team

It should work.

J. Doe
  • 12,159
  • 9
  • 60
  • 114
7

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)

1sdk_12_issue

2iphone_xs_max_support_image

Community
  • 1
  • 1
Jake
  • 1,906
  • 9
  • 32
  • 60
  • 1
    Interesting, but we have XCode 10.1 showing this problem and 10.1 does support SDK 12. – Ali Beadle Mar 13 '19 at 19:34
  • Okay sure thing, I've managed to get a temp workaround by cleaning the project in Xcode and only running in debug via my IDE (I'm using VSC) through a simulator. – Jake Mar 13 '19 at 19:38
  • 4
    As the OP said, simulators seem unaffected by the problem. It appears to only affect real devices. – Ali Beadle Mar 13 '19 at 20:07
  • 3
    Yeah I haven't been able to load on a physical device. Hope Apple fixes this soon. – Jake Mar 13 '19 at 21:54
7

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:

  1. Open your project in XCode.
  2. Select your project from the project navigator and then select your target from the column.
  3. Click on the General tab and under the Signing section, make sure "Automatically manage signing" is enabled.
  4. 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.
  5. This should generate a entitlements file for you named nameProject.entitlements in the project folder of your project navigator.
  6. Move this entitlements file outside of the folder, just below your project file.
  7. 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.
  8. Now select your project above the target and go to Building Settings tab.
  9. Scroll down to the Code Signing Identity setting under the Signing header and select iOS Developer from each drop down.
  10. 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:

  1. 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).
  2. 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 />.
Aaron T
  • 1,092
  • 2
  • 10
  • 25
6

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
GordonW
  • 1,120
  • 2
  • 16
  • 36
  • i use the free account.. by following whatever people say, now i get a error about waiting 7 days..... im not going to pay for testing it on my device. – Renan Aguiar Mar 19 '19 at 01:47
6

For macOS Big Sur Beta

  1. Archive in Xcode 11
  2. Upload with Xcode 12 beta organizer (Window -> Organizer)
AlphaWulf
  • 354
  • 5
  • 11
5

For me, it finally works again. Either they just fixed it or any of my other steps helped:

  1. Uninstall Xcode and all related files (using AppCleaner)
  2. Install Xcode via the App Store
  3. Change the Bundle Identifier of the App
  4. Remove all "iOS Developer" Keys from Keychain
PaulWen
  • 1,025
  • 1
  • 13
  • 24
  • 1
    This fixed the problem for me at first, but then it came back again a few minutes later – Ava Mar 14 '19 at 13:46
5

Here is a temporary workaround:

  1. Change Bundle Identifier: TargetGeneralIdentityBundle Identifier (set this to a different value than it is right now)
  2. Change Version: TargetGeneralIdentityVersion
  3. Disable debug executable: ProductSchemeEdit Scheme (uncheck the box that says "debug executable")
  4. 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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Mitch Wolfe
  • 139
  • 7
  • now i get it: Unable to launch /private/var/containers/Bundle/Application/52553D96-4B6A-4680-B77C-C04895B7759C/dois.app – Renan Aguiar Mar 16 '19 at 09:35