2

Is possible to test fcm iOS push notification in simulator or can I convert fcm push notification json format to apns format for testing in simulator?

Dharani
  • 63
  • 8

1 Answers1

0

Yes you can test push notifications on the simulator if using Xcode 11.4 or higher.

“Simulator supports simulating remote push notifications, including background content fetch notifications. In Simulator, drag and drop an APNs file onto the target simulator. The file must be a JSON file with a valid Apple Push Notification Service payload, including the “aps” key. It must also contain a top-level “Simulator Target Bundle” with a string value matching the target application‘s bundle identifier.

Lance Samaria
  • 17,576
  • 18
  • 108
  • 256
  • try any of these if you don't know how: https://tudip.com/blog-post/5-steps-to-test-push-notification-in-the-simulator/, https://medium.com/better-programming/how-to-send-push-notifications-to-the-ios-simulator-2988092ba931, https://medium.com/globant-mobile-studio-india/send-push-notifications-to-the-ios-simulator-3a78b6689cf – Lance Samaria Jun 16 '20 at 12:35
  • 2
    yes, i tested APNS payload in simulator, but FCM notification payload is different format. So, I can't test FCM notification payload in simulator. Is there is anyway to test FCM payload in simulator? – Dharani Jun 19 '20 at 06:40
  • You know you can contact Firebase tech support directly? They answer within 24 hrs (maybe not weekends though) – Lance Samaria Jun 19 '20 at 06:56
  • np, come back and post the answer. Good luck – Lance Samaria Jun 19 '20 at 07:17
  • sure i will post the answer – Dharani Jun 19 '20 at 07:19
  • @hardiksa, We can't test fcm push notification in Simulator. https://stackoverflow.com/questions/63942759/test-fcm-notification-on-ios-simulator?noredirect=1&lq=1 – Dharani Jun 21 '21 at 12:29