Open joelchen opened 9 years ago
Thanks !
The recent change allows to use alternate payload formats: Notification accepts anything implementing the Topic interface as a payload. Unfortunately this changes the interface a bit.
I've fixed the example. The best way to use the library is now to instantiate a Payload object, and then set it on the Notification using SetPayload:
payload := &apns.Payload{}
payload.SetAlertString(msg.Text)
notif.SetPayload(payload)
I am following the example usage, and encountered the following panic during runtime:
Removing the (*apns.Payload) gives me the following build error:
Looking through the source code, I found that Payload was recently changed to Topic, however the functions are still under Payload.