From f3febfefb4849102f31ec8e6e5473e740aa75d9a Mon Sep 17 00:00:00 2001 From: Basem Emara Date: Sun, 1 Oct 2017 07:39:13 -0400 Subject: [PATCH 1/2] Update to Swift 4 --- Require.xcodeproj/project.pbxproj | 38 ++++++++++++------- .../xcschemes/Require-iOS.xcscheme | 4 +- .../xcschemes/Require-macOS.xcscheme | 4 +- .../xcschemes/Require-tvOS.xcscheme | 4 +- .../xcschemes/Require-watchOS.xcscheme | 4 +- 5 files changed, 37 insertions(+), 17 deletions(-) diff --git a/Require.xcodeproj/project.pbxproj b/Require.xcodeproj/project.pbxproj index 05bbc35..5ebb2c9 100644 --- a/Require.xcodeproj/project.pbxproj +++ b/Require.xcodeproj/project.pbxproj @@ -213,24 +213,24 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0810; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = Require; TargetAttributes = { 52D6D97B1BEFF229002C0205 = { CreatedOnToolsVersion = 7.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; 52D6D9E11BEFFF6E002C0205 = { CreatedOnToolsVersion = 7.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; 52D6D9EF1BEFFFBE002C0205 = { CreatedOnToolsVersion = 7.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; 52D6DA0E1BF000BD002C0205 = { CreatedOnToolsVersion = 7.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; }; }; @@ -329,14 +329,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_OBJC_ROOT_CLASS = YES_ERROR; + 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; @@ -380,14 +386,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 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_OBJC_ROOT_CLASS = YES_ERROR; + 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; @@ -435,7 +447,7 @@ PRODUCT_NAME = Require; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -457,7 +469,7 @@ PRODUCT_NAME = Require; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -477,7 +489,7 @@ PRODUCT_NAME = Require; SDKROOT = watchos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 2.0; }; @@ -500,7 +512,7 @@ SDKROOT = watchos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 2.0; }; @@ -522,7 +534,7 @@ PRODUCT_NAME = Require; SDKROOT = appletvos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; }; @@ -545,7 +557,7 @@ SDKROOT = appletvos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; }; @@ -570,7 +582,7 @@ PRODUCT_NAME = Require; SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -594,7 +606,7 @@ SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/Require.xcodeproj/xcshareddata/xcschemes/Require-iOS.xcscheme b/Require.xcodeproj/xcshareddata/xcschemes/Require-iOS.xcscheme index aa902e1..31da111 100644 --- a/Require.xcodeproj/xcshareddata/xcschemes/Require-iOS.xcscheme +++ b/Require.xcodeproj/xcshareddata/xcschemes/Require-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/Require.xcodeproj/xcshareddata/xcschemes/Require-macOS.xcscheme b/Require.xcodeproj/xcshareddata/xcschemes/Require-macOS.xcscheme index 94c1590..4ead286 100644 --- a/Require.xcodeproj/xcshareddata/xcschemes/Require-macOS.xcscheme +++ b/Require.xcodeproj/xcshareddata/xcschemes/Require-macOS.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/Require.xcodeproj/xcshareddata/xcschemes/Require-tvOS.xcscheme b/Require.xcodeproj/xcshareddata/xcschemes/Require-tvOS.xcscheme index bb96280..c1c5782 100644 --- a/Require.xcodeproj/xcshareddata/xcschemes/Require-tvOS.xcscheme +++ b/Require.xcodeproj/xcshareddata/xcschemes/Require-tvOS.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/Require.xcodeproj/xcshareddata/xcschemes/Require-watchOS.xcscheme b/Require.xcodeproj/xcshareddata/xcschemes/Require-watchOS.xcscheme index 1bca971..169d03a 100644 --- a/Require.xcodeproj/xcshareddata/xcschemes/Require-watchOS.xcscheme +++ b/Require.xcodeproj/xcshareddata/xcschemes/Require-watchOS.xcscheme @@ -1,6 +1,6 @@ @@ -37,6 +38,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" From 2f876fca5150eef4db2c642a947cf7580e125e32 Mon Sep 17 00:00:00 2001 From: Basem Emara Date: Sun, 1 Oct 2017 10:53:25 -0400 Subject: [PATCH 2/2] Disable code coverage to fix app submission with Xcode 9 --- Require.xcodeproj/xcshareddata/xcschemes/Require-iOS.xcscheme | 3 +-- .../xcshareddata/xcschemes/Require-macOS.xcscheme | 3 +-- Require.xcodeproj/xcshareddata/xcschemes/Require-tvOS.xcscheme | 3 +-- .../xcshareddata/xcschemes/Require-watchOS.xcscheme | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Require.xcodeproj/xcshareddata/xcschemes/Require-iOS.xcscheme b/Require.xcodeproj/xcshareddata/xcschemes/Require-iOS.xcscheme index 31da111..794b755 100644 --- a/Require.xcodeproj/xcshareddata/xcschemes/Require-iOS.xcscheme +++ b/Require.xcodeproj/xcshareddata/xcschemes/Require-iOS.xcscheme @@ -27,8 +27,7 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" language = "" - shouldUseLaunchSchemeArgsEnv = "YES" - codeCoverageEnabled = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES"> diff --git a/Require.xcodeproj/xcshareddata/xcschemes/Require-macOS.xcscheme b/Require.xcodeproj/xcshareddata/xcschemes/Require-macOS.xcscheme index 4ead286..75576a1 100644 --- a/Require.xcodeproj/xcshareddata/xcschemes/Require-macOS.xcscheme +++ b/Require.xcodeproj/xcshareddata/xcschemes/Require-macOS.xcscheme @@ -27,8 +27,7 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" language = "" - shouldUseLaunchSchemeArgsEnv = "YES" - codeCoverageEnabled = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES"> diff --git a/Require.xcodeproj/xcshareddata/xcschemes/Require-tvOS.xcscheme b/Require.xcodeproj/xcshareddata/xcschemes/Require-tvOS.xcscheme index c1c5782..c97ec21 100644 --- a/Require.xcodeproj/xcshareddata/xcschemes/Require-tvOS.xcscheme +++ b/Require.xcodeproj/xcshareddata/xcschemes/Require-tvOS.xcscheme @@ -27,8 +27,7 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" language = "" - shouldUseLaunchSchemeArgsEnv = "YES" - codeCoverageEnabled = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES"> diff --git a/Require.xcodeproj/xcshareddata/xcschemes/Require-watchOS.xcscheme b/Require.xcodeproj/xcshareddata/xcschemes/Require-watchOS.xcscheme index 169d03a..b05ea8d 100644 --- a/Require.xcodeproj/xcshareddata/xcschemes/Require-watchOS.xcscheme +++ b/Require.xcodeproj/xcshareddata/xcschemes/Require-watchOS.xcscheme @@ -27,8 +27,7 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" language = "" - shouldUseLaunchSchemeArgsEnv = "YES" - codeCoverageEnabled = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES">