phonegap/phonegap-plugin-push

Apple Watch Action Buttons Not Working

Open

#2 395 ouverte le 31 mai 2018

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)Java (1 915 forks)batch import
bughelp wantedios

Métriques du dépôt

Stars
 (1 947 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Expected Behaviour

When clicking on Apple Watch notification action buttons it should trigger mobile app respective callback functions

Actual Behaviour

Action buttons in notification work as expected on IOS device but when device is locked and notification is then forwarded to Apple Watch device the action buttons don't trigger the respective callback functions

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

cli packages: (/Users/.../.nvm/versions/node/v6.11.4/lib/node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    Cordova Platforms : android 6.3.0 ios 4.5.4
    Ionic Framework   : ionic1 1.3.1

System:

    ios-deploy : 1.9.2
    ios-sim    : 6.1.2
    Node       : v6.11.4
    npm        : 3.10.10
    OS         : macOS High Sierra
    Xcode      : Xcode 9.3.1 Build version 9E501

Cordova CLI version and cordova platform version

cordova version 7.1.0

cordova platforms version           
android 6.3.0
ios #4.5.4

Plugin version

2.1.3

Sample Push Data Payload

{
    "aps": {
        "alert": "Login approval for [username] (in [environment_name])",
        "sound": "default",
        "answerKey": "[answerKey]",
        "environment": "[environment_name]",
        "userId": "[userId]",
        "category": "secondFactorPush"
    },
    "notId": "1"
}

ios init config

ios: {
    alert: "true",
    badge: "true",
    sound: "true",
    categories: {
       secondFactorPush: {
          yes: {
             callback: "confirmSecondFactorPush", title: "Confirm", foreground: false, destructive: false
          },
          no: {
             callback: "declineSecondFactorPush", title: "Decline", foreground: false, destructive: true
          }
       }
    }
}

Guide contributeur