请至少保存一个 Installation。 Installation是需要我自己创建忙?如果自己创建那么系统给的带下划线的_Installation又是怎么回事?帮忙问一下吧,谢谢了。
-
创建时间
16年9月7日
-
最后回复
16年9月8日
-
16
回复
-
3.1K
浏览
-
3
用户
-
4
链接
请至少保存一个 Installation。 Installation是需要我自己创建忙?如果自己创建那么系统给的带下划线的_Installation又是怎么回事?帮忙问一下吧,谢谢了。
_Installation 对应的是一台移动端的设备。
你可以看到你的 test 项目里,_Installation 表为空。
然后云引擎推送时,找不到任何的设备,所以会报错:请至少保存一个 Installation
客户端要保存 Installation,请参考:
iOS / https://leancloud.cn/docs/ios_push_guide.html#保存_Installation10
Android / https://leancloud.cn/docs/android_push_guide.html#保存_Installation9
Cloud::define("getTodos",function($params,$user){
$query = new \LeanCloud\Query("Todo");
$query->equalTo("content",$params["content"]);
try {
$result = $query->find();
} catch (\LeanCloud\CloudException $sex) {
error_log($sex->getMessage());
return "对不起,没有你要查询的条件";
}
foreach ($result as $resulets_detail) {
return "恭喜你查询到了数据(括号内)";
}
return "恭喜你查询到了数据(括号外)";
})
以上是我在云函数中定义的代码:
下面的是我在iOS端调用的代码:在iOS端调用云函数([AVCloud callFunctionInBackground:@"在云端自定义的函数"
withParameters:nil
block:^(id object, NSError *error) {
if(error == nil){
NSLog(@"%@",object);
} else {
NSLog(@"%@",error.description);
}
}];)的时候返回的信息: Error Domain=NSURLErrorDomain Code=-1007 "too many HTTP redirects" UserInfo={NSUnderlyingError=0x154d75cc0 {Error Domain=kCFErrorDomainCFNetwork Code=-1007 "(null)"}, NSErrorFailingURLStringKey=https://api.leancloud.cn/1.1/functions/sayHello, NSErrorFailingURLKey=https://api.leancloud.cn/1.1/functions/sayHello, NSLocalizedDescription=too many HTTP redirects}
https://api.leancloud.cn/1.1/functions/getTo2 我这个链接是不是有问题?一直报404的错误,说找不到文件
主题 | 分类 | 回复 | 浏览 | 活动 |
---|---|---|---|---|
AVUser cannot be cast to LeanchatUser | 问题讨论 | 4 | 804 | 15-11-18 |
使用cli工具(lean deploy)部署成功后,访问URL返回 Application not Found | 问题讨论 | 4 | 2.0K | 18-03-26 |
Node.js 项目部署失败 | 问题讨论 | 5 | 1.5K | 17-01-24 |
开增值税专用发票的问题 | 账户和使用 | 1 | 916 | 22-03-2 |
iOS 自动上传符号文件脚本报错 | 开发组件 | 3 | 3.4K | 17-10-20 |