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

apns-push-type header #25

Open
ab320012 opened this issue Sep 24, 2019 · 1 comment
Open

apns-push-type header #25

ab320012 opened this issue Sep 24, 2019 · 1 comment

Comments

@ab320012
Copy link

Hi guys, trying to find a libirary that supports the new ios 13 apns push type headers, i am not seeing it in this library wondering if you guys are going to support it

https://github.com/calonso/ruby-push-notifications/blob/master/lib/ruby-push-notifications/apns/apns_notification.rb#L67

@Juksefantomet
Copy link
Collaborator

Juksefantomet commented Sep 24, 2019

We are using push towards app on ios at work - using this Gem.

You can use FCM to push - have you tried FCM / APNS guides on push notifications.

It should work towards 13. Trying to confirm with my co-worker here exactly what versions we are targeting, but we did bump up to latest recently.

Using this gem you can use it. but do be aware that the payload has to look like this:

ios_payload =
  {
    "notification": {
      "title": "Greetings #{user}",
      "body": message,
      "badge": 1,
      "sound": true
    }
  }

android_payload =
  {
    "data": {
      "sound": true,
      "url": "#{url_payload}",
      "title": "Greetings #{user}",
      "body": message,
      "ttl": '2419200s',
      "count": '1'
    }
  }

This has to do with behavior, we discovered that after alot of testing, in relation to badge updating and missing/non-functioning sound/vibration on both platforms.

Hope this helps!

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