Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CloudKit subscriptions and UNNotificationServiceExtension

So in iOS 10 you can now write notification service extensions that "intercept" push notifications so that you can download stuff and handle them before displaying them to the user.

However they require that the push payload has the 'mutable-content' key in aps set to 1. CloudKit subscriptions do not seem to return this key in the userInfo dictionary (At least CKDatabaseSubscription doesn't), and so the service extension doesn't get called.

Is there a way to get CloudKit subscription notifications to work with UNNotificationServiceExtensions?

like image 748
Luke Avatar asked Oct 18 '22 07:10

Luke


1 Answers

This is now possible in iOS 11, look for the shouldSendMutableContent property in CKNotificationInfo

like image 141
Luke Avatar answered Oct 30 '22 13:10

Luke