blackbeans / Apns
apns is a simple golang package for ios notification based http2 protocol
Stars: ✭ 100
Programming Languages
go
31211 projects - #10 most used programming language
Projects that are alternatives of or similar to Apns
Apnotic
A Ruby APNs HTTP/2 gem able to provide instant feedback.
Stars: ✭ 360 (+260%)
Mutual labels: apns, http2, connection-pool
Apns Http2
A Java library for sending notifications via APNS using Apple's HTTP/2 API.
Stars: ✭ 194 (+94%)
Mutual labels: apns, http2
Docker Swift Apns
A collection of Docker images to build APNS providers in Swift
Stars: ✭ 34 (-66%)
Mutual labels: apns, http2
Apns2
⚡ 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.
Stars: ✭ 2,569 (+2469%)
Mutual labels: apns, http2
MongoosePush
MongoosePush is a simple Elixir RESTful service allowing to send push notification via FCM and/or APNS.
Stars: ✭ 101 (+1%)
Mutual labels: http2, apns
node-apn-http2
Communicate with Apple Push Notification Service via native Node.js v8.8.1+ HTTP2 module (node-apn drop-in)
Stars: ✭ 25 (-75%)
Mutual labels: http2, apns
apns2
Node client for connecting to Apple's Push Notification Service using the new HTTP/2 protocol with JSON web tokens
Stars: ✭ 66 (-34%)
Mutual labels: http2, apns
Airnotifier
Push Notifications Server for Human Beings.
Stars: ✭ 522 (+422%)
Mutual labels: apns, http2
Go Apns2
Go package for HTTP/2 Apple Push Notification Service.
Stars: ✭ 53 (-47%)
Mutual labels: apns, http2
Uniqush Push
Uniqush is a free and open source software system which provides a unified push service for server side notification to apps on mobile devices.
Stars: ✭ 1,238 (+1138%)
Mutual labels: apns
River
An HTTP/2 (HTTP2) client for Elixir (a work in progress!)
Stars: ✭ 78 (-22%)
Mutual labels: http2
Pymysql Pool
A simple but robust connection pool (with multiplexing) base on PyMySQL, mainly used for multi threads mode, which also compatible with single thread mode.
Stars: ✭ 93 (-7%)
Mutual labels: connection-pool
Pushy
A Java library for sending APNs (iOS/macOS/Safari) push notifications
Stars: ✭ 1,353 (+1253%)
Mutual labels: apns
apns is an apple apns libary for http2
feature:
-
support connection pool
-
support ping frame using check connection alive
============
install
go get golang.org/x/net/http2
go get github.com/blackbeans/apns
quick start
create apns client
certificate, _ := FromP12File("./push.p12", "xxxx")
pool, err := NewConnPool(10, 10, 10, 20*time.Second,
func(ctx context.Context) (*ApnsConn, error) {
conn, err := NewApnsConn(ctx, certificate, URL_PRODUCTION, 10*time.Second)
if nil != err {
log.Printf("Create Apns Conn Fail %v\n",err)
}
return conn, err
})
//build notification
notify := &Notification{
DeviceToken: "your device token",
Topic: "bundleid ",
ApnsID: "uuid",
Payload: PayLoad{
Aps: Aps{Alert: fmt.Sprintf("hello%d", i)}}}
//send push
c,err:= pool.Get()
if nil!=err{
//
}
//note : release connection
defer pool.Release(c)
err =c.SendMessage(notify)
if nil!=err{
//encounter error
}else{
if notify.Response.Status != 200{
//may send error
log.Printf("Response Err %s",notify.Response.Reason)
//maybe u need resent
}
}
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].