Can't get CloudKit to load data on cloud

The app works on a local db but when I try to make it work with iCloud I get errors that I don't understand.

CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(1247): <NSCloudKitMirroringDelegate: 0x10664c200>: Failed to set up CloudKit integration for store: <NSSQLCore: 0x106688140> (URL: file:///var/mobile/Containers/Data/Application/20EF350F-F0FA-4132-97DA-61B60AADB101/Library/Application%20Support/default.store) <CKError 0x109430e40: "Partial Failure" (2/1011); "Failed to modify some record zones"; uuid = 82ED152A-D015-414D-BB79-AF36E5AF4A8B; container ID = "iCloud.se.Grindegard.MinaRecept"; partial errors: { com.apple.coredata.cloudkit.zone:defaultOwner = <CKError 0x109431230: "Permission Failure" (10/2007); server message = "Invalid bundle ID for container"; op = E56A3CDA393641F8; uuid = 82ED152A-D015-414D-BB79-AF36E5AF4A8B> }>

what can be wrong?

This is most likely a CloudKit configuration issue, and was discussed in this post.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

I followed the instructions but I didn't understand "Refresh your provisioning profile". Carried on but I didn't work.

I can read if it still doesn't work I should do this.

"If the portal shows that the association between your CloudKit container and app ID is correct, but the error still exists, it is most likely because the association isn’t synchronized to the CloudKit server. In that case, consider using a new CloudKit container to continue your development."

are there some nameconventions that I should know or can a name it to whatever I like? now I had my bundle identifier with a starting name before iCloud.se.Grindegard.MinaRecept

If you are using Automatically manage signing in Xcode, unchecking the box and then checking it back (and picking the team again) tell Xcode to refresh the provisioning profile. If you manually manage the provisioning profile, generate the provisioning profile in the developer portal, download it to your development Mac, and then double click it to install it to the right folder.

Regarding name conventions, Xcode will add "iCloud." prefix for you, if the name you input doesn't have that. Also, avoid using something like "apple.com" as they are reserved.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Can't get CloudKit to load data on cloud
 
 
Q