require 'rubygems' | |
require 'apns' | |
#APNS.host = 'gateway.sandbox.push.apple.com' | |
APNS.host = 'gateway.push.apple.com' # プロダクションの場合 | |
APNS.port = 2195 | |
APNS.pem = 'xxx_apns_test.pem' | |
device_token = '{取得したdevice_token}' | |
APNS.send_notification(device_token, :alert => 'Hello iPhone!', :badge => 3, :sound => 'default') | |
puts 'finish' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment