iCloud set up and provisioning
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:
- Enable iCloud in
Capabilities
panel in my target by setting the toggle to ON. - 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.) - Regenerate my certificate with my App Identifier.
- Create a new provisioning profile.
- Download and install the new certificate and provisioning profile
- Select the new provisioning profile in
Signing(Release)
section inGeneral
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.
After submitting a report to Apple, it turns out that Apple systems are useless AGAIN!
Ok, so if you are creating a NEW application or you are only just adding iCloud to your application - you will need to make sure the system doesn't pick up or create a iOS8 cloud container!
If it does you need to remove it from your app entitlements file, remove the selected containers in the Apple Developer Console and re-download certs again!
Thanks Apple again!
I got blamed for using pre-released software! I haven't touch Xcode 6 yet!!!
If you're just adding iCloud to an app for the first time or want to upgrade to use CloudKit after using an older iCloud container:
- Go to the Apple Development Center.
- Choose Certificates, IDs & Profiles.
- Use the dropdown on the top left to switch between iOS/tvOS/watchOS or macOS
- Choose App IDs under the Identifiers section.
- Choose your app from the list.
- Scroll down to iCloud and make sure it is enabled with a green dot.
- If it's not enabled or has a yellow dot, click the button at the bottom of the page to Edit and make sure you've checked iCloud service.
- You may also need to create a container under the iCloud Containers section then associate it with this app.