Releases: RobotsAndPencils/buford
nervous nightingale
mulling mandrill
- Support for grouping notifications with thread-id #95
leaping leopard
push
Ensure all responses are handled -- not just received.
When using a Queue to push notifications concurrently, previous versions had an internal WaitGroup that ensured all responses were sent (and therefore received) before closing channels and shutting down workers.
The problem was a program could terminate after the last response was sent but before it was finished being processed. To remedy this situation, you are now responsible for maintaining a WaitGroup in the calling code. The queue.Wait()
method has been replaced with queue.Close()
which should only be called after all responses are handled.
See the README for further details.
kind koala
jolly jellyfish
Improve handling of error responses from Apple.
push
- parse GOAWAY error responses from Apple, resolves #33
(thanks to @bradfitz for his work on net/http2 golang/go#14627).
Be sure to go get -u golang.org/x/net/http2
for these improvements.
impatient iguana
Adds new fields for use with the iOS 10 beta.
push
- Add
CollapseID
header for Notification Management introduced in iOS 10 (#62). You can update a notification by using the sameCollapseID
as a previous notification. See the Introduction to Notifications session for more. - Check payload size before hitting Apple's APN server (#67). This saves on making a request, but reports the same error message.
payload
- New
MutableContent
field for Service Extensions introduced in iOS 10. One use for this is having an iPhone download and display media directly in notifications. See the Advanced Notifications session for more. - New
Subtitle
field added to Payload, as mentioned in Introduction to Notifications session for iOS 10.
happy hamster
generous gopher
Concurrent notification sending and a few more API changes.
❯ ./concurrent -c cert.p12 -d {device-token} -n 1000
Time for 1000 notifications: 5.073446529s (5.073446ms ea.)
push
- Send multiple notifications concurrently with Queue. See the README and
example/concurrent/
(#54) - Export
NewClient
again, as it was in v0.4.x, modify theNewService
API.- This is more flexible and easier to use from tests.
- Removed the JSON marshalling version of
Push
and renamedPushBytes
toPush
.- Having
queue.Push
return errors both before/after queueing felt awkward. - Just use
json.Marshal
instead. This helps clarify that payloads can be serialized once and reused.
- Having
This release also contains updates to documentation and examples.
furious flamingo
executive elephant
This release contains a significant number of API changes across the following packages.
push
- NewService API replaces NewClient. #47
- Topic has moved from Headers to Service and is extracted automatically by NewService (see #22)
- revise error responses to include HTTP Status code and Reason from Apple #46
- decode response JSON as a stream #43
certificate
- Load/Decode now return a
tls.Certificate
instead of ax509.Certificate
andPrivateKey
. This matches the behaviour oftls.LoadX509KeyPair
from the standard library, except operating on *.p12 files instead of *.pem. #47
pushpackage
- Sign now accepts a
tls.Certificate
instead of ax509.Certificate
andrsa.PrivateKey
, though note that the key must still be an RSA key. #47