Find file History

id title brief
Test Location Changes in Simulator
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.


  1. 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:

  1. 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:

  1. 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:

  1. You can check the device's simulated location by opening Google Maps in Safari on the simulator. Navigate to 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.