Push and custom array

Hello

We are having an issue with our push service on iOS.

Since couple of days the custom array arrive empty on notification. 

We are using Easyapns php based service. The json string is well formed as Apple explain it. Values seems to disappear in between.

Does anybody has an idea ?

{"aps":{"alert":{"body":"You got your emails.","action-loc-key":"Read"},"sound":"chime"},"acme2":"foo"}

Here the Custom field acme2 = foo stay empty when push is received

thanks U

Hi

does any body got an idea ? 

are U using Push and custom array ? does it works ? 

Thanks a lot

Corona requires the “custom” entry to be a table… because that’s how it is delivered when a Corona “notification” event gets dispatched in Lua.

   http://docs.coronalabs.com/api/event/notification/custom.html

But that said, the “custom” table can contain a mix of other data types, including arrays.  So, what you can do is add an entry to your custom table that stores an array.

Have a look at sample project “Notifications/GooglePushNotifications” that is included with the Corona Simulator.  I know it’s not an iOS push notification, but it shows a good example of a “custom” table containing a mix of types.  You can find this code example in the onTap() function within the “main.lua” file.  You would need to do something similar. 

Thank you

I’ve changed the way I send my json and it seems to work fine.

Hi

does any body got an idea ? 

are U using Push and custom array ? does it works ? 

Thanks a lot

Corona requires the “custom” entry to be a table… because that’s how it is delivered when a Corona “notification” event gets dispatched in Lua.

   http://docs.coronalabs.com/api/event/notification/custom.html

But that said, the “custom” table can contain a mix of other data types, including arrays.  So, what you can do is add an entry to your custom table that stores an array.

Have a look at sample project “Notifications/GooglePushNotifications” that is included with the Corona Simulator.  I know it’s not an iOS push notification, but it shows a good example of a “custom” table containing a mix of types.  You can find this code example in the onTap() function within the “main.lua” file.  You would need to do something similar. 

Thank you

I’ve changed the way I send my json and it seems to work fine.