Let the 9.4 migrator migrate the Swift source.

No changes were needed, but since the Xcode projects pick up the updated
setting, the tests require a newer Xcode that supports Swift 4.

This is being done because Xcode 10 starting warning about Swift 3 support
going away in the future, so we might as well do the updates since most
folks shouldn't be on those really old Xcode versions any more.
pull/5313/head
Thomas Van Lenten 6 years ago
parent dde14310f4
commit eecccdc802
  1. 32
      objectivec/DevTools/full_mac_build.sh
  2. 6
      objectivec/ProtocolBuffers_OSX.xcodeproj/project.pbxproj
  3. 6
      objectivec/ProtocolBuffers_iOS.xcodeproj/project.pbxproj

@ -239,27 +239,11 @@ if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then
# just pick a mix of OS Versions and 32/64 bit.
# NOTE: Different Xcode have different simulated hardware/os support.
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: Xcode 7.x no longer supported for building, please use 8.0 or higher." 1>&2
[6-8].* )
echo "ERROR: The unittests include Swift code that is now Swift 4.0." 1>&2
echo "ERROR: Xcode 9.0 or higher is required to build the test suite, but the library works with Xcode 7.x." 1>&2
exit 11
;;
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=9.0" # 32bit
-destination "platform=iOS Simulator,name=iPhone 7,OS=10.0" # 64bit
)
;;
8.[1-3]* )
XCODEBUILD_TEST_BASE_IOS+=(
-destination "platform=iOS Simulator,name=iPhone 4s,OS=8.1" # 32bit
-destination "platform=iOS Simulator,name=iPhone 7,OS=latest" # 64bit
)
;;
9.[0-2]* )
XCODEBUILD_TEST_BASE_IOS+=(
-destination "platform=iOS Simulator,name=iPhone 4s,OS=8.1" # 32bit
@ -317,13 +301,9 @@ if [[ "${DO_XCODE_OSX_TESTS}" == "yes" ]] ; then
XCODEBUILD_TEST_BASE_OSX+=( -quiet )
fi
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
[6-8].* )
echo "ERROR: The unittests include Swift code that is now Swift 4.0." 1>&2
echo "ERROR: Xcode 9.0 or higher is required to build the test suite, but the library works with Xcode 7.x." 1>&2
exit 11
;;
esac

@ -640,7 +640,7 @@
LastUpgradeCheck = 0930;
TargetAttributes = {
8BBEA4A5147C727100C4ADB7 = {
LastSwiftMigration = 0800;
LastSwiftMigration = 0940;
TestTargetID = 8B9A5EA41831993600A9D33B;
};
F45BBC141B0CE3C6002D064D = {
@ -852,7 +852,7 @@
PRODUCT_NAME = UnitTests;
SWIFT_OBJC_BRIDGING_HEADER = "Tests/UnitTests-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
WARNING_CFLAGS = (
"$(inherited)",
"-Wno-documentation-unknown-command",
@ -878,7 +878,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.${PRODUCT_NAME:identifier}";
PRODUCT_NAME = UnitTests;
SWIFT_OBJC_BRIDGING_HEADER = "Tests/UnitTests-Bridging-Header.h";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
WARNING_CFLAGS = (
"$(inherited)",
"-Wno-documentation-unknown-command",

@ -647,7 +647,7 @@
LastUpgradeCheck = 0930;
TargetAttributes = {
8BBEA4A5147C727100C4ADB7 = {
LastSwiftMigration = 0800;
LastSwiftMigration = 0940;
TestTargetID = 8B9A5EA41831993600A9D33B;
};
F45BBC0E1B0CDB50002D064D = {
@ -866,7 +866,7 @@
PRODUCT_NAME = UnitTests;
SWIFT_OBJC_BRIDGING_HEADER = "Tests/UnitTests-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
WARNING_CFLAGS = (
"$(inherited)",
@ -900,7 +900,7 @@
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = UnitTests;
SWIFT_OBJC_BRIDGING_HEADER = "Tests/UnitTests-Bridging-Header.h";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
WARNING_CFLAGS = (
"$(inherited)",

Loading…
Cancel
Save