Registry / messaging / sideshow-apns2

sideshow-apns2

JSON →
library0.25.0gogounverified

Package apns2 is a Go Apple Push Notification Service (APNs) provider for sending remote notifications to iOS, tvOS, and OS X apps using HTTP/2.

go get github.com/sideshow/apns2
INSTALL
IMPORT
SIG · SIDESHOW-APNS2
S
sideshow-apns2
messaginggov0.25.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

apns2
github.com/sideshow/apns2

Sends a push notification to an iOS device via APNs.

package main import ( "log" "github.com/sideshow/apns2" "github.com/sideshow/apns2/certificate" ) func main() { cert, _ := certificate.FromP12File("cert.p12", "") client := apns2.NewClient(cert).Production() notification := &apns2.Notification{ DeviceToken: "device-token", Payload: []byte(`{"aps":{"alert":"Hello!"}}`), } res, err := client.Push(notification) if err != nil { log.Fatal(err) } log.Printf("APNs response: %v", res) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.25.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
sideshow-apns2 — go get sideshow-apns2 · libregistry