Working on Apple Watch Notifications:- so if i add button in Notification Interface (from object Lib) then the error is :
Buttons are not Supported in Notification Interface
PushNotificationPayload.apns
has the WatchKit Simulator Actions
Like This :
"WatchKit Simulator Actions":
[
{
"title": "View",
"identifier": "firstButtonAction"
}
],
and the Simulator Shows this to me
Now my Question is, How can I Handle this View
Button when send a PushNotification
from server,
If the aps
file contain the action button is the only option for Apple Watch,
How to send it from server in Notification Dictionary with specified Key?
How to Change the Action button BG Color?
Will anyone please give me the sample aps
file that include ActionButton
for Device the Apple Watch
not for the Simulator
I just test by changing the WatchKit Simulator Actions
Key to WatchKit Actions
Key but it shows no Action Button.
As suggested by @vivekDas in Answer, I checked by replacing in the aps
as :
"alert" : {
"body" : "Acme message received from Johnny Appleseed",
"action-loc-key" : "VIEW",
"action" : [
{
"id" : "buttonTapped",
"title" : "View"
}
]
}
but simulator in Xcode does show an action button.
I think this may run on Device Apple Watch
, is this...?
What would you suggest to me on this.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…