objective c - Location Manager not getting location -


i trying update 1 of apps ios9 , xcode 7.2.1. location manager works in earlier version, not working. no errors or warnings...nothing. seems code not getting "didupdatelocations". code below;

- (void)setupviewcontroller {      self.locationmanager = [[cllocationmanager alloc] init];     locationmanager.delegate = self;     if ([self.locationmanager respondstoselector:@selector(requestalwaysauthorization)])     {         [self.locationmanager requestalwaysauthorization];     }      locationmanager.desiredaccuracy = 100;     //locationmanager.requestlocation;     [locationmanager startupdatinglocation];       //return coordinate;      [self performselector:@selector(stopupdatinglocation:) withobject:@"timed out" afterdelay:5];         } - (void)locationmanager:(cllocationmanager *)manager didupdatelocations:(cllocation *)newlocation fromlocation:(cllocation *)oldlocation {     nslog(@"doesn't here.");      self.besteffortatlocation = newlocation;     latitudestring = [[nsstring alloc] initwithformat:@"%g", newlocation.coordinate.latitude];     longitudestring = [[nsstring alloc] initwithformat:@"%g", newlocation.coordinate.longitude];  there other code here gets city, country, etc. 

no idea @ point do. i've looked similar problems , not found anything.

the problem line:

- (void)locationmanager:(cllocationmanager *)manager      didupdatelocations:(cllocation *)newlocation      fromlocation:(cllocation *)oldlocation { 

that method never called, corresponds no delegate method. need implement method:

- (void)locationmanager:(cllocationmanager *)manager      didupdatelocations:(nsarray<cllocation *> *)locations { 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -