How to test notifications in the WatchKit app?

I found some problems with displaying notifications in the application WatchKit:

1) I would like to see a short look interface in the simulator, but I do not know how this is possible?

2) Instead of directly testing the long-look interface, having executed my associated scheme, I try to run a local notification from a paired iOS application. In an iOS app, I do:

UILocalNotification *localNotification = [[UILocalNotification alloc] init];
localNotification.alertTitle = @"test";
[[UIApplication sharedApplication] presentLocalNotificationNow:localNotification];

but I run the application diagram WatchKit, and I also open the iOS application in the paired iPhone simulator to execute this piece of code, and I don’t see anything in the Apple Watch simulator ...

3) The wall of the interface with a long design should take on the color that you set as global tintin the storyboard, right? I always get it in gray by default ...

Thanks in advance

+4
source share
1 answer

1) The short review interface is not displayed in the simulator, currently. Keep in mind that the simulator does not work with a full simulation of the OS, as in iOS.

2) Local notifications are not supported in the simulator. You can only test your schemas and JSON payload. See this dev forum thread: https://devforums.apple.com/message/1088761#1088761

3) , , . .

+3

All Articles