apns2
HTTP/2 Apple Push Notification provider for Go with token and certificate authentication.
Why consider apns2?
apns2 is an open-source Go package written by Adam Jones (sideshow). It delivers push notifications to iOS, macOS, watchOS, and tvOS devices using Apple’s HTTP/2 APNs provider API, providing connection pooling, background push support, and automatic TLS renegotiation.
Learn apns2 by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide2 sections
Overview of apns2
apns2 provides a fast, concurrent HTTP/2 Apple Push Notification client for Go backend services.
Quickstart
go get -u github.com/sideshow/apns2import "github.com/sideshow/apns2"import "github.com/sideshow/apns2/token"authKey, _ := token.AuthKeyFromFile("AuthKey.p8")t := &token.Token{AuthKey: authKey, KeyID: "KEY_ID", TeamID: "TEAM_ID"}client := apns2.NewTokenClient(t).Production()notification := &apns2.Notification{DeviceToken: "token", Topic: "com.example.app", Payload: []byte(`{"aps":{"alert":"Flash Sale!"}}`)}res, _ := client.Push(notification)apns2 is licensed under the permissive MIT License.
Related tools
More options with a similar category or technology profile.
diskus
Minimal, fast alternative to du -sh written in Rust using multi-threaded directory traversal.
peco
Simplistic interactive filtering tool for Unix pipelines, process lists, and file trees.
Dapr CLI
Command-line tool for managing Dapr distributed application runtime environments and sidecars.
Freeze
Generate beautiful image screenshots and SVGs of code snippets and terminal outputs.