GitHub - lyft/set-simulator-location: CLI for setting location in the iOS simula...

 5 years ago
source link: https://github.com/lyft/set-simulator-location
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.



This is a simple CLI for easily setting the location of the currently running iOS Simulator.


Set a specific latitude and longitude:

$ set-simulator-location -c 37.7765 -122.3918

Or using place search:

$ set-simulator-location -q Lyft HQ San Francisco

By default the location is set on all booted simulators. If you'd like to change it for only one of the booted simulators you can pass -s followed by the simulator's display name:

$ set-simulator-location -q Lyft HQ San Francisco -s iPhone X

NOTE: If you have multiple booted simulators with the same name, the location will be set on all of them.


With homebrew:

$ brew install lyft/formulae/set-simulator-location

With a precompiled release:

  1. Download the latest release from here
  2. Install it some place in your $PATH


$ make install

I have submitted a Radar to have this behavior added to simctl.


To work on set-simulator-location you can make your changes and run make to build from the command line. If you'd prefer to work in Xcode you can run make xcode to generate a project using SwiftPM.

About Joyk

Aggregate valuable and interesting links.
Joyk means Joy of geeK