CloudKit - “Invalid bundle ID for container”

不想你离开。 提交于 2019-12-06 04:56:21

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

My friend and I are having the same issue. We made 2 different projects and both of them had the same error message "Invalid bundle ID for container" which is CKError case 10 .

We are calling our fetch function to get the default "Users" record in the viewDidLoad.

func fetchWorkoutCompleted(completion: @escaping (Error?) -> Void = { _ in }) {
    cloudKitManager.fetchRecord(ofType: "Users", sortDescriptors: nil) { (records, error) in
        if let error = error {
            print(error.localizedDescription)
            completion(error)
            return
        }
        guard let records = records else { completion(nil); return }
        completion(nil)
    }
}

Having same issue on CloudKit:"Invalid bundle ID for container", and Dave helped to fix and back to business!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!