didFailWithError: Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)"
If you are using the simulator:
- Press
command + shift + ,
in Xcode to open the scheme editor - Select the Run scheme
- Go to the Options tab
- Check ✅
Allow Location Simulation
- Select a Default Location in the dropdown
Selecting None
as your Default Location may have caused the problem.
Check that you actually have a valid WiFi and 3G connection
...if you do, then:
Go to settings and reset your location services
- Reset your network settings
This should take care of that issue. It is device/network related not app related. It's annoying especially if your app is dependent on location services and the device is WiFi only and people give negative ratings on the AppStore... Pardon me, I'm getting a bit emotional there.
Simply ignore this error and wait for more updates or a different error.
The docs for the location manager say that this error is temporary. It's letting you know that it failed to immediately retrieve a location, but it continues to try. "In such a situation, you can simply ignore the error and wait for a new event." Which is a really boneheaded way to use a method named locationManager:didFailWithError:
- Thanks Apple!
Apple Documentation