Reputation: 5616
Can anybody clarify for me the way in which a push service making use of the UNNotificationServiceExtension class behaves if the service is stopped due to a crash ? When would the service be expected to restart (if at all ?).
https://developer.apple.com/reference/usernotifications/unnotificationserviceextension
Upvotes: 0
Views: 544
Reputation: 102
As mentioned in the Apple documentation, UNNotificationServiceExtension is mainly meant to modify the content of Remote Notifications.
The system runs this extension for a limited time as soon as it receives a remote notification for your application.
During which, by adding your custom logic, you can edit title, subtitle, body, badge etc of notification before it is presented to the user.
During this process (after remote notification is received and before it is presented to the user), if UNNotificationServiceExtension crashes for whatever reason
In short, a crash in UNNotificationServiceExtension simply leaves the related remote notification unchanged.
Upvotes: 1