I'm trying to retrieve the current user's current geopoint, but nothing happens when I call the geoPointForCurrentLocationInBackground:
. I can't log the NSLog
's from the block, however the other NSLog
appears in the console.
- (IBAction)whereCurrentUser:(id)sender {
[PFGeoPoint geoPointForCurrentLocationInBackground:^(PFGeoPoint *geoPoint, NSError *error) {
if (geoPoint) {
NSLog(@"GEOPOINT %@", geoPoint);
}
else
{
NSLog(@"ERROR");
}
}];
NSLog(@"BUTTON TAPPED");
}
Do I need to implement something else? The documentation is quite clear therefore I can't figure out what could be the problem.