The Xcode command-line tools allow you to work with the simulator from the terminal. Testing push notifications using the Xcode command-line tools To fully understand what this means, I’ll explain to you how you could be testing push notifications without Poes. Poes makes use of the new xcrun simctl push command and adds a small wrapper around it to generate the JSON payload based on input parameters. This takes away the hassle of creating a payload JSON file yourself and allows you to iterate fast while testing push notifications in your app.
You can install Poes using Mint: $ mint install AvdLee/PoesĪfter which you can easily send a notification as follows: $ poes send -bundle-identifier -verbose It’s a simple command-line tool that adds a wrapper around the new simctl push command. The easiest way of testing simple push notifications is by making use of Poes. let center = UNUserNotificationCenter.current()Ĭenter.requestAuthorization(options: ) Sending a push notification to the iOS simulator from the terminal
Otherwise, you could end up debugging to figure out why the notification is not showing up only realizing it’s caused due to missing permissions. Enable permission to use push notificationsīefore we start diving into the testing of remote push notifications it’s important to make sure you’ve got the right permissions for receiving notifications on the iOS simulator.
See how Firebase tools like Crashlytics, Remote Config, Performance Monitoring, and App Distribution can help you to track and fix stability issues in your app, and pinpoint performance issues early. Improve app quality in less time with less effort with Firebase