【问题标题】:Parse retrieve User解析检索用户
【发布时间】:2016-03-31 08:05:48
【问题描述】:

我想问一下为什么控制台会打印这样的东西

[<PFUser: 0x7fd991f4eff0, objectId: wWfeR2MZQi, localId: (null)> {
}]

当另一个打印时

<PFUser: 0x7fd991f145e0, objectId: wWfeR2MZQi, localId: (null)> {
    ACL = "<PFACL: 0x7fd991f2d3f0>";
    displayName = alexander;
    email = "alexanderGGWP@LIVE.com";
    username = alexander;
}

,我都是 PFUSer,但他们打印出不同的东西。

【问题讨论】:

  • 是数组中的第一个吗?

标签: ios parse-platform pfquery pfuser


【解决方案1】:

两个 PFUser 不同(您可以通过 0x7fd991f4eff0 和 0x7fd991f145e0 识别)但属于同一类或说表(在 Parse 中)。请检查任何一个 PFUser 实例是否为零...

【讨论】:

  • 但是objectId是一样的
  • true,但两个 PFUser 实例不相同。
【解决方案2】:

第一个 PFUser 看起来好像还没有完全从网络中获取。第二个看起来好像有。

[user fetchIfNeededInBackgroundWithBlock:^(PFObject * _Nullable object, NSError * _Nullable error) {
NSLog(@"%@", object);
            }];

如果您在第一个上 fetchIfNeeded*,它的检查是否与第二个相同?

【讨论】:

    猜你喜欢
    • 2014-12-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多