-
Notifications
You must be signed in to change notification settings - Fork 1.9k
data.additionalData.[Object] as 'undefined' in iOS #1160
Comments
Same thing here.. Strange when you turn "notification" field into "data" and put the app on foreground / background the additional data arrives. But this time no notifications arrives when the app is on background or closed at all bec. of DATA field.. This bug needs to be fixed as soon as possible.. |
@ef33zy Try sending the following payload:
Apologies for the late reply, I thought I had already send this. YMMV on this as I don't have as much control as to what GCM sends to an iOS app. @skyprimer just as a heads up people maintaining open source projects really hate comments like |
Oh @macdonst English is not my mother language i just translate from my language to yours in my mind telling like that is not negative i'm sorry if you thought so.. I know these kinds of projects or blogs or etc comes out from spare time as i said this is bec. i do not have full control on English... We are from all around the world the project you are managing is bigger than you think :) So if you see comments like that don't think the poster of it is commanding something or got angry and yelling just might not using exact words on English :) By the way adding another field "data" works great i did not know we can use both data and notification together.. 👍 |
@macdonst Thanks very much. That works like a charm :) (not like I know how charms work). Would it be worth adding that to the documentation for the |
re-opening to add to docs. |
This thread has been automatically locked. |
Expected Behaviour
I am hoping to emulate the app in foreground URL redirection described here. I expect the data.additionalData.[Object] to return the defined values in iOS as it does in Android, and I get a confirmation dialog box. Per my Sample Push Data Payload below,
should return:
Actual Behaviour
However, I do not get the dialog box as expected since the below is returned:
Reproduce Scenario (including but not limited to)
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS 9.3.3
Cordova CLI version and cordova platform version
Plugin version
phonegap-plugin-push 1.8.0
Sample Push Data Payload
I have tried the following Payload combinations in my PHP file:
Option 1: This option works perfectly for Android
Option 2:
Option 3:
Option 4:
Sample Code that illustrates the problem
Logs taken while reproducing problem
The text was updated successfully, but these errors were encountered: