如何在共享数据库上执行更改时从CKDatabaseNotification获取CKRecord信息?

时间:2017-08-16 11:04:05

标签: ios swift cloudkit

这是我在更改一个属性时从服务器收到的CKNotification(fromRemoteNotificationDictionary: userInfo)

[AnyHashable("aps"): {
    "content-available" = 1;
}, AnyHashable("ck"): {
    ce = 2;
    cid = "iCloud.pl.blueworld.fieldservice";
    met =     {
        dbs = 3;
        sid = "E93874B3-53B4-4CD7-83A0-157DDE3B1094";
        zid = fieldservice;
        zoid = "_c42e727205f9a1c05eab6df6298d51ca";
    };
    nid = "46a3d259-11c5-4212-9bef-b9aef4ea5bf8";
}]

我可以快速创建对象:

{
    "myDay": "Sun",
    "mytDate": "16/07/2017",
    "myRows": [{
        "myId": 1,
        "myTime": "11:00",
        "myNotesCount": 1
    }],
    "myHours": 110
}

但是现在如何才能收到其记录ID?我需要在UI上执行更改,但需要知道哪些对象已被更改。

0 个答案:

没有答案