0

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.

ThomasCle
  • 6,792
  • 7
  • 41
  • 81

2 Answers2

2

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.

iSaalis
  • 622
  • 1
  • 8
  • 14
0

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.

Community
  • 1
  • 1
Jerry
  • 4,382
  • 2
  • 35
  • 29