Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Test Local Notifications in Apple Watch Simulator?

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?

like image 375
iceLord Avatar asked Oct 30 '15 05:10

iceLord


People also ask

Can we test push notifications on iOS 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.

Does notification work on simulator?

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.


1 Answers

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.

like image 194
Pradheep Narendran P Avatar answered Jan 03 '23 15:01

Pradheep Narendran P