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.
diff --git a/objectivec/DevTools/full_mac_build.sh b/objectivec/DevTools/full_mac_build.sh
index 6d0a558..ea2d6fe 100755
--- a/objectivec/DevTools/full_mac_build.sh
+++ b/objectivec/DevTools/full_mac_build.sh
@@ -239,27 +239,11 @@
# 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 @@
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
diff --git a/objectivec/ProtocolBuffers_OSX.xcodeproj/project.pbxproj b/objectivec/ProtocolBuffers_OSX.xcodeproj/project.pbxproj
index faf562b..556bb2c 100644
--- a/objectivec/ProtocolBuffers_OSX.xcodeproj/project.pbxproj
+++ b/objectivec/ProtocolBuffers_OSX.xcodeproj/project.pbxproj
@@ -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",
diff --git a/objectivec/ProtocolBuffers_iOS.xcodeproj/project.pbxproj b/objectivec/ProtocolBuffers_iOS.xcodeproj/project.pbxproj
index 3847bcc..940802a 100644
--- a/objectivec/ProtocolBuffers_iOS.xcodeproj/project.pbxproj
+++ b/objectivec/ProtocolBuffers_iOS.xcodeproj/project.pbxproj
@@ -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)",