Notification is sent by using remote API successfully, but iPhone app can't receive it while Android app can. (iPhone can receive notification pushed from Pushwoosh application)

responseText is:

{"status_code":200,"status_message":"OK","response":{"Messages":["E65D-4F0C4F47-0523FD02"]}}

The only difference between ios and Android is the json (pwApplication and pwAuth are given correct values which work fine with Android app).

json for ios:

JObject json = new JObject(
                new JProperty("application", pwApplication),
                new JProperty("auth", pwAuth),
                new JProperty("notifications",
                    new JArray(
                        new JObject(
                            new JProperty("send_date", "now"),
                            new JProperty("ignore_user_timezone", true),
                            new JProperty("data",
                                new JObject(
                                    new JProperty("custom", "json data"))),
                            new JProperty("platforms",
                                new JArray(1)), //1- IOS, 3 - Android
                            new JProperty("content", message),
                            new JProperty("page_id", richPageId),
                            new JProperty("ios_badges", 5),
                            new JProperty("link", link),
                            new JProperty("devices",
                                new JArray(device_id))
            ))));
return PWCall("createMessage", json);

json for Android which works fine.

JObject json = new JObject(
                new JProperty("application", pwApplication),
                new JProperty("auth", pwAuth),
                new JProperty("notifications",
                    new JArray(
                        new JObject(
                            new JProperty("send_date", "now"),
                            new JProperty("ignore_user_timezone", true),
                            new JProperty("data",
                                new JObject(
                                    new JProperty("custom", "json data"))),
                            new JProperty("platforms",
                                new JArray(3)), //1- IOS, 3 - Android
                            new JProperty("content", message),
                            new JProperty("page_id", richPageId),
                            new JProperty("link", link),
                            new JProperty("android_root_params",
                                new JObject(
                                    new JProperty("key", "value"))),
                            new JProperty("android_icon", "icon.png"),
                            new JProperty("android_header", title),
                            new JProperty("devices",
                                new JArray(device_id))
            ))));
return PWCall("createMessage", json);

Any help would be greatly appreciated.

asked 13 Jun '14, 11:19
Linerd_push's gravatar image

Linerd_push
215

edited 13 Jun '14, 11:28

Good afternoon PushWoosh support team, can anyone help me? Everything works fine except this.

I have to use remote API in web service because my customer wants to enable users to call it to push notification.

Thanks.

permanent link
answered 16 Jun '14, 08:31
Linerd_push's gravatar image

Linerd_push
215

Why the response from the remote API is {"status_code":200,"status_message":"OK","response":{"Messages":["xxxx-xxxxxxxx-xxxxxxxx"]}} but iPhone doesn't receive the notification?

Do I miss some necessary attributes in JSON?

permanent link
answered 16 Jun '14, 08:42
Linerd_push's gravatar image

Linerd_push
215

we are getting the same response {"status_code":200,"status_message":"OK","response":{"Messages":["...."]}} from the remote API but in iPhone does not receive any notification even in the pushwoosh website history showing the web api request.

In Android everything working fine.

is any configuration missing in iOS please response for the same?

permanent link
answered 02 Nov '14, 07:05
cvssandhu's gravatar image

cvssandhu
1

What you should do in this case:
1. Check the Status of iOS pushes in the Push History
2. Make sure your provision profile matches the gateway. "Developer" profile - Sandbox gateway, "AdHoc" profile - Production gateway.

permanent link
answered 24 Nov '14, 11:57
shader's gravatar image

shader
3.9k7

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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:

×446
×353
×83
×12

question asked: 13 Jun '14, 11:19

question was seen: 1,573 times

last updated: 24 Nov '14, 11:57