所以我遇到了一个 CloudKit 错误,当我搜索它时只能得到一个 (1) Google 结果。运行 CKModifySubscriptionsOperation 以创建初始用户的 CK 订阅时出现错误。错误是
Cannot create or modify field 'notif_num_subtitle_loc_args'
我很确定这曾经可以工作,所以这可能是 iOS 10.3 或 CloudKit 内部的东西?
这是我用于创建订阅的代码:
let subscriptionID = "MindscopeDownload"
let predicate = NSPredicate(format: "TRUEPREDICATE")
let options: CKSubscriptionOptions = [.firesOnRecordCreation, .firesOnRecordUpdate, .firesOnRecordDeletion]
let subscription = CKSubscription(recordType: "MindscopeNode", predicate: predicate, subscriptionID: subscriptionID, options: options)
let info = CKNotificationInfo()
info.alertLocalizationKey = "Mindscope entry changes"
info.shouldSendContentAvailable = true
subscription.notificationInfo = info
let op = CKModifySubscriptionsOperation(subscriptionsToSave: [subscription], subscriptionIDsToDelete: [])
op.modifySubscriptionsCompletionBlock = { (foo, bar, error: Error?) -> () in
if let e = error {
print("Failed to modify subscription: \(e)
这是遇到同样问题的人的谷歌结果:https ://forums.developer.apple.com/thread/76893