swifticloudcloudkit

Xcode not automatically adding CloudKit containers


I have added cloudkit to an existing app and I'm having a little trouble with xcode not automatically creating Containers when adding iCloud capability to Signing & Capabilites. It looks like this:

enter image description here

What can be the problem here? I have followed the guide on Apples page: https://developer.apple.com/documentation/coredata/mirroring_a_core_data_store_with_cloudkit/setting_up_core_data_with_cloudkit

And when archiving the app I get the following error: enter image description here


Solution

  • It was solved by creating a new container in xcode, quite simple. And now everything works! Just press the plus as seen below and give it a name, preferably same name as the bundle identifier but starting with icloud: icloud.com.developerName.projectName

    enter image description here