12
votes

today I finally got my Company-Developer-Account. I'm working on an App, first on my private Account and today I wanted to move the App to the company account. So I created a new Bundle-Identifier on developer.apple.com and changed the Bundle-Identifier also in my Xcode-Project. Furthermore, I've added the Account to Xcode, changed Signing to my new Company Account and let Xcode fix the Provisioning-File-Troubles. (In Xcode I see two Team-Members from one Account, one is Agent, the other User. Maybe it's important that I've choose the Agent-Team-Member. Unfortunately I can't change because then I get the error "change to a unique bundle-id, because the bundle-id is already on the Agent-Team?^^) Running with the Simulator works fine, but when I want to test on my Phone I get the following Error: The entitlements specified in your application’s Code Signing Entitlements file are invalid, not permitted, or do not match those specified in your provisioning profile. (0xE8008016).

If I press the I next to the provisioning file, I see the following Entitlements: enter image description here

And under Entitlements I've just the Push-Notifications enabled. But this was like this before changing Bundle Identifier

5
I recommend not to use Xcode's auto fix feature. Do it manually. Check your provisioning profile is matching with the capability you set in your project such as iCloud and Push Notifications.Ryan
Hmmm ok I've changed but I can only select the XC iOS: ... Profile for Debug and Release, not the iOS Team Provisioning Profile which is the Debug-Profile I think. Still the same errorStephan Boner

5 Answers

55
votes

I had this same problem and none of the solutions I found on stack overflow, or github worked for me.

Here's my solution:

  1. Select your project in the Project navigator enter image description here

  2. Select the "General" tab.

  3. To the left of the "General" tab, select your target to the left; (this should show a dropdown with a list of targets)
  4. Below your current target you should see an item {your project}Tests; select that.
    1. Check the signing properties in the general tab and make sure they are valid.

This was the problem for me. Hope it helps.

3
votes

Xcode 9 GM. Error appears if manual signing turned on.

Turn on automatic code signing. Turn off automatic code signing.

1
votes

You need to go through all the details where your provisional profile and certificate getting set from the main page.

E.g. In all targets - > Build settings -> Code signing identity and provisinign profile and set your correct profiles every where in the application.

sometimes when you are selecting manual codesigning then it is not reflecting correcly in all places.

0
votes

Try to uninstall your application from your device and then run your app on Xcode , i think that current app that was on your device signed with old account so you cannot run your new app that was assigned with new account , hope to help .

0
votes

For me, I ended up getting this error when I did not have the private key associated with the certificate that was being used to sign the app. Make sure you open Keychain Access and verify that you have a private key for the certificate that is associated with your provisioning profile.