Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

xcode - iCloud set up and provisioning

I am trying to set up iCloud within my iOS application, I have done the following:

  1. Removed all old certs on mac.
  2. Added iCloud to the App in Dev Console - created new container and added to app
  3. Redone the dev provision and downloaded
  4. Installed the provision
  5. Added the iCloud Entitlement to the app

And this is where is all goes wrong...

I can't get the app running again, the app is building but I am getting an error saying:

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

(0xE8008016).

Any ideas??

UPDATE: I have managed to be able to run the application to get everything programmed and put in place, everything is set up iTunes Connect end, all provisions are valid and sync'd.

Now I am getting errors during validation...

There are 4: Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported by iOS. Specifically, key 'com.apple.developer.icloud-container-identifiers' in Payload ------- not supported

Other 3 are similar for other containers!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Maybe it's a late comment, but I post it here in case that somebody is struggling for the same reason.

I encountered this issue on Xcode8 recently when I was trying to archive. Generally, I enabled iCloud with Xcode in following steps:

  1. Enable iCloud inCapabilities panel in my target by setting the toggle to ON.
  2. Check iCloud under my App Identifier in Member Center turns green automatically, and a iCloud container is created automatically with my App Identifier. (Apple's system does this for us.)
  3. Regenerate my certificate with my App Identifier.
  4. Create a new provisioning profile.
  5. Download and install the new certificate and provisioning profile
  6. Select the new provisioning profile in Signing(Release) section in General panel in my target.

Then I got errors like:

Provisioning profile "iCloud Test" doesn't include the com.apple.developer.ubiquity-container-identifiers, com.apple.developer.icloud-container-identifiers, and com.apple.developer.icloud-services entitlements. Code signing is required for product type 'Application' in SDK 'iOS 10.1' Code signing is required for product type 'Application' in SDK 'iOS 10.1'

At last I found that there were two options in iCloud section under my App Identifier in Member Center. By default, the Compatible with Xcode 5 was selected, but I succeeded by selecting the other option.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...