gpt4 book ai didi

ios - 如何获取所有在解析中注册的用户.. 在 ios 中使用 PFInstallation

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:58:19 25 4
gpt4 key购买 nike

我正在使用下面的代码来获取用户,但我无法获取它。应用程序崩溃了......请帮助我获取所有安装对象列表。

PFQuery *userQuery = [PFQuery queryWithClassName:@"_Installation"];
[userQuery findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (!error) {
// The find succeeded.
NSLog(@"Successfully retrieved %d scores.", objects.count);
NSLog(@"objc...%@",objects);
// Do something with the found objects
for (PFObject *object in objects) {
NSLog(@"id...%@",object.objectId);
}
} else {
// Log details of the failure
NSLog(@"Error: %@ %@", error, [error userInfo]);
}
}];

最佳答案

试试这个:

PFQuery *userQuery = [PFInstallation query];
[userQuery findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (!error) {
// The find succeeded.
NSLog(@"Successfully retrieved %d scores.", objects.count);
NSLog(@"objc...%@",objects);
// Do something with the found objects
for (PFObject *object in objects) {
NSLog(@"id...%@",object.objectId);
}
} else {
// Log details of the failure
NSLog(@"Error: %@ %@", error, [error userInfo]);
}
}];

仅供引用,Wain 关于安装不是用户的评论是正确的。您确定这是您要查询的类吗?

关于ios - 如何获取所有在解析中注册的用户.. 在 ios 中使用 PFInstallation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31920676/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com