I followed the instructions in: How to get Location user whith CLLocationManager in swift? and I was able to get the coordinates in my iPhone but not in the emulator. once I run the app in the emulator I get the following error:
Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)"
The sample code in the previous link is showing how to get the coordination within the AppDelegate file.
As I am a beginner in iPhone development, I couldn't retrieve coordinates in the viewController.
I would like to keep the app notified as the mobile is moving and the coordination is changed and need to calculate how far (kilometers or miles) the mobile from a specific location (fixed coordination).
Any help?