Reputation: 1063
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!
Upvotes: 3
Views: 2927
Reputation: 1063
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.
Upvotes: 0
Reputation: 10492
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.
Upvotes: 3