071de5fb39ff951bffe75a4d6f590d85f25871f3
- Author
- Neal <neal@ineal.me>
- Committer
- Neal <neal@ineal.me>
- Date
Message
Make the simulator alias work with older Xcode versions as well.
Diff
1diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh
2index 3d7781bf92811b607ba771c8c72e3d89c55e12ff..b7b75cf9376c16e4196c4457b3728660482e72a3 100644
3--- a/plugins/xcode/xcode.plugin.zsh
4+++ b/plugins/xcode/xcode.plugin.zsh
5@@ -16,4 +16,9 @@ function xcsel {
6
7 alias xcb='xcodebuild'
8 alias xcp='xcode-select --print-path'
9-alias simulator='open $(xcode-select -p)/Applications/iOS\ Simulator.app'
10+
11+if [[ -d $(xcode-select -p)/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app ]]; then
12+ alias simulator='open $(xcode-select -p)/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app'
13+else
14+ alias simulator='open $(xcode-select -p)/Applications/iOS\ Simulator.app'
15+fi