lib/snapshot/latest_ios_version.rb in snapshot-0.9.1 vs lib/snapshot/latest_ios_version.rb in snapshot-0.9.2

- old
+ new

@@ -2,10 +2,11 @@ class LatestIosVersion def self.version return ENV["SNAPSHOT_IOS_VERSION"] if ENV["SNAPSHOT_IOS_VERSION"] output = `xcodebuild -version -sdk`.split("Mac").last # don't care about the Mac Part - matched = output.match(/SDKVersion: ([\d\.]+)/) + matched = output.match(/iPhoneSimulator([\d\.]+)\.sdk/) + if matched.length > 1 return matched[1] else raise "Could not determine installed iOS SDK version. Please pass it via the environment variable 'SNAPSHOT_IOS_VERSION'".red end \ No newline at end of file