Skip to content

Instantly share code, notes, and snippets.

@lubiepomaranczki
Last active June 28, 2023 10:41
Show Gist options
  • Save lubiepomaranczki/517deb14e336e0e6356aa315d0da467a to your computer and use it in GitHub Desktop.
Save lubiepomaranczki/517deb14e336e0e6356aa315d0da467a to your computer and use it in GitHub Desktop.
Script to open sqlite database from iOS simulator
#!/bin/bash
open_database() {
DB_PATH=`lsof -Fn -p $PID| grep "\.sqlite$"`
open ${DB_PATH:1}
}
PID=`pgrep $1`
if [ -z "$1" ]
then
echo "Are you sure you have your app opened on a simulator? 🤔";
else
open_database $PID
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment