问题
In my application I store information in other fields of the Parse _User table such as a user rank and home City/State. I was able to read all the data from the table for a user simply by running a PFUser query command.
PFQuery *userQuery = [PFUser query];
[userQuery whereKey:PARSE_CLASS_USER_USERNAME equalTo:currentUser.username];
[userQuery findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (!error)
{
PFObject *user = [objects firstObject];
_userObject = user;
[[DEPostManager sharedManager] setGoingPost:user[@"eventsGoingTo"]];
[[DEPostManager sharedManager] setMaybeGoingPost:user[@"eventsMaybeGoingTo"]];
NSLog(@"Retrieved the user from the server");
}
}];
Now though, when I run this command, the PFObject that is returned only contains the Username, and the Profile Picture. Does anyone have any idea what in the world can be going on here? Before user[@"eventsGoingTo"] returned a value, now it's nil because that information is not being pulled from the server. Why can I not now get the rest of the data from the table? It just stopped working!
回答1:
Hey I fixed my own problem. It seems that when you update to the newest Parse iOS SDK there's an issue with accessing User information. The way to fix it is simply to do a complete uninstall and clean of the app.
来源:https://stackoverflow.com/questions/28839055/parse-ios-sdk-cannot-get-all-fields-from-user-table