I am developing an iOS app which will show Local Notifications and Local Interactive Notifications while it is in background. I want to test how it is displayed in the paired Apple Watch when the device is locked. Since I don't have an Apple Watch, how could I test this in the Simulator?
“Simulator supports simulating remote push notifications, including background content fetch notifications. In Simulator, drag and drop an APNs file onto the target simulator. The file must be a JSON file with a valid Apple Push Notification Service payload, including the “aps” key.
If your target platform is Android, you can test a push notification on an emulator if the emulator target uses a version of Google APIs to receive the push notifications.
If you get your iOS app notification working using simulator, then add some logic like triggering notification after 5 seconds of IBAction. Simple lock your iOS simulator using (Command ⌘ + L). Now the notification will be displayed on both the devices.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With