Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. APNs2

APNs2

MITGov0.25.0

A Go package for sending Apple Push Notifications via the HTTP/2 APNs provider API.

GitHubGitHub
3.2k stars355 forks0 contributors

What is APNs2?

APNS/2 is a Go package that enables developers to send Apple Push Notifications (APNs) to iOS, tvOS, Safari, and macOS applications using Apple's HTTP/2 provider API. It solves the problem of integrating push notifications into Go backends by providing a fast, reliable, and feature-complete library that handles authentication, connection management, and payload construction.

Target Audience

Go developers building backend services for Apple ecosystem apps (iOS, macOS, tvOS, Safari) that require push notification capabilities.

Value Proposition

Developers choose APNS/2 for its performance (HTTP/2 persistent connections), modern feature support (including iOS 15 features and JWT authentication), and clean Go-native API that simplifies APNs integration compared to lower-level implementations.

Overview

⚡ HTTP/2 Apple Push Notification Service (APNs) push provider for Go — Send push notifications to iOS, tvOS, Safari and OSX apps, using the APNs HTTP/2 protocol.

Use Cases

Best For

  • Sending push notifications from Go backend services to iOS apps
  • Implementing VoIP or PushKit notifications in Go applications
  • Building notification services for Safari web push
  • Migrating from legacy APNs binary protocol to HTTP/2
  • Handling high-volume push notification delivery with persistent connections
  • Using JWT token authentication instead of certificate-based authentication

Not Ideal For

  • Projects not written in Go or requiring multi-language backend support
  • Low-volume notification systems where managed services (e.g., Firebase) offer simpler setup and maintenance
  • Applications needing cross-platform push notifications to Android, Windows, or web browsers beyond Safari
  • Teams preferring fully managed solutions that abstract away APNs certificate and connection management

Pros & Cons

Pros

HTTP/2 Performance

Leverages Apple's HTTP/2 APNs API with persistent connections, enabling high-speed push notification delivery as emphasized in the project's speed documentation.

Modern Authentication Support

Supports JWT token-based authentication alongside certificates, allowing flexible key management with a single signing key for multiple apps across development and production.

Comprehensive iOS Features

Includes up-to-date support for iOS 10+ features like collapse IDs and mutable notifications, plus iOS 15's interruptionLevel and relevanceScore, ensuring compatibility with Apple's latest APIs.

Persistent Connection Optimization

Maintains open connections to APNs as recommended by Apple, improving reliability and throughput for high-volume scenarios without re-establishing TLS handshakes.

Cons

Apple-Only Platform Lock-in

Exclusively designed for Apple's APNs, so it cannot send push notifications to Android, Windows, or other platforms without integrating additional libraries or services.

Manual Performance Tuning Required

Requires developers to manage client instances and connection pooling for optimal performance, adding complexity compared to auto-scaling managed services that handle this automatically.

Certificate/Token Setup Overhead

Initial setup involves handling Apple-specific .p12 certificates or .p8 keys with Key ID and Team ID, which can be error-prone and time-consuming for teams new to APNs.

Frequently Asked Questions

Quick Stats

Stars3,186
Forks355
Contributors0
Open Issues25
Last commit1 year ago
CreatedSince 2016

Tags

#apple#safari#jwt-token#ios#go-library#jwt#notifications#tvos#voip#apple-push-notifications#jwt-authentication#golang#http2#apns#push-notifications#macos

Built With

G
Go

Included in

Go169.1k
Auto-fetched 10 hours ago

Related Projects

AsynqAsynq

Simple, reliable, and efficient distributed task queue in Go

Stars13,683
Forks978
Last commit2 months ago
saramasarama

Sarama is a Go library for Apache Kafka.

Stars12,515
Forks1,864
Last commit1 day ago
CentrifugoCentrifugo

Scalable real-time messaging server in a language-agnostic way. Self-hosted alternative to Pubnub, Pusher, Ably, socket.io, Phoenix.PubSub, SignalR. Set up once and forever.

Stars10,724
Forks730
Last commit1 day ago
WatermillWatermill

Building event-driven applications the easy way in Go.

Stars9,881
Forks505
Last commit14 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub