simudef (simulator UserDefaults) is a simple bash script for editing user defaults on running iOS/iPad simulators. It allows you to quickly search for and select a running simulator using fzf, then locate and open the specific .plist file associated with an app (based on its bundle ID) for editing.
- Fuzzy search:
simudefusesfzfto present a list of booted simulators, allowing you to type and filter results quickly. - Easy navigation: You can use arrow keys to navigate through the list of simulators or type part of the name to filter results.
- Command-line arguments: You provide the app's bundle ID as a command-line argument, and
simudefsearches for the corresponding.plistfile in the selected simulator’s data directory.
-
Clone or download the script.
-
Make sure
fzfis installed. You can installfzfusing Homebrew:brew install fzf
-
Ensure the script has execution permissions:
chmod +x simudef.sh
To use the script, call it with your app's bundle ID as follows:
./simudef.sh <bundle_id>The script will:
- Present a list of booted simulators using fzf.
- Allow you to filter or navigate through the simulators.
- After you select a simulator, the script will open the .plist file associated with the provided bundle ID.
To make it easier to run simudef from anywhere, you can create an alias in your shell configuration file (such as .zshrc or .bashrc).
For example, if you're using zsh, add the following line to your .zshrc:
echo "alias simudef=<path to the script>" >> ~/.zshrc