3
votes

I have updated and rebuilt my app with a new provision profile that was configured with "Enable for iCloud" checkbox selected in the provision portal.

Next, in XCode, for the app project, I selected the box for "Entitlements" in Targets->Summary->Entitlements as shown below to support iCloud. However, as soon as I add this, I am unable to build the application as I get the dreaded warning: Application failed codesign verification. The signature was invalid, or it was not signed with an iPhone Distribution Certificate. (-19011)

The app builds successfully with NO codesign errors and installs onto hardware with the proper provisioning profile when the "Enable Entitlements" is unchecked. As soon as I check it, it gets the codesign error.

I also tried updating the entitlements file with ABCDEF.com.myapp (with my real iCloud ID and app id) for the com.apple.developer.ubiquity-container-identifiers value.

What am I doing wrong? Any help is greatly appreciated!

enter image description here

2
You mention having a provisioning profile in the question title, is this a development profile or a distribution profile? The error seems to specify that you're missing a distribution profile.Mark Adams
I have a distribution profile.MStudios
You also have a distribution certificate that's up to date in your keychain I presume?Mark Adams
Yes, I re-verified I had the dist cert and dist profile by deleting them, re-downloading them both and adding them back to the project. Same error still.MStudios

2 Answers

3
votes

Btw, I wrote a blog post with a solution which could be helpful.

You may try to copy and paste the <dict> of key entitlements from your provisioning profile to your.entitlements (a plist) file.

iCloud Gotchas

0
votes

Finally, I found the solution. It ended up being a Apple Provisioning Portal issue.

Even though I followed these steps: 1. Selected "Enable for iCloud" for the App ID 2. Created(regenerated) a new provision profile that was configured for the respective "Enable for iCloud" app 3. In XCode, for the app project, I selected the box for "Entitlements" in Targets->Summary->Entitlements as shown below to support iCloud.

The build error still persisted. So, I looked at the Prov Prof with an editor and the entitlements were NOT in there even though I just generated a new one.

What I found was after about 1 week, surprise!, if I generated the Prov. Profile now it had the entitlements in it! So, there was a delay before the generation of the PP's would pick up the iCloud entitlements. Also I filed this issue with Apple so they are aware of this strange delay.