We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package main import ( "fmt" "github.com/timehop/apns" ) func main() { c, _ := apns.NewClient("gateway.sandbox.push.apple.com:2195", "dev_ck.pem", "dev_pk.pem") p := apns.NewPayload() p.APS.Alert.Body = "I am a push notification!" p.APS.Badge.Set(5) p.APS.Sound = "turn_down_for_what.aiff" m := apns.NewNotification() m.Payload = p m.DeviceToken = "A_DEVICE_TOKEN" m.Priority = apns.PriorityImmediate resp := c.Send(m) fmt.Printf("%v\n",resp) }
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan send (nil chan)]: main.main() D:/go/bin/project/src/applePush/applyPush.go:21 +0x1b2 exit status 2 ``
The text was updated successfully, but these errors were encountered:
The first issue I see is that you should use NewClientWithFiles instead of NewClient. It's always good to check errors that functions return.
NewClientWithFiles
NewClient
Sorry, something went wrong.
No branches or pull requests
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan send (nil chan)]:
main.main()
D:/go/bin/project/src/applePush/applyPush.go:21 +0x1b2
exit status 2
``
The text was updated successfully, but these errors were encountered: