diff --git a/Rakefile b/Rakefile index 6fe11f7d05..c2332c9328 100644 --- a/Rakefile +++ b/Rakefile @@ -269,9 +269,8 @@ namespace :examples do command = "xcodebuild -workspace '#{example.basename}.xcworkspace' -scheme '#{example.basename}'" if (example + 'Podfile').read.include?('platform :ios') # Specifically build against the simulator SDK so we don't have to deal with code signing. - root = File.exist?("/Applications/Xcode.app") ? "/Applications/Xcode.app/Contents" : "" command << " -sdk " - command << Dir.glob("#{root}/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.sdk").last + command << Dir.glob("#{`xcode-select -print-path`.chomp}/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.sdk").last end sh command end