Created
August 10, 2016 00:54
-
-
Save ryokwkm/23408ce3e9dd662cadd566c87b1f7c11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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