菜鸟教程小白 发表于 2022-12-12 15:57:34

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


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

<pre><code>PFQuery *userQuery = ;
[userQuery findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
    if (!error) {
      // The find succeeded.
      NSLog(@&#34;Successfully retrieved %d scores.&#34;, objects.count);
      NSLog(@&#34;objc...%@&#34;,objects);
      // Do something with the found objects
      for (PFObject *object in objects) {
            NSLog(@&#34;id...%@&#34;,object.objectId);
      }
    } else {
      // Log details of the failure
      NSLog(@&#34;Error: %@ %@&#34;, error, );
    }
}];
</code></pre></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>试试这个:</p>

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

<p>仅供引用,Wain 的评论是正确的,即安装不是用户。您确定这是您要查询的类(class)吗?</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 如何获取所有在解析中注册的用户..在ios中使用PFInstallation,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/31920676/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/31920676/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 如何获取所有在解析中注册的用户..在ios中使用PFInstallation