From 82641e946dd255bcbadbc47347b5410ac0ea5a30 Mon Sep 17 00:00:00 2001 From: Mathieu Triay Date: Thu, 1 Oct 2015 16:42:16 +0100 Subject: [PATCH] Update simulator shortcut for XCode 7 The location of the simulator has changed in XCode 7. It's now `"${devfolder}/Applications/Simulator.app"`. I've added an extra if to check for XCode 7 and change the path accordingly. --- plugins/xcode/xcode.plugin.zsh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index b63a857a7..0beb4d30f 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -178,8 +178,13 @@ function simulator { # Xcode ≤ 5.x if [[ -d "${devfolder}/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app" ]]; then open "${devfolder}/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app" - # Xcode ≥ 6.x else - open "${devfolder}/Applications/iOS Simulator.app" + # Xcode 6.x + if [[ -d "${devfolder}/Applications/iOS Simulator.app" ]]; then + open "${devfolder}/Applications/iOS Simulator.app" + # Xcode ≥ 7.x + else + "${devfolder}/Applications/Simulator.app" + fi fi }