Reputation: 6801
I am creating an UNNotificationServiceExtension
, but I'd like to test it without having actual remote notifications while developing it.
Is it possible to trigger it without remote notifications?
I have tried with UNNotificationRequest
, but that does not seem to work for the service extension. I have tested with UNNotificationContentExtension
and that works, but it doesn't seem to work on UNNotificationServiceExtension
.
Upvotes: 0
Views: 1084
Reputation: 622
Download Pusher binary for mac. https://github.com/noodlewerk/NWPusher
It is cools. Give it keychain access, it picks the push certificates, just type in the payload and device token and environment and done.
Upvotes: 2
Reputation: 4480
I don't think you can with Local Notifications, but without a server, you can use the script from this tutorial: https://www.raywenderlich.com/123862/push-notifications-tutorial modified with the answer from this question: Push Notification in PHP using PEM file and send your own push notifications. You'll have to modify the content in the script to include the mutable-content flag to trigger the extension.
Upvotes: 0