Home
Softono

Apns Go

Open source MIT Go
17
Stars
1
Forks
0
Issues
1
Watchers
4 years
Last Commit

 About Apns Go

HTTP/2 Apple Push Notification service (APNs) provider for Go with token-based connection

Platforms

Web Self-hosted

Languages

Go

Links

Need Help Installing Apns Go?

We provide expert installation service for this software. Our team will install, configure, and secure Apns Go on your server. plans start at just $30.

APNs Provider

HTTP/2 Apple Push Notification service (APNs) provider for Go with token-based connection

Example:

key, err := apns.AuthKeyFromFile("AuthKey_XXXXXXXXXX.p8")
if err != nil {
	log.Fatal(err)
}

token := apns.NewToken(key, "XXXXXXXXXX", "YYYYYYYYYY")
client := apns.NewClient(token, nil)

n := &apns.Notification{
	DeviceToken: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	Host:        apns.HostDevelopment,
	Topic:       "com.example.app",
	Payload: apns.BuildPayload(&apns.APS{
		Alert: "Hi",
	}, nil),
}

fmt.Println(client.Push(n))