2014-10-09 48 views
2

我使用休斯敦寶石從我的Rails app.I發送推送通知,試圖打印從API.It的響應會返回一個整數(120124192,等...)蘋果推送通知從Rails應用程序

是如果推送通知已成功處理,則可以從我的Rails應用程序中找到任何方法。

certificate_enterprise = File.read("config/enterprise.pem") 
connection = Houston::Connection.new("apn://gateway.sandbox.push.apple.com:2195", certificate, pass_phrase) 
connection.open 
connection.write(notification.message) 
connection.close 

回答

1

的APNS服務上不提供反饋是否已經接收和處理的通知,但您可以連接到一個反饋服務,看它是否未能達到任何你所嘗試的設備與溝通:APNS feedback service documentation

+0

是否有任何方法可以從我正在使用的gem訪問feedbak服務? – 2014-10-09 08:12:53

+1

根據GitHub頁面,有一個方法:https://github.com/nomad/Houston(向下滾動到「反饋」)。 – 2014-10-09 13:12:13

+0

謝謝@Nicholas Smith .. – 2014-10-09 15:49:24