Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update script comments
  • Loading branch information
phatblat committed Aug 9, 2015
commit 7724e36e7ca1666f535c8967c7534e04664d457e
14 changes: 10 additions & 4 deletions script/xcode_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ function xcode_major_version ()
xcode_version | awk -F '.' '{ print $1 }'
}

# Returns the latest iOS SDK version available
# via xcodebuild
# Returns the latest iOS SDK version available via xcodebuild.
function ios_sdk_version ()
{
# This relies on the fact that the latest iPhone SDK
# is the last thing listed before the Xcode version.
# The grep command produces output like the following, singling out the
# SDKVersion of just the iPhone* SDKs:
#
# iPhoneOS9.0.sdk - iOS 9.0 (iphoneos9.0)
# SDKVersion: 9.0
# --
# iPhoneSimulator9.0.sdk - Simulator - iOS 9.0 (iphonesimulator9.0)
# SDKVersion: 9.0

/usr/bin/xcodebuild -version -sdk 2> /dev/null | grep -A 1 '^iPhone' | tail -n 1 | awk '{ print $2 }'
}

Expand Down