How to test push notifications in iOS simulator


From Xcode 11.4 and onward we can test push notifications in the simulator. In this blog, we will use the two methods to test the notification.

First, we need to find the simulator identifier on which our application is installed. To find the simulator identifier we will open the terminal and run the below code.

When we execute this code, then all the installed simulators with their identifier will show. From here we will find the identifier of our simulator.

Now we will create a JSON file. In this file, we will create valid payload data. And saved it with .apns extension. Put the below code in the file and save it as anyname.apns.

I have saved it as payload.apns

Here, “com.test.webkul” is my project bundle identifer.

We will now trigger the push notification. Simply write the below code in the terminal and execute it.

In this approach, we will simply drag and drop our payload.apns file to the simulator. As soon as we did this we can see a notification on the simulator.

Thanks for reading this blog.

You can also check other blogs from here. if you have any issues or suggestions you can leave your query/suggestion in the comment section.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.


The results provided were above our expectations both in deliverability timeline as well as operation. They are a top-notch company with many resources and a company we feel honoured to work with again!

Lee Seward

Lee Seward

Founder, Gro-Connect

Talk to Sales


Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home