Skip to content

Instantly share code, notes, and snippets.

@szehnder
Forked from mariovisic/Gemfile
Created November 8, 2011 23:06
Show Gist options
  • Save szehnder/1349605 to your computer and use it in GitHub Desktop.
Save szehnder/1349605 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
RAILS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
require 'rubygems'
require 'apn'
require 'apn/sender_daemon'
gem 'apn_sender', :require => 'apn'
gem 'daemons'
# notify(token, options)
APN.notify('FE6648........', :alert => 'New Message', :badge => 4, :sound => true, :other_information => 'value')
script/apn_sender --environment=development --verbose start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment