Beispiel #1
0
func ExampleApnsService_SendOne() {
	service, _ := Connect("gateway.sandbox.push.apple.com:2195", "dev.pem", "dev.private.pem")
	service.SendOne(notification.MakeNotification(1, "aef4429b", `{"aps":{"alert":"message"}}`))
	failure, _ := service.ReadInvalid(2 * time.Second)
	fmt.Printf("%v", failure)
}
Beispiel #2
0
func (queue Queue) Add(identifier int, token string, payload string) Queue {
	return append(queue, notification.MakeNotification(identifier, token, payload))
}