0
1

Hello,

I'm using pushwoosh-phonegap-plugin 7.2.3 for Cordova 8.0.0 and I can't get notification anymore on iOS (Android works fine).

Everything seems to go well according to the requests' responses :

Register device on login (/registerDevice from iPhone) :

|    Pushwoosh request:
| Url:      https://XXXXX-XXXXX.api.pushwoosh.com/json/1.3/registerDevice
| Payload:  {"request":{"gateway":"sandbox","jailbroken":0,"app_version":"XXX","application":"10648-E5335","sounds":[],"device_type":1,"userId":"EF2504AC-0745-4FCF-BFBA-1735F28CC014","language":"fr","hwid":"EF2504AC-0745-4FCF-BFBA-1735F28CC014","package":"com.payboost.budgetiz","timezone":"3600","push_token":"307c62fb9472bf0c96f354c540766e349d6f9e01c19ee2f8e6bd1dbe4d0d8a2f","os_version":"10.3.3","v":"5.5.3","device_model":"iPhone8,1"}}
| Status:   "200 no error"
| Response: {"status_code":200,"status_message":"OK","response":{"iosCategories":[]}}
 [PW] [I] -[PWPushNotificationsManagerCommon] Registered for push notifications: 307c62fb9472bf0c96f354c540766e349d6f9e01c19ee2f8e6bd1dbe4d0d8a2f

Then I try to send a push notification form my API :

Request Sent to pushWoosh (/createMessage from API)

{"request":{"application":"10648-E5335","auth":"xxxxxxGoodTokenxxxxxx","notifications":[{"send_date":"now","ignore_user_timezone":true,"content":"TEST:We got a problem","platforms":[1],"devices":["307c62fb9472bf0c96f354c540766e349d6f9e01c19ee2f8e6bd1dbe4d0d8a2f"],"apns_trim_content":1,"android_priority":2,"ios_badges":"+1","data":{"page":"myPage"}}]}}

And this is the response :

Response from pushWoosh API to /createMessage

{"status_code":200,"status_message":"OK","response":{"Messages”:[“XXX-XXX—XXXX"],"Warnings":["Platforms for devices list is not allowed"]}}

I believe that I'm getting "Platforms for devices list is not allowed" because I'm sending my notification to only one device ?

Anyway I never get the notification.

Then if I call /getUnregisteredDevices I get the following result :

Response from /getUnregisteredDevices after a push

{
    "status_code": 200,
    "status_message": "OK",
    "response": {
        "devices": {
            "1": [
                {
                    "push_token": "307c62fb9472bf0c96f354c540766e349d6f9e01c19ee2f8e6bd1dbe4d0d8a2f",
                    "hwid": "EF2504AC-0745-4FCF-BFBA-1735F28CC014",
                    "datetime": "2018-02-07 16:57:00"
                }
            ]
        }
    }
}

(This is the same ID as my registered device).

Once again everything works fine on Android.

My "Push Notification" capability is ON in XCode. Am I doing something wrong ?

Thanks.

P.S: These are NOT actual tokens and IDs

asked 07 Feb, 17:34
ginjiban's gravatar image

ginjiban
263

edited 07 Feb, 17:38

After contacting the support, it seems that the problem was due to a mix of production / development environment.

Auto-signin on XCode used a development profile while my PushWoosh application was waiting for a production environment.

Apparently you don't need to use any kind of certificate for Android, that's why it was working.

Cheers !

permanent link
answered 08 Feb, 14:39
ginjiban's gravatar image

ginjiban
263

Hello,

I believe that I'm getting "Platforms for devices list is not allowed" because I'm sending my notification to only one device ?

Yes, this warning is there since you are using "platforms" parameter while sending a push notification to less than 10 devices. As per our Remote API guide it is ignored in such cases. However, the push should be delivered.

In order to investigate the issue better, may I ask you to contact our Support Team and provide us with your Pushwoosh username?

Regards, Ivan

permanent link
answered 08 Feb, 05:07
iskoritzky's gravatar image

iskoritzky
4028

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:

×352
×190
×21

question asked: 07 Feb, 17:34

question was seen: 39 times

last updated: 08 Feb, 14:39