2014-11-24 48 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。