phonegap / phonegap-plugin-push

Register and receive push notifications
MIT License
1.94k stars 1.91k forks source link

How can we use inline-reply button in iOS platform with APNS? #2823

Open dishank-shah opened 5 years ago

dishank-shah commented 5 years ago

Expected Behaviour

iOS : Not able to do inline reply as android. Currently when push notification received we can just tap button and can do reply to that notification (inline same as in android)

Actual Behaviour

Not found any property to set this configuration

Reproduce Scenario (including but not limited to)

Steps to Reproduce

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

iOS iphone X with version 12.4

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Cordova CLI version and cordova platform version

cordova --version       = 9.0.0 (cordova-lib@9.0.1) 
cordova platform version iOS =  ios 4.5.5     

Plugin version

2.1.3

Sample Push Data Payload

in android below works

{ "data": { "title": "Test Notification65", "body": "This offer expires at 11:30 or whatever", "notId": 10, "surveyID": "ewtawgreg-gragrag-rgarhthgbad", "image": "icon", "actions": [ { "icon": "emailGuests", "title": "Reply", "callback": "emailGuests", "foreground": false, "inline": true, "replyLabel": "Enter your reply here" } ] }, "to":"xxx-xxxxx-xxxx", "priority":"high", "restricted_package_name":"" }

but how can we send inline = true in iOS

Sample Code that illustrates the problem

below is sample for create category. we can not find any property that set button as inline reply.

const push = PushNotification.init({ ios: { sound: true, alert: true, badge: true, categories: { invite: { yes: { callback: 'accept', title: 'Accept', foreground: true, destructive: false }, no: { callback: 'reject', title: 'Reject', foreground: true, destructive: false }, maybe: { callback: 'maybe', title: 'Maybe', foreground: true, destructive: false } }, delete: { yes: { callback: 'doDelete', title: 'Delete', foreground: true, destructive: true }, no: { callback: 'cancel', title: 'Cancel', foreground: true, destructive: false } } } } }

Logs taken while reproducing problem

nikunjazilen commented 5 years ago

I m facing the same issue, Any update on this?