10

I've literally checked every possible question in stack overflow that have been solved about the same problem. I know that millions of questions exactly the same as mine have been asked, but I tried all the suggestions in the answers of those questions but Xcode is still giving me problems. So as always the first error is:

Automatic signing is unable to resolve an issue with the "Project" target's entitlements.

The second error is of course:

Provisioning profile "iOS Team Provisioning Profile: com.badubadu.WeatherApp" doesn't include the application-identifier and keychain-access-groups entitlements.

What I've tried:

  • Switching the provisioning profile from Manual to Automatic and viceversa
  • Cleaning up the Provisioning Profiles inside the Library/MobileDevices and then restarting Xcode
  • Deleting the old app from the iDevice and trying to build it again
  • Turning on and off the Background Modes (I don't have push notifications and In-app purchases)
  • Restarting the computer and the phone (just in case it was that easy)
  • Tried to change the Bundle Identifier
  • Tried to create another team and select that one instead
  • Creating a Project.entitlement empty file

None of this worked anyways, and it's so annoying that until now I could've simply click build the app and it would have built it on my phone

Am I maybe missing something?

L_Cleo
  • 1,073
  • 1
  • 10
  • 26

1 Answers1

19

Although this seems to be an issue with Apple, I've been able to find a temporary solution which has worked for me:

  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.

You should now no longer have the Automatic signing is unable to resolve an issue with the "Project" target's entitlements. error. Hopefully this helps!

shim
  • 9,289
  • 12
  • 69
  • 108
Zameer
  • 231
  • 2
  • 4
  • 1
    I really don't know how this could have worked, but it did. I can't even immagine how much it took you to find a solution like this so, thanks a lot! – L_Cleo Mar 14 '19 at 00:26
  • 1
    This prevents the signing error from occurring, however due to a certificate bug with Apple the AppID under the profile is still (null). Because of this, the error "App Installation Failed - the aplication could not be verified." then occurs. This *may* work for some projects that still have an AppID from a non-revoked profile. Bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1533655 – Bilfred Mar 14 '19 at 00:37
  • After these steps I am able to build my app but when I build into real device I am getting pop-up error: "iPhone has denied the launch request".. so not the best workaround – bezoadam Mar 14 '19 at 11:44
  • For those who have same problem with "iPhone has denied the launch request".. uncheck Debug executable option in scheme panel and it should work.. but then you can't use breakpoints etc.. – bezoadam Mar 14 '19 at 12:26
  • I am building WebDriverAgent project that comes with Appium tool. Here, we build "Integration App" and "WebDriverAgentRunner" targets. We are able to successfully build the former but not the latter. Also, no such entitlement file exist for the latter. Can you please help on this? – Ahamed Abdul Rahman Mar 15 '19 at 07:10
  • It worked. Not sure why/ how frankly but it solved it. If anyone understands how adding/ removing the keychain capabilities solves it, please share. – Franc Jun 13 '19 at 07:28
  • Did not work in Catalina on XCode 11.2.1 – ina Jan 27 '20 at 10:11