script/plugin install git://github.com/samsoffes/apple_push_notification.git
一般都以插件安装Export 2 items...
. cert.p12
. openssl pkcs12 -in cert.p12 -out apn_development.pem -nodes -clcerts && rm -f cert.p12
是需要输入密码的mkdir config/certs
mv apn_development.pem config/certs
ApplePushNotification.apn_enviroment = Rails.env.to_sym
>> token = "XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX"
>> d = Object.new
>> d.extend ApplePushNotification
>> d.device_token = token
>> d.send_notification :alert => "So flexible"
>> nil