Hey,
we currently struggled to receive a custom payload when receiving remote push notifications on iOS.
As we found out, corona assumes that the JSON-String that contains the push information looks something like this (php example):
[lua][‘aps’] = array(
‘alert’ => $message,
‘sound’ => ‘default’,
‘badge’ => 4,
‘custom’ => array(‘anumber’ => 1, ‘aboolean’ => true, ‘astring’ => ‘stringvalue’, ‘afloat’ => 3.1415),
);[/lua]
source:
As apple mentions (and every third party apn tool for sending iOS push notifications does) the custom data field is placed at the same level as the ‘aps’ object, not within the ‘aps’ object resulting in:
[lua]
[‘aps’] = array(
‘alert’ => $message,
‘sound’ => ‘default’,
‘badge’ => 4,
),
[‘custom’] = array(‘anumber’ => 1, ‘aboolean’ => true, ‘astring’ => ‘stringvalue’, ‘afloat’ => 3.1415)
[/lua]
That could be the cause why so many other developers struggle to receive the custom data.
I made a bug report about this (Case 22669). I suggest you check for the custom outside the aps object, if no custom data is set in the aps object to be compatible to third party software.
Cheers