1
votes

I am new in IOS Development.I use GeoCoding and CLLocationManager in IOS8 for getting user current Location. But issue is that when I set location Xcode>Product>Scheme>Edit Scheme>Chek Allow location simulation and setting any location like Mumbai, India, it will be show on my view controller.But I want to access my current location where am I instead of setting location through scheme. when i set none location through scheme CLLocation manager not working and give me failed to get your location

Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)"

please help whats issue?? Thanx in advance

2

2 Answers

0
votes

I don't think the simulator support to locate the current location. You may want a real iOS device.

If you really want to simulate your location.You may use google map or something else to know your cordinate. then make it into your GPX file,you can load your custom GPX file.

0
votes

This happens mainly due two reason. Any one of this will help you. Not only in the case of location, some time when we use simulator in a speedy manner at that time also occur, for that case the second option generally helps.

  1. This error also occurs if you have Scheme/Edit Scheme/Options/Allow Location Simulation checked but don't have a default location set.

enter image description here

Select any one of the default loation.

  1. The second reason may be due to simulator problem. Many time this solves this.

Under the simulator:click reset content and setting. Turn off the simulator. run your app.

enter image description here

Hope this will help you