CloudKit-“容器的无效捆绑包ID” [英] CloudKit - "Invalid bundle ID for container"

查看:125
本文介绍了CloudKit-“容器的无效捆绑包ID”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在Xcode 9 beta 6中创建了一个项目,并添加了以下代码:

let privateDB = CKContainer.default().privateCloudDatabase
let greatID = CKRecordID(recordName: "GreatPlace")
let place = CKRecord(recordType: "Place", recordID: greatID)

privateDB.save(place) { (record, error) in
        if error != nil {
            let er = (error as! CKError).errorUserInfo
            print("Error: \n")
            print("CKErrorDescription: \(er["CKErrorDescription"]!)\n")
            print("ContainerID: \(er["ContainerID"]!)\n")
            print("NSDebugDescription: \(er["NSDebugDescription"]!)\n")
            print("NSUnderlyingError: \(er["NSUnderlyingError"]!)\n")
            print("NSLocalizedDescription: \(er["NSLocalizedDescription"]!)\n")
            print("ServerErrorDescription: \(er["ServerErrorDescription"]!)\n")
        }
        if record != nil {
            print("record: \(record!)")
        }
 }

并添加此功能:

,当我运行代码时,我收到以下错误消息:

我在做什么错了?

推荐答案

存在一个错误,导致某些关联丢失。该错误已得到修复,我们会自动修复在此期间中断的容器/应用程序关联。

如果由于某些原因您仍然需要重做关联,您可以使用Xcode中的功能窗格,也可以使用developer.apple.com->证书,标识符和&个人资料->应用程序ID->选择ID->编辑->在iCloud下编辑->选中要取消关联,保存然后重新关联的容器的框。

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.

如果您仍然遇到问题,请给cloudkit发电子邮件至apple.com

If you're still stuck please email cloudkit[at]apple.com

这篇关于CloudKit-“容器的无效捆绑包ID”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆