grocer/grocer

New HTTP/2 Push Notification Provider API from Apple

Opened this issue · 10 comments

Apple announced a new provider API coming later in 2015 that is based on HTTP/2.
https://developer.apple.com/videos/wwdc/2015/?id=720 (at about 20 minutes)

The request/response cycle with standard http status codes means that issues like #14 don't need elaborate ring buffer solutions. There is also no need for a separate feedback service.

There will be no need to keep the existing APNS provider API as the new API applies to older devices. The video mentions some other changes, such as 4K payloads and ~100-character device tokens.

For HTTP/2 in Ruby, perhaps: https://github.com/igrigorik/http-2

@nathany, Thanks for the info! This does indeed look like a nice way to resolve #14 (and the handful of related issues). I don't currently have bandwidth to move to the new HTTP/2 API, but would be happy to serve as a sounding board, reviewer, etc... if you (or someone else out there) wishes to tackle it.

+1. I also currently don't have the spare time to fully implement and maintain this and neither am I 100% confident that I have the skills to create a robust, production-quality implementation, but would be willing to play around with it once the API is finally opened on Apple's end.

Would appreciate a ping on this thread when the API is open just in case I miss the news.

Stay tuned, we’ll be going live with the new protocol and publishing new documentation soon.
Paul Danbold

It's not available quite yet, but the sandbox is working from my own tests.

For your information, the new Notification API is now available:
https://developer.apple.com/news/?id=12172015b

For people who also use Go, this is the library I'm working on:
https://github.com/RobotsAndPencils/buford

That's great news!

I've got an app that was written a couple years back that uses grocer, and our push notification cert is about to expire. I've been working with another developer for a few hours now to try and get the new cert working, but we can't seem to get it.

However, we did successfully send one using houston's CLI. I'm not 100% sure, but I think the new certs don't work with grocer at the moment.

@dkniffin - You don't need to create a new certificate. Just renew the existing certificate, once it expires. Upload the same to whatever you use to send pushes. Creating a new one will work too, but make sure, it's for the same app bundle, com.'orgname'.'appname'

Moving to the HTTP/2 push provider API is a desirable and necessary step in the long term. It will also alleviate several tricky and subtle issues we (and many other APNS clients) have with the original push provider APIs.

However, I don't use Grocer in my current product, and so am unable to dedicate much time to it other than smaller maintenance things. I am looking for someone (or someones) else to help with this project and specifically with moving it to the HTTP/2 API.

I would be happy to help with such an effort, but I can't be the one driving it at this time. Please let me know if you are interested in leading the effort and/or in helping with the project.

alloy commented

I have been working on a HTTP/2 client, which is going into production this week https://github.com/alloy/lowdown. Feel free to take code from it, if that helps.

On this note, I've recently released NetHttp2 (a HTTP/2 client), and also Apnotic (a full APN solution that can be easily embedded in Rails too).

Feel free to poke from there, let me know if I can be of help.