CloudKit - Invalid bundle ID for container
There was a bug causing some associations to be missed. That bug has been fixed and we automatically fixed the container/app associations that were broken during that time.
If for some reason you still need to redo an association you can either use the Capabilities pane in Xcode or use developer.apple.com -> Certificates, Identifiers & Profiles -> App IDs -> pick the ID -> Edit -> Edit under iCloud -> check the box for the container to disassociate, save, then re-associate.
If you're still stuck please email cloudkit[at]apple.com
Getting Invalid bundle ID for container error when using NSPersistentCloudKitContainer
This is how I solve the issue.
I was referring to this answer - CloudKit - "Invalid bundle ID for container"
What I did wrong was
I deleted my app id from https://developer.apple.com/account/resources/identifiers/list
I rerun the app via Xcode, and expecting the app id will be created automatically. But it doesn't. The app id will not be automatically created even if I run the app from Xcode.
So, what I did right was:
I create a new project with a new app id, and using a new iCloud container id too.
I launch the app for the first time.
From https://developer.apple.com/account/resources/identifiers/list, I click on the app id as shown in the following screenshot.
I untick and tick the checkbox for iCloud, click Save button in the top right.
Now, I can observe the data is being saved to iCloud. I have verified by uninstalling the app, installing the app and performing read. There isn't any issue of reading the old data.
Can't access any data from my `CKContainer` from a app extension - CloudKit, Swift
Apple seems to have fixed it on their side!
Thanks for the help anyway :)
CloudKit Permissions Failure
This probably should be a comment, but I don't have enough reputation to comment, so I am putting it here. I think there is a problem with CloudKit right now - see this thread: https://forums.developer.apple.com/thread/49003.
When I search for CloudKit and limit the results to the last 24 hours, the only results that come up are errors...
How do I access iCloud Container data from an app with a different Bundle Identifier?
If you have selected the correct container in the entitlements, then just make sure when you set your CloudKit Container in code from within My App Feedback that you are specifying the correct one:
let container = CKContainer(identifier: "iCloud.com.myDomain.My-App")
and not either of these:
let container = CKContainer(identifier: "iCloud.com.myDomain.My-App-Feedback")
let container = CKContainer.default() //This should work, but might be using the wrong one
You could confirm which container is being selected by printing it to the console when it gets instantiated. Hopefully that helps.
Add the “iCloud containers” entitlement to your App ID
I was having the same problem couple of days ago. Fixed it by doing these steps:
- Go to your developer account
- Find the App ID you are working on
- Click edit.
- On the iCloud section select the radio button that says "Include CloudKit support (requires Xcode 6)"
Worked for me.
Xcode not creating default container for iCloud and CloudKit: Add the iCloud containers entitlement to your App ID fails
I just went through this and fixed it by generating a new development provisioning profile and downloading it using Xcode (Preferences -> Select Account -> View details -> Download)
When the App ID changes, the existing development provisioning profile is invalidated.
Once you create a new development provisioning profile and import it, the error should disappear.
Related Topics
Swift: Google Maps Draw Waypoint Polyline
How to Declare Exponent/Power Operator with New Precedencegroup in Swift 3
Sort Dictionary Keys by Value, Then by Key
Cast to Different C Struct Unsafe Pointer in Swift
Swift: Generic Overloads, Definition of "More Specialized"
Swift Firebase Storage How to Retrieve Image with Unknow Name(Nsuuid)
How to Set Scrollview Content Size in Swift 3.0
Swiftui - How to Change Text Alignment of Label in Toggle
How to Scale/Position Nodes Swift Spritekit? Custom View
Display Table View When Searchbar (From Searchcontroller) Begin Edited Swift
Dismiss View from View Model [Modal Page]
Swift 4.2 - _Shared Attribute Near Type
How to Save a Custom Class as an Attribute of a Coredata Entity in Swift 3
Hittest Prints Ar Entity Name Even When I am Not Tapping on It
Swift Firebase Check If User Exists