From 9721462c9dea38458e53634bf0ac1fca84201d8f Mon Sep 17 00:00:00 2001 From: Jonathan Downing Date: Sat, 16 Sep 2017 21:54:00 +0300 Subject: [PATCH] Add Xcode 9/Swift 4 Compatibility Changes (#18) * Add Xcode 9 Recommended Project Changes * Set Swift 3 @objc inference to Default. --- OpenVPN Adapter.xcodeproj/project.pbxproj | 25 ++++++++++++++----- .../xcschemes/OpenVPN Adapter iOS.xcscheme | 4 ++- .../xcschemes/OpenVPN Adapter macOS.xcscheme | 5 ++-- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/OpenVPN Adapter.xcodeproj/project.pbxproj b/OpenVPN Adapter.xcodeproj/project.pbxproj index 9fceffe..b834c95 100644 --- a/OpenVPN Adapter.xcodeproj/project.pbxproj +++ b/OpenVPN Adapter.xcodeproj/project.pbxproj @@ -725,16 +725,17 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0820; - LastUpgradeCheck = 0830; + LastUpgradeCheck = 0900; TargetAttributes = { C9BB475B1E71663A00F3F98C = { CreatedOnToolsVersion = 8.2.1; - LastSwiftMigration = 0830; + LastSwiftMigration = 0900; ProvisioningStyle = Manual; }; C9BB478D1E71821A00F3F98C = { CreatedOnToolsVersion = 8.2.1; DevelopmentTeam = 2TWXCGG7R3; + LastSwiftMigration = 0900; ProvisioningStyle = Manual; }; C9D2ABD81EA20F99007EDF9D = { @@ -935,12 +936,18 @@ baseConfigurationReference = C90BAD2A1E73F5AF00DEFB32 /* Project.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -964,12 +971,18 @@ baseConfigurationReference = C90BAD2A1E73F5AF00DEFB32 /* Project.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -1029,7 +1042,7 @@ SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -1076,7 +1089,7 @@ SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -1130,7 +1143,7 @@ SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -1175,7 +1188,7 @@ SDKROOT = iphoneos; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/OpenVPN Adapter.xcodeproj/xcshareddata/xcschemes/OpenVPN Adapter iOS.xcscheme b/OpenVPN Adapter.xcodeproj/xcshareddata/xcschemes/OpenVPN Adapter iOS.xcscheme index 73a526b..cd9dfa2 100644 --- a/OpenVPN Adapter.xcodeproj/xcshareddata/xcschemes/OpenVPN Adapter iOS.xcscheme +++ b/OpenVPN Adapter.xcodeproj/xcshareddata/xcschemes/OpenVPN Adapter iOS.xcscheme @@ -1,6 +1,6 @@ @@ -56,6 +57,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/OpenVPN Adapter.xcodeproj/xcshareddata/xcschemes/OpenVPN Adapter macOS.xcscheme b/OpenVPN Adapter.xcodeproj/xcshareddata/xcschemes/OpenVPN Adapter macOS.xcscheme index 4c4f828..56cd41f 100644 --- a/OpenVPN Adapter.xcodeproj/xcshareddata/xcschemes/OpenVPN Adapter macOS.xcscheme +++ b/OpenVPN Adapter.xcodeproj/xcshareddata/xcschemes/OpenVPN Adapter macOS.xcscheme @@ -1,7 +1,7 @@ + LastUpgradeVersion = "0900" + version = "1.3"> @@ -57,6 +57,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO"