Skip to content
This repository has been archived by the owner on Mar 24, 2020. It is now read-only.

maddiesch/lorkhan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lorkhan

CircleCI Code Climate Issue Count

Apple Push Notification Services client using the HTTP/2 API and Provider Authentication Tokens

Getting Provider Authentication Tokens

See: "Generate a universal provider token signing key" under "Configure push notifications." in Xcode Help

Sending a Push Notification

token = Lorkhan::ProviderToken.new(key_id: '<token key id>', team_id: '<developer team id>', secret: '<PAT secret>')
connection = Lorkhan::Connection.new(production: true, token: token)

notification = Lorkhan::Notification.new('<device token>')
notification.topic = '<your app ID>'
notification.alert = 'Hello from Lorkhan'

connection.push(notification)

Other Gotcha's

  • Your OpenSSL implementation MUST support the ES256 elliptical curve.

Extra reading