diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2016-10-03 11:20:54 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2016-10-03 13:24:24 -0400 |
commit | 297449aaf4b3fabb29a75ba3912af12e27fdefd9 (patch) | |
tree | a657e8036dc9f18f288f3e5bc4fcbbe8e789c477 /objectivec/DevTools | |
parent | 350d49449bcabb491f1fb05e3ac2a91717c9ef04 (diff) |
Update the ObjC projects for Xcode 8
- Let Xcode 8 update settings on the projects/schemes.
- Migrate Swift tests to Swift 3 syntax.
- Update the build/test script:
- Require Xcode 8 (because of the Swift 3 requirement for tests)
- Update the devices to what Xcode 8 has (8.x simulator seem to fail even
though they can be downloaded in Xcode 8)
- Update the travis images to ones with Xcode 8.
Diffstat (limited to 'objectivec/DevTools')
-rwxr-xr-x | objectivec/DevTools/full_mac_build.sh | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/objectivec/DevTools/full_mac_build.sh b/objectivec/DevTools/full_mac_build.sh index 89240ee0..7b335618 100755 --- a/objectivec/DevTools/full_mac_build.sh +++ b/objectivec/DevTools/full_mac_build.sh @@ -228,34 +228,23 @@ if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then # NOTE: Different Xcode have different simulated hardware/os support. readonly XCODE_VERSION_LINE="$(xcodebuild -version | grep Xcode\ )" readonly XCODE_VERSION="${XCODE_VERSION_LINE/Xcode /}" # drop the prefix. - IOS_SIMULATOR_NAME="Simulator" case "${XCODE_VERSION}" in 6.* ) - echo "ERROR: Xcode 6.3/6.4 no longer supported for building, please use 7.0 or higher." 1>&2 + echo "ERROR: Xcode 6.3/6.4 no longer supported for building, please use 8.0 or higher." 1>&2 exit 10 ;; - 7.1* ) - XCODEBUILD_TEST_BASE_IOS+=( - -destination "platform=iOS Simulator,name=iPhone 4s,OS=8.1" # 32bit - -destination "platform=iOS Simulator,name=iPhone 6,OS=9.0" # 64bit - -destination "platform=iOS Simulator,name=iPad 2,OS=8.1" # 32bit - -destination "platform=iOS Simulator,name=iPad Air,OS=9.0" # 64bit - ) + 7.* ) + echo "ERROR: The unittests include Swift code that is now Swift 3.0." 1>&2 + echo "ERROR: Xcode 8.0 or higher is required to build the test suite, but the library works with Xcode 7.x." 1>&2 + exit 11 ;; - 7.2* ) + 8.0* ) + # The 8.* device seem to hang and never start under Xcode 8. XCODEBUILD_TEST_BASE_IOS+=( - -destination "platform=iOS Simulator,name=iPhone 4s,OS=8.1" # 32bit - -destination "platform=iOS Simulator,name=iPhone 6,OS=9.2" # 64bit - -destination "platform=iOS Simulator,name=iPad 2,OS=8.1" # 32bit - -destination "platform=iOS Simulator,name=iPad Air,OS=9.2" # 64bit - ) - ;; - 7.3* ) - XCODEBUILD_TEST_BASE_IOS+=( - -destination "platform=iOS Simulator,name=iPhone 4s,OS=8.1" # 32bit - -destination "platform=iOS Simulator,name=iPhone 6,OS=9.3" # 64bit - -destination "platform=iOS Simulator,name=iPad 2,OS=8.1" # 32bit - -destination "platform=iOS Simulator,name=iPad Air,OS=9.3" # 64bit + -destination "platform=iOS Simulator,name=iPhone 4s,OS=9.0" # 32bit + -destination "platform=iOS Simulator,name=iPhone 7,OS=10.0" # 64bit + -destination "platform=iOS Simulator,name=iPad 2,OS=9.0" # 32bit + -destination "platform=iOS Simulator,name=iPad Pro (9.7 inch),OS=10.0" # 64bit ) ;; * ) @@ -272,7 +261,7 @@ if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then "${XCODEBUILD_TEST_BASE_IOS[@]}" -configuration Release test fi # Don't leave the simulator in the developer's face. - killall "${IOS_SIMULATOR_NAME}" + killall Simulator fi if [[ "${DO_XCODE_OSX_TESTS}" == "yes" ]] ; then XCODEBUILD_TEST_BASE_OSX=( @@ -282,6 +271,19 @@ if [[ "${DO_XCODE_OSX_TESTS}" == "yes" ]] ; then # Since the ObjC 2.0 Runtime is required, 32bit OS X isn't supported. -destination "platform=OS X,arch=x86_64" # 64bit ) + readonly XCODE_VERSION_LINE="$(xcodebuild -version | grep Xcode\ )" + readonly XCODE_VERSION="${XCODE_VERSION_LINE/Xcode /}" # drop the prefix. + case "${XCODE_VERSION}" in + 6.* ) + echo "ERROR: Xcode 6.3/6.4 no longer supported for building, please use 8.0 or higher." 1>&2 + exit 10 + ;; + 7.* ) + echo "ERROR: The unittests include Swift code that is now Swift 3.0." 1>&2 + echo "ERROR: Xcode 8.0 or higher is required to build the test suite, but the library works with Xcode 7.x." 1>&2 + exit 11 + ;; + esac if [[ "${DO_XCODE_DEBUG}" == "yes" ]] ; then header "Doing Xcode OS X build/tests - Debug" "${XCODEBUILD_TEST_BASE_OSX[@]}" -configuration Debug test |