Skip to content

Instantly share code, notes, and snippets.

@adamcooke
Created December 15, 2015 12:20
Show Gist options
  • Save adamcooke/960594d35a79729bc93c to your computer and use it in GitHub Desktop.
Save adamcooke/960594d35a79729bc93c to your computer and use it in GitHub Desktop.
require 'apns'
# Create a client object
client = APNS::Client.new('https://apns.company.com', auth_key)
# Make a notification
notification = APNS::Notification.new
notification.alert_body = 'Hello World!'
# Send the notification to the device token
client.notify(device_token, notification)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment