I cannot send custom data to iOS and need to, but cannot identify the root problem.

I am attempting to implement push notifications with custom data in my application. I am using pushwoosh and corona SDK. Python in powering my server to send rest/POST requests to pushwoosh.

I am currently unable to receive custom data and I cannot determine precisely why. I have posted to coronaSDK forums regarding this issue after spending many hours on Google.

Forum post with additional details: http://forums.coronalabs.com/topic/48026-unable-to-send-custom-data-to-ios-2014/

I am able to receive normal "alerts" via push notifications. I am fairly sure I have all certificates setup correctly.

The python JSON blob to build and send to pushwoosh.

    data = {
        # "applications_group":"GROUP_CODE",
                    "content-available": "1"
                # // JSON string or JSON object, will be passed as "u" parameter in the payload
                "custom": {"foo":True, "what":"lol"},
                "extra": {"foo2extra":True, "what":"lol"}
            "custom": {"topfoo":True},              
            "platforms": [1],
asked 21 May '14, 01:02
osconfused's gravatar image


You should put "custom" key to "aps" dictionary, like this:

"request": {
    "auth": "your api key",
    "application": "your app id",
    "notifications": [
            "send_date": "now",
            "ios_root_params": {
                "aps": {
                    "custom" : {"asd" : "asd"}

I just create sample project with your code and it's working:

May 21 16:07:37 Fectums-iPad Sample[1420] <warning>: onNotification() {"type":"remote","name":"notification","custom":{"asd":"asd"},"sound":"default","alert":"1111","applicationState":"active"} null

May 21 16:07:37 Fectums-iPad Sample[1420] <warning>: Custom data is table: 0x1467dd70 {"asd":"asd"}

permanent link
answered 21 May '14, 09:49
Fectum's gravatar image


edited 21 May '14, 10:04

This works! Thanks! Might be worth noting that this also works without having to next inside aps. This is also working for me: "ios_root_params":{ "custom": { "aboolean":False, "astring":"apstop", "anarray":[1,2,3,4,5], "aninteger":55, "afloat":550.556, "adict":{"foo":"bar"}, }, },

(21 May '14, 12:08) osconfused osconfused's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 21 May '14, 01:02

question was seen: 1,828 times

last updated: 21 May '14, 12:09