简体   繁体   中英

register for actionable notifications in watch app?

I am implementing Actionable notifications in my watch app..I have defined my notification payload but I am not receiving actionable buttons in my notifications..According to apple documentation

Action buttons save time for the user by offering some standard responses for a notification. Apple Watch makes use of the interactive notifications registered by your iOS app to display action buttons. In iOS 8 and later, apps are required to register the types of notification-generated alerts they display using a UIUserNotificationSettings object. When registering that information, the app can also register a set of custom notification categories, which include the actions that can be performed for that category. Apple Watch uses this category information to add the corresponding action buttons to the long-look interface. 

I have a simple question is it mandatory to register for actionable notifications even if you have defined actions in payload file?

You need to set UserNotification setting and user notification action in your code to. Go through this Link

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