I moved an existing app to Xcode 14 Beta and I get this error:
MyApp[33596:267791] [CK] Invalid value of "(null)" for entitlement "com.apple.application-identifier" or "com.apple.developer.associated-application-identifier" on process "MyApp(33596)". We expect TEAMID.BUNDLEID, and insist that TEAMID is exactly 10 characters long, consisting of [0-9][A-Z]. This is a permanent issue, and access to CloudKit will be denied until this is resolved
I also found that if I use Xcode 14 Beta, create a new project, and simply add these lines of code I get the same error.
import CloudKit
init() {
_ = CKContainer.default()
}
Is this a bug in Xcode 14 Beta? Is there something I need to do to get this working? Has anybody gotten CloutKit to work with Xcode 14 Beta?
OK, this works when I create a new project as long as I have CloudKit enabled in the iCloud capabilities. I still have this problem with my existing app even with CloudKit enabled.
Check your entitlements file and see what the iCloud Container Identifier is. It needs to be
iCloud.$(CFBundleIdentifier)
. It should start withiCloud.
After looking into this some more, I found that if I use Xcode 14 Beta to create a new multi platform app as described above with just those 4 lines of code added, it will work fine on a device, but will crash when using a simulator. It still works fine under Xcode 13. I file bug report FB11354609.