push notification - WatchKit handleActionWithIdentifier : forRemoteNotification is not called -


i have simple static interface apple watch notification follow: enter image description here

and in pushnotificationpayload follow:

{     "aps": {         "alert": {             "body": "123you have new message",             "title": "myapp"         },         "category": "respond"     },      "watchkit simulator actions": [         {             "title": "view message",             "identifier": "viewmsgbtn"         }     ],      "customkey": "customkey" } 

and implement method in interfacecontroller

- (void)handleactionwithidentifier:(nsstring *)identifier              forremotenotification:(nsdictionary *)remotenotification {     nslog(@"handling remote notification: %@ identifier: %@", remotenotification, identifier); //    [self.lbtest settext:[nsstring stringwithformat:@"notification: %@",remotenotification.description]]; } 

and run simulator notification:

enter image description here

the awakewithcontext method in interfacecontroller called, , after clicking view message button , loads apple watch app interface.

the willactivate method in interfacecontroller called. handleactionwithidentifier forremotenotification not called... idea?

i experiencing similar (in swift) realized had implemented

handleactionwithidentifier(identifier: string?, forremotenotification remotenotification: [nsobject : anyobject], withresponseinfo responseinfo: [nsobject : anyobject]) 

instead of

handleactionwithidentifier(identifier: string?, forremotenotification remotenotification: [nsobject : anyobject]) 

the former cases user provides text response, not applicable here.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -