THANKS TO Ben Marten
You can make it permanent using these steps in XCode:
Product > Scheme > Edit Scheme
Click Run .app
Option tab
Already checked Core Location > select your location
Press OK
Besides that, even if you are not connected to wifi, you can set a location in simulator through top menu items Debug>Location and to make it permanent follow steps above
The exact reason what I have found is there is a conflict occuring in the location simulation in both the ios simulator “Debug settings” and in the xcode settings “Edit schemes”.Ensure to set you default user location in any one of this and mark the other to None solved the problem hope this might help for sure.
InXcode:
Some GPX files you might get from different sources might have the following elements indicating the different coordinates in specified path. This wont work with Xcode's Location Simulation.
What you should do is find all occurrences of the "trkpt" element and replace it with "wpt" in your favorite text/xml editor. The end result should be something as follows:
This error is thrown when Location Manager is unable to get location information immediately. I found that this error was occurring when startUpdatingLocation method was called. For me, this was happening on iPod but not on iPhone. That makes sense, since, iPhone has more ways (like cellular network) to get location information and is able get a quick estimate on the location whereas iPod takes more time which caused this error to be raised on iPod.
Since, when this error is thrown locationManager:didFailWithError: delegate method is called, one can handle this specific case in a conditional statement by matching "[error domain]" and "[error code]" from the error object passed to this method.
1) check that you actually have a valid WiFi and 3G connection
if you do then
2) go to settings and reset your location services 3) reset your network settings
UPDATE
THANKS TO Ben Marten You can make it permanent using these steps in XCode:
Besides that, even if you are not connected to wifi, you can set a location in simulator through top menu items
Debug>Location
and to make it permanent follow steps aboveThe exact reason what I have found is there is a conflict occuring in the location simulation in both the ios simulator “Debug settings” and in the xcode settings “Edit schemes”.Ensure to set you default user location in any one of this and mark the other to None solved the problem hope this might help for sure. InXcode:
In iphone/ipad simulator:
Thanks to this article (https://possiblemobile.com/2013/04/using-xcode-to-test-location-services/) I got a hint to look at the data on my custom GPX file and there found the issue.
Some GPX files you might get from different sources might have the following elements indicating the different coordinates in specified path. This wont work with Xcode's Location Simulation.
What you should do is find all occurrences of the "trkpt" element and replace it with "wpt" in your favorite text/xml editor. The end result should be something as follows:
Hope this helps! It certainly helped me.
Go to Xcode project >product>scheme>edit scheme>chek location simulation>set your location> and run app again Hope it will works !
This error is thrown when Location Manager is unable to get location information immediately. I found that this error was occurring when startUpdatingLocation method was called. For me, this was happening on iPod but not on iPhone. That makes sense, since, iPhone has more ways (like cellular network) to get location information and is able get a quick estimate on the location whereas iPod takes more time which caused this error to be raised on iPod.
Since, when this error is thrown locationManager:didFailWithError: delegate method is called, one can handle this specific case in a conditional statement by matching "[error domain]" and "[error code]" from the error object passed to this method.