Simulating Push Notifications in iOS Simulator

Lee Kah Seng
The Startup
Published in
5 min readFeb 13, 2020

--

This article is originally published at https://swiftsenpai.com

Simulating Push Notifications in iOS Simulator

Dear fellow iOS developers, the wait is finally over! We are now able to simulate push notification in iOS simulator using the latest Xcode beta release (11.4-beta).

Without further ado, let’s see how this can be done.

The Steps

In order to be able to simulate a push notification in iOS simulator, there are a few steps that need to be taken.

  1. Download and install Xcode 11.4-beta and above.
  2. Create a sample app that requests for permission to receive push notifications.
  3. Run the sample app and grant it permission.
  4. Put the sample app into the background.
  5. Create an Apple Push Notification Service (APNS) payload file.
  6. Drag and drop the payload file onto the target simulator.

Now let’s go through these steps in detail one by one.

1. Download and install Xcode 11.4-beta and above

By the time this article is being published, Xcode 11.4 is still under beta release. Thus, you can download it here.

--

--

Lee Kah Seng
The Startup

Support me by becoming a Medium member: https://leekahseng.medium.com/membership ⦿ 🇲🇾 Creator of https://swiftsenpai.com ⦿ iOS developer since 2011