Testing Push Notifications on the iOS Simulator

Create a JSON payload similar to the one below and save it as e.g test.apns

{
    "Simulator Target Bundle": "your app bundle id goes here",
    "aps": {
        "timestamp": 1168364460,
        "event": "update",
        "content-state": {
            "driverName": "Anne Johnson",
            "estimatedDeliveryTime": 1659416400
        },
        "alert": {
            "title": "Delivery Update",
            "body": "Your pizza order will arrive soon.",
            "sound": "example.aiff"
        }
    }
}

Run the simulator, then drag the .apns file over to the iOS simulator. At this point, you should see the Push Notification pop up.

Testing Push Notifications on the iOS Simulator

Leave a comment