Invalid bundle ID for container.

When I using CloudKit building a new project , the terminal show Error: "Invalid bundle ID for container"

Is like:

	com.apple.coredata.cloudkit.zone:__defaultOwner__ = <CKError 0x600003fdb450: "Permission Failure" (10/2007); server message = "Invalid bundle ID for container"; op = D2458C0576668CDD; uuid = 3C6F5D74-6617-4515-852B-A4EC1569DC19>

Has anyone else had this problem?

The environment is Xcode 13 / iOS 15 / Simulater.

When you initialize your CKContainer, are you using "default()", or are you passing it a bundle identifier?
Can you share the code?

I could resolve this by completely removing (i.e. deleting) the App ID from the developer account. I have singing and certificates managed by XCode and this somehow got messed up. Deleting the App ID made XCode regenerate everything and not it's fine.

(For context: This was on XCode 13 with targets set to iOS 15 and macOS 12.)

Invalid bundle ID for container.
 
 
Q