hi,
in my app, i have created and pushed CKRecords to the public database. others using the app have pushed CKRecords as well.
is there any way i can query iCloud for "all the CKRecords that i created?"
thanks,
DMG
Every CKRecord
has a creatorUserRecordID, and so you can use it to fetch the records with a certain user record ID:
let predicate = NSPredicate(format: "creatorUserRecordID == %@", yourUserRecordID)
let query = CKQuery(recordType: yourRecordType, predicate: predicate)
You can retrieve the user record ID of the current user using fetchUserRecordID(completionHandler:).
Best,
——
Ziqiao Chen
Worldwide Developer Relations.