I am creating an os 2 application extension for apple watch and I need to implement notifications. When I read Apple documents, I sowed what I needed, this is a custom notification, so I need to create a user interface for it, but the fact is that I have to handle several cases of notifications, and not all of them have one action button, therefore my question is how to change the name of the action button and, if possible, hide it.
I know that action buttons can be created using the PushNotificationPayload.apns file, as well as in the apns file that you created the button and the action function, but can it be done in the code (hide / show the action of the button and also adjust its name).
I thought I could do some implementation in didReceiveRemoteNotification: withCompletion :?
And here is some background information:

Update 1
After reading again this apple doc I made the following changes:
- Another notification interface controller is implemented and checked "Has a dynamic interface"

- Added "Notification category name"

- Created another subclass of "WKUserNotificationInterfaceController" and associated it with a new custom notification in the storyboard
It was possible to verify that the correct category is loaded when receiving a notification using the category key and the correct value for each custom category, in my case "Cat1" and "Cat2".
And now the only question I have is:
? ( , , , .apns)
, :
() ? :
"WatchKit Simulator Actions": [
{
"title": "First Button",
"identifier": "firstButtonAction"
}
]
aps :
"alert" : {
"body" : "Test message",
"title" : "Optional title",
"action" : [
{
"title" : "First Button",
"identifier" : "firstButtonAction"
}
]
}
2
, , , .
, iOS, , , , - IOS ?