1

While running my code into device, I'm not able to getting device current location.

-(void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error 

method called. I'm not able to getting device locations while device is in motion.

Merry
  • 420
  • 4
  • 19
  • 2
    Possible duplicate of [didFailWithError: Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)"](http://stackoverflow.com/questions/6032976/didfailwitherror-error-domain-kclerrordomain-code-0-the-operation-couldn-t-be) – Ronak Chaniyara Jun 21 '16 at 05:45
  • how can you register the location manager ? – HariKrishnan.P Jun 21 '16 at 05:45
  • please provide your code so we can help you. without code we are unable to find any solution. – DJ1 Jun 21 '16 at 06:19

2 Answers2

1

In iOS 8 ownwards by default location services are desabled for a new app you create.So to enable it go to settings->privacy->location services and choose your app from it and make it "always" under allow location services. Thank you

Kiran eldho
  • 224
  • 1
  • 8
1

1. You have to set default location:

Debug -> Location

2. you have to clear all data using

 "iOS Simulator" -> "Reset Content and
  Settings....

3.

Then clean the project and run the project.. i hope it will work..:)

Suraj Sukale
  • 1,778
  • 1
  • 12
  • 19