-
Notifications
You must be signed in to change notification settings - Fork 45
Hanging on send() #46
Copy link
Copy link
Open
Description
c.Send(m) isn't returning and I'm not sure why. I created a client without error and am not receiving any errors on sent PNs.
c, err := apns.NewClientWithFiles(apns.SandboxGateway, CERT_PEM, KEY_PEM)
if err != nil {
log.Println("Client error: ", err.Error())
}
go func() {
for f := range c.FailedNotifs {
log.Println("Notif", f.Notif.ID, " failed with ", f.Err.Error())
}
}()
p := apns.NewPayload()
p.APS.Alert.Body = content
badge := 1
p.APS.Badge = &badge
p.APS.Sound = "bingbong.aiff"
m := apns.NewNotification()
m.Payload = p
m.DeviceToken = author.PnId
m.Priority = apns.PriorityImmediate
m.ID = content
log.Println("---")
c.Send(m)
log.Println("...")
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels