iphone - didUpdateToLocation is not called -


i want receive location updates. have added location delegate header:

@interface appdelegate : uiresponder <uiapplicationdelegate, cllocationmanagerdelegate>

and following functions:

- (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions {     //initialize location manager     cllocationmanager* locationmanager = [[cllocationmanager alloc] init];     locationmanager.delegate = self;     // [locationmanager startmonitoringsignificantlocationchanges];     [locationmanager startupdatinglocation];      self.window = [[uiwindow alloc] initwithframe:[[uiscreen mainscreen] bounds]];     self.viewcontroller = [[viewcontroller alloc] initwithnibname:@"someviewcontroller"     bundle:nil];     self.window.rootviewcontroller = self.viewcontroller;     [self.window makekeyandvisible];     return yes; } - (void)locationmanager:(cllocationmanager *)manager didfailwitherror:(nserror *)error{     //some problem } - (void)locationmanager:(cllocationmanager *)manager didupdatetolocation:(cllocation     *)newlocation fromlocation:(cllocation *)oldlocation{     //some action } 

but neither didupdatetolocation nor didfailwitherror called (same problem on simulator , on device). missing?

thanks in advance,

luda

are location services application enabled?

p.s: make location manager instance variable retained arc after method - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions completed.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - EclipseLink JPA Object is not a known entity type -

java - Need to add SOAP security token -