2014-11-24 30 views
0

我必須使用鈦框架實現ios推送通知。使用鈦服務器生成iphone推送通知

如果我已經與ACS加速器服務器一起實現,我正在獲取推送通知。但是如果我已經使用php腳本實現,我沒有收到通知。我得到以下錯誤:

{"meta":{"code":422, 
     "status":"fail", 
     "message":"Missing fields. Required: to_ids or friends", 
     "method_name":"Notify"}}" 

請給我一個解決方案。

我都跟着tutorial

編輯:

我已經創建了PEM文件。可能是這個文件中的問題。我如何創建一個pem文件,我如何驗證它?

回答

0

正如我給出的pem文件路徑是錯誤的。這就是獲取「請求失敗」錯誤。現在它工作正常。

+0

如果有人遇到此問題,請檢查您的pem文件和pem文件路徑。並檢查端口2195是否打開。 – user2218667 2014-11-27 04:47:38

0

如果你想將通知發送所有檢查其餘部分之前訂閱的頻道用戶/令牌嘗試改變:

$c_opt[CURLOPT_POSTFIELDS] = "channel=".$channel."&payload=".$json; 

在:

$c_opt[CURLOPT_POSTFIELDS] = "channel=".$channel."&payload=".$json.'&to_ids="everyone"'; 

您有來自notify.json方法和(來自notify.json acs rest api docs)的錯誤消息:

Specify either friends or to_ids. Enterprise users can also specify where. One of these parameters must be used. These parameters cannot be used simultaneously.

及更高版本:

to_ids: String

Comma-separated list of user IDs to send the notification to users who are subscribed to the specified channel. Up to 1000 users can be specified. You cannot use this parameter when using a location query with the where parameter. Application admins can set this parameter to everyone to send to all devices subscribed to the channel. If you are using the web interface, you do not need to specify this parameter.

0
  1. 用文本編輯器打開你的pem文件。
  2. 檢查您的pem文件類型是否開發或分發。
  3. 同時檢查您的bundel標識符顯示correclty。