timehop / apns

A Go package to interface with the Apple Push Notification Service
https://godoc.org/github.com/timehop/apns
MIT License
185 stars 47 forks source link

How do I simulate FailedNotifs? #10

Closed nathany closed 9 years ago

nathany commented 9 years ago

I'm currently working on a REST API wrapper around APNs. I've been trying to figure out how to handle the FailedNotifs channel, but I'm finding it difficult to send a request that causes an error.

I've tried fiddling around in ToBinary to send an invalid notification, but it ends up with an err.Identifier that doesn't match the notification identifier (err.Identifier just binary gibberish).

I'm wondering how you use FailedNotifs in production? Any suggestions?

nathany commented 9 years ago

I found out that changing a digit in the device token provides an error. Sending a big payload may also cause a failure.