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

Local and Remote Notification Programming Guide