The next time the app is run it will use whatever you’ve selected Setting a location after a build is running (Allow Location Simulation must be enabled in the Scheme):ġ. Click the dropdown next to Default Location and select any location you wantĢ. To set a default location to be used when the app is run from Xcodeġ. Once you have your app running in the simulator, navigate to Debug→Location in the menu. Here we’ll go over each option step by step. While you can set location easily using the Simulator, Xcode provides much more powerful tools for setting custom locations and even simulating movement. The following steps assume you have an existing project running from Xcode on your mac. While there are other methods, Xcode does not require wiping the device and can be used with the latest version of iOS.
To save time or check how the product works in a remote location, we can simulate location. This can be a challenge in testing, and while we can and do take an actual run or drive to check that we’re updating the location accurately, this can take a lot of time and is limited to only our local area. This enables us to do things such as change content dynamically based on where you are or track a route of a hike or a run. Occasionally WillowTree is tasked with tracking location using our mobile apps.