【发布时间】:2021-01-17 00:24:35
【问题描述】:
收到此错误:
'NSInternalInconsistencyException', reason: 'Key "username" has no data. Call fetchIfNeeded before getting its value.'
我有一个包含PFUser 作为指针的联合类。当我从联合类中获取用户时,它只有预期的指针,但这种情况失败并导致上述错误:
if (user.username != nil) {
username = user.username ?? "no username"
}
/** THE ACCESSING property
The username for the `PFUser`.
*/
@property (nullable, nonatomic, strong) NSString *username;
【问题讨论】:
标签: ios objective-c parse-platform back4app