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
2
votes
2 answers

How to notify another device that a CloudKit record has been updated?

The CKSubscription documentation says: When a record modification causes a subscription to fire, the server sends push notifications to all devices with that subscription except for the one that made the original change to the record. Let's assume I…
Neal
  • 21
  • 3
2
votes
1 answer

CKSubscription with complex predicate

I am trying to use CKSubscription this way: NSArray *events = @[@1,@2,@3]; NSInteger myValue = 100; NSPredicate *predicate = [NSPredicate predicateWithFormat: @"(value > %@) AND (prev_value < %@) AND (event_type IN %@)", @(myValue),…
k06a
  • 17,755
  • 10
  • 70
  • 110
1
vote
1 answer

CloudKit subscription not working in production

Using a CKSubscription from CloudKit to listen for updates and changes on the database and receiving silent notifications works fine on Development but once in Production it doesn't work at all. Trying to save a CKSubscription on a CKDatabase using…
vicegax
  • 4,709
  • 28
  • 37
1
vote
1 answer

CloudKit, after reinstalling an app how do I reset my subscriptions to current status of records?

I'm dealing with the scenario, where a user has previously deleted the app and has now re-installed it. It was hitting my delta fetch function, which is receiving a lot of old subscription notifications, mostly deletes. But not downloading current…
Jules
  • 7,568
  • 14
  • 102
  • 186
1
vote
0 answers

Database Subscriptions - Do Not Disturb mode

Problem: I am not receiving subscription changes (notifications) to private and shared databases, when the device is in Do Not Disturb Mode (even when the app is in foreground). Note: When device is not in Do Not Disturb mode, I receive subscription…
user1046037
  • 16,755
  • 12
  • 92
  • 138
1
vote
2 answers

How to change badge count?

I’m using CKSubscription to send push notifications, I send them well and the device receives everything correctly, but my badge count is always +1 to what it was before? How can I set it to 0 after the app was run? I have added this code to func…
1
vote
1 answer

Encountering CKSubscription error: "Cannot create or modify field 'notif_num_subtitle_loc_args'"

So I’m running into a CloudKit error that only gets a single (1) Google result when I search for it. I get the error when running a CKModifySubscriptionsOperation to create an initial user’s CK subscription. The error is Cannot create or modify…
Epaga
  • 38,231
  • 58
  • 157
  • 245
1
vote
2 answers

Subscribing to record changes in sharedDB cloudkit

It seems CKQuerySubscription cannot be used for subscribing to shared DB changes in cloud kit. CKDatabaseSubscription neither works nor does CKSubscription How can I achieve subscribing to Shared DB changes? Simply. How can i achive a notification…
Dunes Buggy
  • 1,779
  • 1
  • 21
  • 41
1
vote
2 answers

How to create CloudKit subscription notification to fire on record attribute update?

I use CloudKit. I have a Channel record type which does have isLive as an attribute. It can be either 0 or 1 indicating if the channel is live. I want to send a notification to all users if the live status if a channel changes from 0 to 1. I tried…
1
vote
1 answer

CKQuerySubscriptions are not supported in a sharedCloudDatabase

I noticed that the docs mention that the newly introduced shared CloudKit databases do not support CKQuerySubscription (in earlier iOS versions these were called CKSubscription). So I guess that means that it is not possible to notify users when…
Zoef
  • 228
  • 2
  • 13
1
vote
0 answers

Unable to create a subscription: Error (type 11) indicates record type not found, even though it exists

I am trying to set up a Cloudkit subscription that sends me a notification, each time a new record of a certain record type is created. The code I am using to setup subscription is below. It is working on one device. If I create a new record on…
Smart Home
  • 801
  • 7
  • 26
1
vote
1 answer

How to send multiple columns of information using CKSubscription

I can get CKSubscription work using CKNotificationInfo() and CKNotificationInfo.alertBody. So I can send one piece of information. I'm trying to make CKSubscription send the user something like message, username, location, etc in a dictionary…
shle2821
  • 1,856
  • 1
  • 19
  • 26
1
vote
1 answer

CKSubscription returns error that query must have at least one firing mode when using FiresOnce

I have this code. Which works when creating a subscription with a firing mode of FiresOnRecordCreation... but getting error on FiresOnce.. the error is "Query Subscriptions must have at least one type of firing mode" My goal is that I have a photo.…
TravelNVal
  • 171
  • 12
1
vote
0 answers

CloudKit reference subscription requires CKReferenceActionDeleteSelf reference?

I've created a subscription for child record changes, based on a reference field to a parent record. When I create a child record and set the child's parent reference with a CKReferenceActionNone reference, the subscription does not generate a push…
Kevin Packard
  • 374
  • 4
  • 13
1
vote
1 answer

CKSubscription to creatorUserRecordID never arrives

I create CKSubscription using the following code: NSPredicate *predicate2 = [NSPredicate predicateWithFormat:@"(creatorUserRecordID == %@)", self.myRecordId]; CKSubscription *subscription2 = [[CKSubscription alloc] …
Wojtek
  • 1,006
  • 11
  • 30