Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 8 ios 10 Simulator , is it possible to send push notification to the simulator

My app uses Firebase. I am trying to send push notification to app running in simulator. When I run the app in iOS 10 Simulator, it successfully generates InstanceID token but shows warning that

notifications are not supported in the simulator.

I read somewhere on stackoverflow that it is possible to send push notification on iOS 10 simulator. Is it true?

like image 848
ios nerd Avatar asked Nov 09 '16 20:11

ios nerd


1 Answers

You cannot get push notifications inside the simulator. You can, however simulate getting a push notification by making a button or whatever that calls application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) with a notification dictionary. This is useful for testing that the rest of your logic is working before you deploy to device to test that the final format of the push is what you expect it to be.

like image 178
Josh Homann Avatar answered Oct 15 '22 18:10

Josh Homann