Mathias
Mathias

Reputation: 3981

Any way to give feedback on Interactive notification to Apple Watch?

Say i have an app with interactive notfications to be displayed on the Apple Watch. Lets say its a mail app for example, with a "reply with a thumb" button. When the user clicks that, it would be desirable to display some sort of result on the notification, for example "Mail was sent" or "Unable to send, server not found".

I can't find anything in the notification api to do this, which i find unfortunate. Just wanted to check if someone has the same usecase and if i have missed some (other) way to solve this.

Upvotes: 0

Views: 87

Answers (1)

Kyle Redfearn
Kyle Redfearn

Reputation: 2281

You can have your app respond to the options in the notifications in the WKExtensionDelegate method handleActionWithIdentifier(_:forRemoteNotification:). This can perform a network request which can in turn send another push notification, or you can schedule a local notification as a result of the network request. Check out the UILocalNotification API

Upvotes: 1

Related Questions