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:
simudef
usesfzf
to 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
simudef
searches for the corresponding.plist
file in the selected simulator’s data directory.
-
Clone or download the script.
-
Make sure
fzf
is installed. You can installfzf
using 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