You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
iOS actionable alert event listener should get called when user taps on action from the background push notification
pushObject.on("Approve").subscribe(notification => {
console.log("approved" + notification);
});
Actual Behaviour
Rather than calling actionable alert event, it triggers pushObject.on("registration").subscribe((registration: any) => {
console.log(notification.additionalData.foreground); // false
}
Reproduce Scenario (including but not limited to)
Run the application on iOS 13.0 and above
Steps to Reproduce
Register with categories
Send actionable alert with push notification
Perform action from background push notification
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Expected Behaviour
iOS actionable alert event listener should get called when user taps on action from the background push notification
pushObject.on("Approve").subscribe(notification => {
console.log("approved" + notification);
});
Actual Behaviour
Rather than calling actionable alert event, it triggers pushObject.on("registration").subscribe((registration: any) => {
console.log(notification.additionalData.foreground); // false
}
Reproduce Scenario (including but not limited to)
Run the application on iOS 13.0 and above
Steps to Reproduce
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS 13.x
Cordova CLI version and cordova platform version
Cordova version
9.0.3 ([email protected])
Platform versions
android 8.1.0
ios 5.1.1
Plugin version
2.3.0
Sample Push Data Payload
{
"aps": {
"category": "authorize",
"title": "Payment is pending for approval",
"alert": "Payment of 3500 EUR is pending for your approval"
},
"actionInfo": {
"currentAction": "add",
"nextAction": "approve",
"referenceId": "11U5F1lGesVcxzo",
"rejectionInfo": null
}
}
Sample Code that illustrates the problem
this.platform.ready().then(() => {
const options: PushOptions = {
android: {},
windows: {},
ios: {
alert: "true",
badge: true,
sound: "true",
categories: {
authorize: {
yes: {
callback: "Approve",
title: "Approve",
foreground: true,
destructive: false
},
no: {
callback: "Reject",
title: "Reject",
foreground: true,
destructive: true
}
}
}
};
this.pushObject = this.push.init(options);
this.pushObject.on("registration").subscribe((registration: any) => {
}
this.pushObject.on("notification").subscribe((notification: any) => {
}
this.setCallbacks(this.pushObject);
});
setCallbacks(pushObject) {
pushObject.on("Approve").subscribe(notification => {
console.log("approved" + notification);
});
pushObject.on("Reject").subscribe(notification => {
console.log("approved" + notification);
});
}
Logs taken while reproducing problem
The text was updated successfully, but these errors were encountered: