使用Houston在iOS上发送推送通知

时间:2016-11-09 03:18:51

标签: ios bash apple-push-notifications

我正在尝试使用此框架从我的MacBook向我的iOS设备发送推送通知。

https://github.com/nomad/houston

我已经使用此网络应用验证了我的.pem证书正在运行:

http://www.pushwatch.com/apns/

enter image description here

通过网络应用程序推送到我的手机。证明我的证书没问题。

当我尝试休斯顿框架时,我什么也得不到。但它确实告诉我推送通知已成功发送:

Rutgers-MacBook-Pro:Desktop rutger$ apn push "c2d080f7be677353ae654d07ab1ecc54fb894e2757eb2595661216a46d9d6c4f" -c /Users/rutger/Desktop/Runk-Push-Prod/RunkProdPush.pem -m "Hello from the command line! "
1 push notification sent successfully

我也尝试过这样:

Rutgers-MacBook-Pro:Desktop rutger$ apn push "c2d080f7 be677353 ae654d07 ab1ecc54 fb894e27 57eb2595 661216a4 6d9d6c4f" -c /Users/rutger/Desktop/Runk-Push-Prod/RunkProdPush.pem -m "Hello from the command line! "
1 push notification sent successfully

1 个答案:

答案 0 :(得分:1)

发现它!

我失踪了:

-e production 

所以我的命令应该是:

apn push "c2d080f7be677353ae654d07ab1ecc54fb894e2757eb2595661216a46d9d6c4f" -e production -c /var/www/html/backend/certs/runkprodpush.pem -m "Hello from the command line! "