I am trying to save the user's location but the code below is returning an error. Instead of creating a new key "currentLocation" it's returning an error and creating a key "hello." Why would that be?
[PFGeoPoint geoPointForCurrentLocationInBackground:^(PFGeoPoint *geoPoint, NSError *error) {
if (!error) {
NSLog(@"User is currently at %f, %f", geoPoint.latitude, geoPoint.longitude);
[[PFUser currentUser] setObject:geoPoint forKey:@"currentLocation"];
[[PFUser currentUser] saveInBackground];
}
else {
[[PFUser currentUser] setObject:hello forKey:@"hello"];
}
}];
else { NSLog(@"%@", error); ...}. - Yuchen