
The payload you just simulated is not a valid Notificare payload, so clicking on that notification will not display any content. Great right? This will already display a banner, play a sound and show a badge in your app.īut this is still not all you want to test. Save that file (make sure you replace the Simulator Target Bundle with your own bundle identifier) as a xxx.apns file and drag it to your simulator window, it should now generate an alert like the one below:

apns file with the following content (using your favourite text editor): If you've already accepted the notification's permission dialogue to send alerts, badges and sounds, go ahead and put your app in background. Make sure you've also installed all the additional components included in Xcode and run your app in the simulator. In Xcode 11.4, this is now possible! If you've already downloaded the latest Xcode, let's give it a try. You will want to also test when notifications arrive and you click on them from the notification center. This is great, but it not a complete test scenario. It is also possible to see exactly how they will look like and behave whenever you click in those messages: This is still a great way to test this functionality since any notifications you send through our dashboard, targeting simulator devices, will be visible in the list of messages you retrieve when you implement our Inbox functionality: Since Apple's Push Notification Service can only send notifications to real devices, most of you found that when using this feature, it is at least possible to test if all the types of notifications, we support, are displayed as expected. Since we've introduced our Inbox feature in 2016, developers have been using it to test notifications while debugging their apps in the simulator. After almost 7 years, a lot has changed and with the latest release of Xcode (version 11.4 released recently) it is now possible to natively test how incoming notifications behave without a real device. It has been a while since we last posted about testing push notifications in iOS Simulator.
