Search code examples
iosiphoneobjective-cios7cllocationmanager

Callback from CLLocationManager not coming if getting a Phonecall


I am trying to get the users location if user is getting or making a phone call. I can use the CTCallCenter for my calling events.

The if one of the states are firing i am trying to get the location...It works because i see the arrow in top right corner...

But i don´t get a callback from CLLocationmanager:

-(void)locationManager:(CLLocationManager *)manager
  didUpdateToLocation:(CLLocation *)newLocation
      fromLocation:(CLLocation *)oldLocation

Does somebody know´s why?

UPDATE: Just found the Solution by myself..I have to init the CLLocationManager on the main Thread...it works now


Solution

  • Just found the Solution by myself..I have to init the CLLocationManager on the main Thread...it works now