Ios 8 Simulator, you can send a push notification to the simulator

When I launched the application in ios 8 Simultor, it shows a warning that you want to allow with push notifications and in the settings that I can see when the push notification is turned on. So, can we send push notifications to the simulator? is it possible?

+6
source share
2 answers

No, the API for supporting push notifications in the simulator is still missing. You must use the device.

Although the iPhone 6 and iPhone 6+ simulators have settings for push notifications and even show you a push notification prompt, an attempt to register for push notifications from the simulator still fails with Error Domain = NSCocoaErrorDomain Code = 3010 " Remote notifications are not supported in the simulator "UserInfo = 0x7fc786b4af90 {NSLocalizedDescription = remote notifications are not supported in the simulator). So, it is best to use the device.

+16
source

Yes, you can check the push alert on the simulator, but you should use the library in your Named SimulatorRemoteNotifications application. Thanks to which, with just 4-5 steps, you can test the push notification on Simulator.

They also provide POD too

pod 'SimulatorRemoteNotifications', '~> 0.0.3' 
0
source

Source: https://habr.com/ru/post/978268/


All Articles