Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Latest commit

 

History

History

test_location_changes_in_simulator

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
id title brief
8E393AEE-2CEF-44F1-9706-E681C39616F4
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.

Recipe

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