0
我是Rails的新手。我正嘗試使用rpush寶石發送推送通知。Rpush通知未能交付
我以下步驟:
n = Rpush::Gcm::Notification.new
n.app = Rpush::Gcm::App.find_by_name("android_app")
n.registration_ids = ["#{d.device_token}"]
n.data = { title: "#{self.title}"}
n.save!
通知被保存,但沒有得到發表,我也得到了以下錯誤說明:
"Unable to deliver notification 10, received error (Failed to deliver to all recipients. Errors: NotRegistered.)"
無法瞭解這裏的問題。請幫幫我。
謝謝!
從此[論壇]根據(https://github.com/rpush/rpush/問題/ 96),也許你的系統中有一個無效的設備註冊ID。此消息表明通知沒有通過,因此您必須擁有另一個註冊ID,該ID對於正在通過的通知有效。您可以檢查此給定的鏈接以獲取更多可能的解決方法。另外請確保你[device_token](https://github.com/rpush/rpush/issues/27)是正確的。 – abielita