Questions tagged [cksubscription]

Use a CKSubscription object to track changes occurring on the server. A subscription acts like a persistent query on the server that can track the creation, deletion, and modification of records. When changes occur, they trigger the delivery of push notifications so that your app can respond appropriately.

Use a CKSubscription object to track changes occurring on the server. A subscription acts like a persistent query on the server that can track the creation, deletion, and modification of records. When changes occur, they trigger the delivery of push notifications so that your app can respond appropriately.

73 questions
1
vote
0 answers

CKSubscription User Record Update

I would like to send a notification when the User Record is updated. Is this possible as the User Records are a different type of record in CloudKit? Thanks
Tom Coomer
  • 6,227
  • 12
  • 45
  • 82
1
vote
1 answer

CKSubscription not working

I am creating my two CKSubscriptions in my App Delegate's didFinishLaunchingWithOptions method as such. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for…
user2284295
1
vote
1 answer

How to check CKAsset changes with CKSubscription?

How do you check whether an image stored with CKAsset has changed in CloudKit? CKNotification doc says about desiredKeys: You can include a maximum of three keys in the array. For the keys you specify, the allowable values are NSString, NSNumber,…
János
  • 32,867
  • 38
  • 193
  • 353
1
vote
1 answer

Is it a way to get notification with CKSubscription that a user started to use app?

I need to know when a user started using app. I know I can set up CKSubscription for arbitrary record type, but it seems that for Users it does not work. CKSubscription(recordType: "Users", predicate: NSPredicate(value: true), options:…
János
  • 32,867
  • 38
  • 193
  • 353
1
vote
1 answer

How is it possible that CKQueryNotification reason is RecordUpdated but recordFields is nil?

println("queryNotification.recordFields.keys: \(queryNotification.recordFields?.keys)") I do not catch how it this log possible? If I get a notification that record was updated, than I need at least one field that was changed, isn't it? Btw I am…
János
  • 32,867
  • 38
  • 193
  • 353
1
vote
1 answer

Conditional CKSubscription does not trigger notification

I have a OUP record type, and it has a .DeleteSelf reference to a OU record type. If I just set up an unconditional subscription, that works: let subscriptionOUP = CKSubscription(recordType: "OUP", predicate:NSPredicate(value: true),…
János
  • 32,867
  • 38
  • 193
  • 353
1
vote
1 answer

"CKSubscriptionTypeRecordZone subscriptions are incompatible with subscription options 7" when creating a subscription

I'm trying to use the following code to create a CloudKit subscription: let container = CKContainer.defaultContainer() let database = container.publicCloudDatabase let recordZone = CKRecordZone.defaultRecordZone() let subscription =…
Undo
  • 25,519
  • 37
  • 106
  • 129
0
votes
1 answer

Cloud kit: how to get public database subscription notification from your group of contacts only

I have CKRecord for Location details in the public database. I want to create a subscription for a CKrecord with location details, stored in the public database. I want to set subscription so I get notification from those that are in my contacts…
vrao
  • 545
  • 2
  • 12
  • 33
0
votes
1 answer

AppDelegate method is only called from a notification when the app is already open

I'm trying to have a push notification take the user to a specific view controller when pressed on it. I currently have this in my AppDelegate: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions:…
Kevvv
  • 3,655
  • 10
  • 44
  • 90
0
votes
1 answer

CKQueryNotification.recordID: unrecognized selector sent to instance

I'm trying to set up silent push notifications to propagate local notifications across devices using CloudKit and I can't wrap my head around why my app is crashing every time I receive a remote notification. Everything works just fine until I try…
0
votes
1 answer

How to use database subscriptions correctly when using CloudKit sharing

I'm working through how to handle CloudKit sharing and database subscriptions and I need help understanding how Apple envisions us using subscriptions and CloudKit sharing together given the properties and delegate methods we have available. This…
Brian M
  • 3,812
  • 2
  • 11
  • 31
0
votes
1 answer

How to Use CKNotification?

I want to be notified when the value changes on cloudkit this is my code: let now = Date() let timeInterval:TimeInterval = now.timeIntervalSince1970 let timeStamp = Int(timeInterval) let publicDB = CKContainer.default().publicCloudDatabase …
0
votes
1 answer

Do I need to delta fetch CloudKit changes as well as subscriptions?

I'm trying to implement CloudKit subscriptions. Previously I just fetch from a custom zone using CKServerChangeToken when my app starts and at key points in my app. My setup purely uses a private database. I'm just wondering if I still need to do…
Jules
  • 7,568
  • 14
  • 102
  • 186
0
votes
1 answer

Subscriptions with CKShare

I am new to subscriptions and Cloudkit and I am trying to setup subscriptions to send a push notification whenever CKShare records are created, edited, deleted, as well as when a participant leaves the share for both the private and shared database.…
ACerts
  • 308
  • 1
  • 6
  • 22
0
votes
0 answers

CloudKit Subscription With Multiple Comparisons

I'm trying to create a subscription for CloudKit Notifications but I can't seem to get the predicate right. Simple notifications, with just a one comparison predicate show up, so the payload is configured correctly, but If I make the predicate a…
Alejandro
  • 367
  • 3
  • 10