Reputation: 11753
I've started to learn watchKit
and watchOS
.
After finding out how to handle notifications coming from a button set inside PushNotificationPayload.apns
, I would like to set up my own notification that is going to fire at a given time, wake up the user with some kind of notification while the app is in the background, and possibly launch the app.
How can I do that?
Upvotes: 1
Views: 788
Reputation:
In watchOS 2, this required scheduling the notification on the phone. It wasn't possible to wake up the watch app from the phone.
In watchOS 3, you can now use the new UserNotifications framework to schedule, deliver, and handle local notifications right on the watch.
You can display an actionable notification on the watch, which can open your watch app from the notification.
WWDC 2016 covered this material in two Introduction to Notifications and Quick Interaction Techniques for watchOS sessions.
Upvotes: 3