简体   繁体   中英

Local Notifications in Apple Watch

How do you send Local Notifications from iPhone to an Apple Watch app when the Apple Watch app is in the background? And how do you check Local Notifications in the simulator, if possible?

The notifications shown at Apple Watch are the sames that appears in your iPhone.

If you have your iPhone locked , notifications go to the Apple Watch also.

You can not send a notification that only shows at Apple Watch.

As of Apple Docs :

Apple Watch takes full advantage of the existing interactive notification support on iOS. If your iOS app supports notifications, Apple Watch displays those notifications at appropriate times. When one of your app's local or remote notifications arrives on the user's iPhone, iOS decides whether to display that notification on the iPhone or on the Apple Watch. For notifications sent to Apple Watch, the system lets the user know subtly that a notification is available. If the user chooses to view the notification, the system displays an abbreviated version of the notification first, followed by a more detailed version. The user can dismiss the detailed notification, launch your Watch app, or act on the notification by tapping an available action button.

Apps are not required to do anything to support notifications. The system provides a default notification interface that displays the alert message from the notification. However, apps can customize the notification interface and include custom graphics, content, and branding.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM