CloudKit push notification subscription not working
Fixed it by resetting the development environment. Hopefully same thing doesn't happen on prod.
Not receiving CloudKit push notifications for Custom Record Zone on the Mac
I think it's fixed with macOS Sierra. Working for me now.
Edit:
Oh wow: just noticed that I (!) asked this question 1,5y ago. :)
CloudKit Not Sending Update Notifications
The solution appears to be to use an info object with shouldSendContentAvailable = true
, like this:
let info = CKNotificationInfo()
info.shouldSendContentAvailable = true
subscription.notificationInfo = info
That has solved it for me. It causes didReceiveRemoteNotification:
to fire, without any user visible notification appearing. So it's a silent notification, as desired, and it's actually arriving, as desired.
If I leave subscription.notificationInfo
nil the app is never notified of changes. But with an [effectively silent] info object I get the desired results.
Cloudkit is not sending push notifications
You seem to be doing everything right. Two things I can think of:
Are you sure you are registering for remote notifications? I can't see the call to
application.registerForRemoteNotifications()
anywhere. I am assuming you forgot to paste it here.Have you tried to delete the subscription in the panel and recreate it? I have had issues where registering the same subscription multiple times with different notificationInfo would break it and it would stop firing.
Cloudkit PushNotifications not veing delivered, but subscription created in Schema
The reason the push notifications weren't coming to my device was because I was using only 1 iphone. You can't send a push notification that "a new record was created" to the device that made the record. As soon as I switched over to using the simulator to make the Record, my physical device started getting the push notifications. Both simulator and physical device were signed into the same icloud account.
So the process looks like:
- App installed on physical device (Signed into iCloud). Subscribe to zone changes in physical device.
- Launch the app on the simulator (Signed into iCloud).
- Save a record on the simulator
- Push Notification will appear on the physical device.
Related Topics
Duplicate Collectionview Cells After Reloaddata with Firebase Query
Objc Protocol Implementation in Swift
Can Push Notifications Be Used to Run Code Without Notifying User
How to Solve Mach-O-Linker Error in iOS7 & Xcode 5.0.1
Dateformatter Gives Wrong Time on Conversation
Implementing Codable for UIcolor
How to Fix Crash When Tap to Select Row After Scrolling The Tableview
How to Loop Through and Get All The Keys of The Nested Nodes in Firebase
Uitableview Is Jumping When I Insert New Rows
Disable iOS Reachability Swipe Gesture in iOS Game
Programmatically Change Splash Screen in iOS
How to Make Collage of Images According to Different Shapes
How to Switch Programmatically to Dark Mode Swift
Xcode Export App, Wildcard Error
Mpvolumeview Does Not Show Route Button on Launch
Is There a Way of Automatically Writing Custom Values to The Bundle's .Plist During a Build Phase