我有一个OUP
记录类型,它有一个记录类型的.DeleteSelf
引用OU
。
如果我只是设置一个无条件订阅,那就行了:
let subscriptionOUP = CKSubscription(recordType: "OUP", predicate:NSPredicate(value: true), subscriptionID: "oup", options: .FiresOnRecordUpdate)
但条件方式不是:
let ekf = "oup-\(ou.recordID)"
let pr = NSPredicate(format: "ou = %@", CKReference(recordID: CKRecordID(recordName: organizationUser.recordID), action: .DeleteSelf))
let subscriptionOUP = CKSubscription(recordType: "OUP", predicate:pr, subscriptionID: ekf, options: .FiresOnRecordUpdate)
println("\(pr) \(ekf)")
终端内容:
ou == <CKReference: 0x1558d3d0;51D56239-D68C-4E12-BD23-E4DCEF5721B7:(_defaultZone:__defaultOwner__)>
oup-51D56239-D68C-4E12-BD23-E4DCEF5721B7
我的谓词或订阅 ID 有什么问题?