Commit 224c72ef authored by Fabio Pelosin's avatar Fabio Pelosin

[Rakefile] Robustness against different version of xcode.

parent 613dbc4f
...@@ -269,9 +269,8 @@ namespace :examples do ...@@ -269,9 +269,8 @@ namespace :examples do
command = "xcodebuild -workspace '#{example.basename}.xcworkspace' -scheme '#{example.basename}'" command = "xcodebuild -workspace '#{example.basename}.xcworkspace' -scheme '#{example.basename}'"
if (example + 'Podfile').read.include?('platform :ios') if (example + 'Podfile').read.include?('platform :ios')
# Specifically build against the simulator SDK so we don't have to deal with code signing. # 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 << " -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 end
sh command sh command
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment