File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,18 @@ function xcode_major_version ()
1414 xcode_version | awk -F ' .' ' { print $1 }'
1515}
1616
17- # Returns the latest iOS SDK version available
18- # via xcodebuild
17+ # Returns the latest iOS SDK version available via xcodebuild.
1918function ios_sdk_version ()
2019{
21- # This relies on the fact that the latest iPhone SDK
22- # is the last thing listed before the Xcode version.
20+ # The grep command produces output like the following, singling out the
21+ # SDKVersion of just the iPhone* SDKs:
22+ #
23+ # iPhoneOS9.0.sdk - iOS 9.0 (iphoneos9.0)
24+ # SDKVersion: 9.0
25+ # --
26+ # iPhoneSimulator9.0.sdk - Simulator - iOS 9.0 (iphonesimulator9.0)
27+ # SDKVersion: 9.0
28+
2329 /usr/bin/xcodebuild -version -sdk 2> /dev/null | grep -A 1 ' ^iPhone' | tail -n 1 | awk ' { print $2 }'
2430}
2531
You can’t perform that action at this time.
0 commit comments