I have a CloudKit app on iOS 11.4.1 with frequent record updates through CKSubscriptions. I've found that there's a limit to the # of push notifications received before the device stops receiving any notifications for an extended period (30 mins to 2 hours).
Has anyone encountered this issue? The app is active and receives push notifications from CKSubscriptions just fine, but after 30-40 notifications within the span of 3-5 minutes, it just stops receiving them.
The didReceiveRemoteNotification is not even called. I have the activityIndicator activated during a call. I also call the completionHandler(.newData) for each didReceiveRemoteNotification.
After about 30 mins to 2 hours later (app is always active), didReceiveRemoteNotification starts getting called again with record changes.
Am I approaching some limit for push notifications with CKSubscriptions?
I've thoroughly tested this, and it doesn't have to do with internet connectivity since the device can still send updates to CloudKit, but no push notifications are received.
What I've tried: 1) Throttling my save CKRecords method, so that the records are saved in a batch. Unfortunately, didReceiveRemoteNotification is called once for each record change so same problem. 2) Occurs in both Development and Production (downloaded from App Store) environments 3) abort() and reopening the app doesn't work 4) Tried Apple's CloudShares sample app. I couldn't add many records myself, but when the push notifications were paused on my app, the CloudShares app still received push notifications. 5) Finally, I've tried a counter on the didReceiveRemoteNotification method (without calling any data update methods), and it went to about 80-95 before stopping.
Thanks!