Can I send a local notification to the Apple Watch specifically?

I see this in the Apple Watch Programming Guide:

When one of your local or remote application notifications appears on iPhone users, iOS decides whether to display this notification on the iPhone or on the Apple Watch.

Is there a way to make a notification only on the watch?

+5
source share
4 answers

Unfortunately, no, with applications for viewing now you need to process notifications in 3 places. When the application is launched, the application is called: didReceiveLocalNotification :. When the phone is unlocked, the notification is sent to the notification center, and you will need to process the user by selecting him in the application: didFinishLaunchingWithOptions :. The watch will automatically process any notifications contained in the application that display the application and the warning body. If you need a special notification, you will need to configure the notification category in the containing application and the dynamic notification in the watch. If you are trying to simply get information from the application on the watch, you can use the application group dictionary or the openParentApplication: reply: method.

+4
source

This was not possible before watchOS 3.

watchOS 3 introduces the "User Notification System" , which supports the delivery and processing of local and remote notifications. You can use the classes of this structure to schedule delivery of local notifications based on certain conditions, such as a date or time or after a period of time, and also receive and process local and remote notifications when they are delivered to a user device.

Now you can schedule a local notification on the watch, and the notification (delivered and back) is processed only for hours. It will not appear on the phone.

For more information, see WWDC 2016 Introduction to Notifications and Quick Interaction Methods for watchOS Sessions .

Useful image for this guide : enter image description here

+5
source

Nope. It is fully controlled by the OS.

0
source

Whatever you do in the watch application, you can check this from this relatively simple documentation: https://developer.apple.com/library/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/

And I don’t think you can do something like what you say. We must admit that there are many limitations to this version of WatchKit.

0
source

All Articles