How many times have you painfully, manually opened Safari Web Inspector after starting the iOS Simulator with `cordova emulate`? Too often. Me too. No more.
I found a nifty osascript gist then tweaked it a little and put it inside a shell script `ios-sim-inspector`.
Then, I added a couple of new Cordova aliases to my bash profile (leveraging a couple of existing aliases)
## Existing Aliases ##
# Run iOS Simulator
alias corem="killall Simulator || echo && cordova emulate"
# Build and Run iOS Simulator
alias corbem="killall Simulator || echo && cordova build && cordova emulate"
## New Aliases with Web Inspector'ing ##
# Run iOS Simulator with Safari Web Inspector (for Debugging)
alias coremd="corem && ios-sim-inspector"
# Build and Run iOS Simulator with Safari Web Inspector (for Debugging)
alias corbemd="corbem && ios-sim-inspector"
Now you know how to painlessly open Safari Web Inspector after starting the iOS Simulator with Cordova emulate from the command line.