Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't send custom Payload other than APS #52

Closed
guhan0 opened this issue Apr 26, 2017 · 3 comments
Closed

Can't send custom Payload other than APS #52

guhan0 opened this issue Apr 26, 2017 · 3 comments

Comments

@guhan0
Copy link

guhan0 commented Apr 26, 2017

Please add a provisioning to send a custom payload along with APS key.

@JanC
Copy link

JanC commented Apr 26, 2017

I'm using pusher and the method -[NWPusher pushPayload:token:identifier:error:] allows you to send any kind of JSON.

You just have to serialize your JSON object into a JSON string.

@guhan0
Copy link
Author

guhan0 commented Apr 26, 2017

{
"aps":
{
"alert":"Testing.. (70)",
"badge":10,
"category":"MAIL",
"content-available":1,
"mutable-content":1,
"sound":"default"
};
"addInfo":
{
"testKey":"TestValue"
}
}
This type of Payload is not working

@guhan0 guhan0 closed this as completed Apr 26, 2017
@JanC
Copy link

JanC commented Apr 26, 2017

Your JSON is malformed. This should work

{
  "aps": {
    "alert": "Testing.. (70)",
    "badge": 10,
    "category": "MAIL",
    "content-available": 1,
    "mutable-content": 1,
    "sound": "default"
  },
  "addInfo": {
    "testKey": "TestValue"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants