10
votes

I'm trying to do ad hoc distribution. When I use XCode, the application installs fine on my phone.

In preparation for ad hoc distribution, I created the default entitlements file, unchecked the get-task-allow box, added the entitlements file name to the code signing entitlements line, and tried to install on my phone.

If I have the file in the entitlements in build settings, I get the (dreaded) error

The entitlements specified in your application's Code Signing Entitlements file do not match those specified in your provisioning profile.

(0xE8008016).

This ONLY happens if I have the entitlements file listed in the code signing section.

I created a brand new application to test this, to see what could have gone wrong and this happens with a completely new test application (so it doesn't seem like clean builds, opening and closing XCode, etc will help).

What am I missing? I've read all of the other times this has occurred and nothing seems to apply.

14

14 Answers

2
votes

I've made it! The reason is you got wrong Certificates! If you're using development Certificates, you can't use the distribution Certificates.

2
votes

You need to follow these steps

  • Have you changed the bundle identifier in your project's info.plist???

Please make sure that this also matches with your provisioning profile's identifier.

  • go to your projects info. select the configuration you want your build to be deployed then check in build settings that you have added the dist.plist file and the provisioning profile is the same thta you need to run with.

  • If you are making the build for distribution then set the get-task-allow mark as unchecked

Hope this helps.

2
votes

Do the following steps:

  1. Remove the provisiong file from the Xcode -> Organizer
  2. Download again from your developer account. Make sure that you have downloaded profile from distribution tab.
  3. Drag and drop that profile to Xcode
  4. Change the bundle identifier of your plist that match with your provisioning profile App ID.
  5. Go to application setting target and active target and choose your profit from there.
  6. Now rebuild and run the app.
1
votes

It's also worth noting that this problem may be rooted in trying to install properly authored programs on Jailbroken devices. At least in my case, all my development units and I kept getting this error. By adding the get-task-allow BOOL type to a Entitlements.plist file, I still got the error but the files were installed on the devices (live debugging doesn't work though).

1
votes

Have you checked that the Code Signing Identity values under Project > Build Settings and Targets > Build Settings are correct?

1
votes

I found I had to add the new device I was testing on to my Provisioning Profile, on the IOS Provisioning Profile Site.

1
votes

I had not agreed to the new updated licensed agreement from apple.

Briefly : Please log in to your developer's account -> profile's -> review -> read the agreement or get your lawyer read it for you -> agree (at your own will) -> and again click profile's to check the status of your profile.

In my scenario the valid code signing entity was not showing up. When i followed the above procedure it was visible and i was able to run the app on the device and/or create the iPA file without much difficulty.

1
votes

For what its worth, I had this issue with one app but not another. Seems the "Provisioning Profile" in Target->BuildSettings->Code Signing had to be set to "Automatic". If you selected one of the ones in the list it failed with this error.

0
votes

me too got this type of error, i resolved this by deleting current Entitlement.plist and adding new Entitlement.plist. Because the project i was trying to run was build on 3.2 sdk and current i am using 4.2. That was the only reason i was getting error

0
votes

It seems this error code is used for many situations. In my case, the problem started to happen after we set our DataProtectionClass to NSFileProtectionComplete. I'm not sure of the fix yet.

0
votes

Removing the entitlement wasn't and option for me as I wanted to use "iCloud", so after digging a little I found that the problem was that "iCloud" not being enabled on the app configuration on the "iOS Provisioning portal".

Enabling it and regenerating the provisioning did the trick for me.

0
votes

My issue was that the Distribution Profile was created as Ad hoc rather than In House making the device I was running the app on not accept it.

Make sure that the device is added to the Provisioning Profile or create an Enterprise Profile.

Developer Apple Pages

0
votes

Another pitfall while trying to correct this error: you'll also need to replace provisioning profiles from embedded extensions.

In my case, the provisioning profile of my iOS app was just fine. It took me hours to figure out that the provisioning profile of my widget (or Today Extension) needed an update, due to a new device to test on.

Make sure you check all relevant and related targets, not only the target you're trying to execute.

0
votes

Go to Target -> Capabilities - > Associated Domains

Press Fixed issue Button

Run Project