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
3
votes
1 answer

CloudKit subscriptions not saving on iOS10

I'm following the 'CloudKit Best Practices' WWDC talk about adding subscriptions, which seems to have changed in iOS10. The code below returns a 'Success!', however my 'AllChanges' subscription never appears in Subscription Types on CloudKit…
William Robinson
  • 1,038
  • 17
  • 32
3
votes
1 answer

CloudKit Receive Multiple Notification on Record Creation

I am adding subscription to a Cloud Kit record type with FireOnCreation. In the appDelegate, I used the didReceiveRemoteNotificationWithCompletionHandler to catch the notification. The issue I am having is when a record is created matching the…
HioChao
  • 215
  • 1
  • 7
3
votes
1 answer

Struggling to Understand CKSubscriptions in CloudKit

I've been reading about and trying to use the CKSubscription feature for weeks, but I can't find info about some general questions. I've read Apple docs, online tutorials, books I bought, and questions here on SO, but I still don't understand the…
Renee Olson
  • 267
  • 1
  • 15
3
votes
2 answers

CloudKit Modify Existing CKSubscription

An existing CKSubscription that has been saved to publicDatabase cannot be modified directly, can it ? Looking at class documentations, it can only be deleted, and a new CKSubscription with new behavior can then be created. Is this correct ? Thanks
Lydon Ch
  • 8,637
  • 20
  • 79
  • 132
3
votes
2 answers

Is there a way to debug two iOS devices on the same Mac?

I guess it is not possible from the same Xcode, but via opening Xcode multiple times? Or any other trick? I am testing CKSubscription and CloudKit communication between them.
János
  • 32,867
  • 38
  • 193
  • 353
2
votes
0 answers

CloudKit server sends push notification to max. 500 devices

I've released the app with push notifications based on insert in CloudKit public database. Everything was fine during TestFlight tests – devices received notifications (inluding my own). After App Store release I've noticed that none of the…
2
votes
2 answers

Sequential Network Requests in Swift 3

I have multiple network requests that need to happen in sequential order. They must wait until the previous has finished and received its response from the server. Right now I have a callback pyramid of death. Is there a more automated way of doing…
2
votes
1 answer

CloudKit Subscription Woes

I am struggling with the following subscription: let predicate = NSPredicate(format: "gc_alias != %@ AND distanceToLocation:fromLocation:(%K,%@) < %f", self.localPlayer!.alias!, …
Genericrich
  • 4,611
  • 5
  • 36
  • 55
2
votes
0 answers

CKSubscription error

Hi I'm trying to save a subscription to iCloud, I'm using this code : func setupCKSubscriptions(){ if NSUserDefaults.standardUserDefaults().boolForKey("sub") == false{ let subscription = CKSubscription(recordType: "Quadri", predicate:…
user5303808
2
votes
0 answers

CloudKit reads notifications generated by same device

When applicationDidBecomeActive(application: UIApplication) is called, I check the unread CloudKit notifications because sometimes not all are sent to a device from CKSubscription, especially when there is a lot of low power/bad internet. I have…
Maximilian Litteral
  • 3,059
  • 2
  • 31
  • 41
2
votes
1 answer

How to test that silent notifications are working in iOS?

I have a program using subscriptions with silent notification: let predicate = NSPredicate(format: "recordID == %@", CKRecordID(recordName: "ListName")) let silentNotification = CKNotificationInfo() silentNotification.shouldSendContentAvailable =…
Armand Grillet
  • 3,229
  • 5
  • 30
  • 60
2
votes
1 answer

Can I use subscriptions in my app using CloudKit when user is not logged into iCloud?

Curious wether if user is not logged in can it prevent usage of subscription notifications?
János
  • 32,867
  • 38
  • 193
  • 353
2
votes
1 answer

How to update all client records from CloudKit?

My app stores locally all the records that CloudKit stores. So it is not the big data small phone concept, but all data server - all data client concept. I need all the updates from time to time when app launches again. Should I set up for all…
János
  • 32,867
  • 38
  • 193
  • 353
2
votes
1 answer

CloudKit, remote-notification, and aps-environment

In setting up CloudKit remote notifications, I enabled the "Remote notifications" capability which adds the remote-notification field to my Info.plist. But then I get this error in the console: Error Domain=NSCocoaErrorDomain Code=3000 "no valid…
Richard Venable
  • 8,310
  • 3
  • 49
  • 52
2
votes
0 answers

CloudKit subscriptions only works for dashboard operations

My subscription is based on a simple predicate NSPredicate * sPredicate1 = [NSPredicate predicateWithFormat:@"(inviteCode == %@)", walletUser.inviteCode]; CKSubscription * s = [[CKSubscription alloc] initWithRecordType:@"Invite" …
kas-kad
  • 3,736
  • 1
  • 26
  • 45