Note that there are some explanatory texts on larger screens.

plurals
  1. POlocationManager:didUpdateToLocation not called
    primarykey
    data
    text
    <p>I need some help.</p> <p>When I open Maps I have to grep my current location and send it to server to get all other pins from it. (Like what is nearby ). </p> <p>I set : </p> <pre><code> - (void)viewDidLoad { // if location services are on if([CLLocationManager locationServicesEnabled]) { // if location services are restricted do nothing if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusDenied || [CLLocationManager authorizationStatus] == kCLAuthorizationStatusRestricted ) { NSLog(@"Location tracking disabled."); } else { NSLog(@"all ok"); self.locationMeneger = [[CLLocationManager alloc] init]; self.locationMeneger.delegate = self; [self.locationMeneger setDistanceFilter:kCLDistanceFilterNone]; [self.locationMeneger setDesiredAccuracy:kCLLocationAccuracyHundredMeters]; [self.locationMeneger startUpdatingLocation]; } } [super viewDidLoad]; } </code></pre> <p>My log print our "all ok" so location meneger is initalized, but none of delegate </p> <pre><code>// for iOS 6 and more -(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations{ NSLog(@"je updatan"); [NSThread detachNewThreadSelector:@selector(NearByPinOnMap) toTarget:self withObject:nil]; } // for iOS 5 and lass -(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(NSArray *)locations fromLocation:(CLLocation *)oldLocation{ NSLog(@"nov update"); [NSThread detachNewThreadSelector:@selector(NearByPinOnMap) toTarget:self withObject:nil]; } -(void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error{ NSLog(@"error maps : %@", error.description); } </code></pre> <p>is almost never called. There ware few times that this didUpdateToLocation was called but without changes next time didn't.</p> <p>Can anyone help me please.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload