diff --git a/.swift-version b/.swift-version index 8c50098..5186d07 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.1 +4.0 diff --git a/Exemple/OpenSourceControllerDemo.xcodeproj/project.pbxproj b/Exemple/OpenSourceControllerDemo.xcodeproj/project.pbxproj index 8ea3ec8..9bca7fb 100644 --- a/Exemple/OpenSourceControllerDemo.xcodeproj/project.pbxproj +++ b/Exemple/OpenSourceControllerDemo.xcodeproj/project.pbxproj @@ -254,6 +254,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -303,6 +304,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -317,7 +319,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.fg.OpenSourceControllerDemo; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.0; }; name = Debug; @@ -331,7 +333,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.fg.OpenSourceControllerDemo; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.0; }; name = Release; diff --git a/Exemple/OpenSourceControllerDemo.xcodeproj/project.xcworkspace/xcuserdata/floriangabach.xcuserdatad/UserInterfaceState.xcuserstate b/Exemple/OpenSourceControllerDemo.xcodeproj/project.xcworkspace/xcuserdata/floriangabach.xcuserdatad/UserInterfaceState.xcuserstate index c29cf97..294c15c 100644 Binary files a/Exemple/OpenSourceControllerDemo.xcodeproj/project.xcworkspace/xcuserdata/floriangabach.xcuserdatad/UserInterfaceState.xcuserstate and b/Exemple/OpenSourceControllerDemo.xcodeproj/project.xcworkspace/xcuserdata/floriangabach.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/OpenSourceController.xcodeproj/project.pbxproj b/OpenSourceController.xcodeproj/project.pbxproj index 2224fcd..9d1658a 100644 --- a/OpenSourceController.xcodeproj/project.pbxproj +++ b/OpenSourceController.xcodeproj/project.pbxproj @@ -205,7 +205,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0810; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = OpenSourceController; TargetAttributes = { 52D6D97B1BEFF229002C0205 = { @@ -214,7 +214,7 @@ }; 52D6D9851BEFF229002C0205 = { CreatedOnToolsVersion = 7.1; - LastSwiftMigration = 0800; + LastSwiftMigration = ""; }; }; }; @@ -294,14 +294,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; @@ -330,7 +336,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -345,14 +351,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; @@ -373,7 +385,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -400,7 +412,7 @@ PRODUCT_NAME = OpenSourceController; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -422,7 +434,7 @@ PRODUCT_NAME = OpenSourceController; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/OpenSourceController.xcodeproj/project.xcworkspace/xcuserdata/floriangabach.xcuserdatad/UserInterfaceState.xcuserstate b/OpenSourceController.xcodeproj/project.xcworkspace/xcuserdata/floriangabach.xcuserdatad/UserInterfaceState.xcuserstate index 19f288a..e5d5db0 100644 Binary files a/OpenSourceController.xcodeproj/project.xcworkspace/xcuserdata/floriangabach.xcuserdatad/UserInterfaceState.xcuserstate and b/OpenSourceController.xcodeproj/project.xcworkspace/xcuserdata/floriangabach.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/OpenSourceController.xcodeproj/xcshareddata/xcschemes/OpenSourceController-iOS.xcscheme b/OpenSourceController.xcodeproj/xcshareddata/xcschemes/OpenSourceController-iOS.xcscheme index 4ec30b3..1dfdc38 100644 --- a/OpenSourceController.xcodeproj/xcshareddata/xcschemes/OpenSourceController-iOS.xcscheme +++ b/OpenSourceController.xcodeproj/xcshareddata/xcschemes/OpenSourceController-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/OpenSourceController.xcodeproj/xcshareddata/xcschemes/OpenSourceController-macOS.xcscheme b/OpenSourceController.xcodeproj/xcshareddata/xcschemes/OpenSourceController-macOS.xcscheme index 531076a..8a79f9c 100644 --- a/OpenSourceController.xcodeproj/xcshareddata/xcschemes/OpenSourceController-macOS.xcscheme +++ b/OpenSourceController.xcodeproj/xcshareddata/xcschemes/OpenSourceController-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/OpenSourceController.xcodeproj/xcshareddata/xcschemes/OpenSourceController-tvOS.xcscheme b/OpenSourceController.xcodeproj/xcshareddata/xcschemes/OpenSourceController-tvOS.xcscheme index b04b5d0..b70ed63 100644 --- a/OpenSourceController.xcodeproj/xcshareddata/xcschemes/OpenSourceController-tvOS.xcscheme +++ b/OpenSourceController.xcodeproj/xcshareddata/xcschemes/OpenSourceController-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/OpenSourceController.xcodeproj/xcshareddata/xcschemes/OpenSourceController-watchOS.xcscheme b/OpenSourceController.xcodeproj/xcshareddata/xcschemes/OpenSourceController-watchOS.xcscheme index 2180d78..6a900ab 100644 --- a/OpenSourceController.xcodeproj/xcshareddata/xcschemes/OpenSourceController-watchOS.xcscheme +++ b/OpenSourceController.xcodeproj/xcshareddata/xcschemes/OpenSourceController-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" diff --git a/Sources/Controller/OpenSourceViewController.swift b/Sources/Controller/OpenSourceViewController.swift index 497f775..8e53abf 100644 --- a/Sources/Controller/OpenSourceViewController.swift +++ b/Sources/Controller/OpenSourceViewController.swift @@ -83,7 +83,7 @@ class OpenSourceViewController: UITableViewController { self.navigationController?.navigationBar.barTintColor = tintColor } if let textColor = self.config.uiConfig.titleColor { - let attribut = [NSAttributedStringKey.foregroundColor.rawValue: textColor] + let attribut = [NSAttributedStringKey.foregroundColor: textColor] self.navigationController?.navigationBar.titleTextAttributes = attribut }