Skip to content

Instantly share code, notes, and snippets.

@mariovisic
Created May 11, 2011 05:30
Show Gist options
  • Save mariovisic/965976 to your computer and use it in GitHub Desktop.
Save mariovisic/965976 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'
APN::SenderDaemon.new(ARGV).daemonize
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
@mariovisic
Copy link
Author

Thanks, have updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment