5
votes

I have an iPod Touch with iOS 9.0 that isn't receiving CloudKit CKSubscription push notifications after the release of iOS 9.3.

My iPad with iOS 9.3 is receiving the notifications just fine, using the same build of the app.

Does anyone know what's going on here? Do certain CloudKit versions no longer push notifications to older versions?

When I delete and reinstall the app on my iPod Touch, I tap "Allow" to allow push notifications, but if I make any record changes in my CloudKit dashboard, only my iPad receives the push notification, and didReceiveRemoteNotification is not even called on my iPod Touch.

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

        // Register for push notifications
        let notificationSettings = UIUserNotificationSettings(forTypes: UIUserNotificationType.Alert, categories: nil)
        application.registerUserNotificationSettings(notificationSettings)
        application.registerForRemoteNotifications()

        return true
}

func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) {
}
1
Your problem seems to be strange, but no harm in trying to set the notificationInfo.soundName = "". This is the CKNotificationInfo object when you create a subscription. You might need to delete the old subscription and create a new one.user1046037
Hi, thanks for your help. It's very strange, but I want to get to the bottom of it because I can't risk running into this issue for newer versions of iOS. Rather than deleting the old subs, I created a new sub for "TestType" record type in the private database. Then I created a new TestType record in the dashboard, and on the iPad, a notification is received, but not on the iPod touch. Once again, problem still persists. I also tried the soundName = "" as you said.powertoold
Can you pls check the Settings > Notifications > your app on your iPod touch ? I feel it could be the notification settings that is turned offuser1046037
Yes, I checked that and it's on. That setting resets for each reinstall, and I've tried to reinstall on multiple occasions :(powertoold
Try with the another device other than the ipad and iPod touch. Can you try with a simple new project. I know it's painful, it might help u isolate the problemuser1046037

1 Answers

0
votes

The solution was rather tricky. In my Xcode project, there was an *.entitlements file that had the name of my app icon (as displayed on a device). However, my project's name is different than this *.entitlements file:

My file: ABC.entitlements (my app shows up as ABC on a device)

My project's name: XYZ

So I tried to change the name of the entitlements file to XYZ.entitlements, but Xcode gave me a warning that there was already a file named XYZ.entitlements. It turns out there was another *.entitlements file in my Supporting Files folder. This entitlements file didn't have any iCloud settings.

In reality, this shouldn't matter because in my build settings, the entitlements file path is set to ABC.entitlements, but for some reason, with my iPod Touch's iOS 9.0.1, it seemed to be using the XYZ.entitlements file (my assumption).

I deleted the XYZ.entitlements file from my project, and also included the ABC.entitlements file in my target membership. After this, my iPod Touch was able to receive CloudKit notifications again.

Thanks for your help!