Test Location Changes in Simulator
- PDF for offline use
Let us know how you feel about this
Some location APIs such as Significant Location Change and Geofences require big changes in location to trigger events. The iOS Simulator offers an easy way to test location APIs without leaving your desk.
Launch the iOS Simulator. Then, open the iOS Simulator's Debug menu and select Location > Freeway Drive . This will simulate a coastal drive up California's highway 280:
Deploy the application to the simulator. The simulator will begin feeding sample data to the application, which should respond appropriately. For example, running the Track Significant Location Change code in the simulator produces the following application log:
If your application requires a custom location to test, choose the Location > Custom Location... option from the Debug menu, and specify your own latitude and longitude to test:
You can check the device's simulated location by opening Google Maps in Safari on the simulator. Navigate to maps.google.com and make sure the location matches what you set:
Of course, testing on the simulator does not prove that your app will work as intended on an actual device. Before you ship your app, Xamarin recommends that you buy a plane ticket and make the drive yourself just to be sure.