I have a CKSubscription running under TvOS that is returning this user info object, when the subscription fires, which is great. But how am I meant to parse this in Swift, surely not by crafting my own parsing routine?
userInfo [ck: {
ce = 2;
cid = "iCloud.blah";
nid = "be5a3f8d-blah-blah-blah-813544059695";
qry = {
dbs = 2;
fo = 2;
rid = "807524B0-blah-blah-blah-8E60519B6D56";
sid = "037E27BA-blah-blah-blah-366959FF49DA";
zid = "_defaultZone";
zoid = "_defaultOwner";
};
}]
My question, somewhat basic forgive me. Interested in the rid, which is the RecordID.
Is no library to parse this information out? If I craft my own code; it will break in the next release of iOS.
Sorry everyone; spend two hours looking, posted this; and then found the answer here.. an excellent post on the subject.
https://www.invasivecode.com/weblog/advanced-cloudkit-part-iii
Here is the code ...
Posting it cause it was difficult to find and may be useful to others facing the same challenge in the future.