From f0d4ff2bbbd042d3fbfe4dbd74c507416b2c5271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darek=20Cie=C5=9Bla?= Date: Fri, 20 Dec 2019 19:01:04 +0100 Subject: [PATCH] Update to Swift 5 --- Planet.xcodeproj/project.pbxproj | 28 +++++++++++++++---- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++ .../xcshareddata/xcschemes/Planet.xcscheme | 24 +++++++--------- .../xcschemes/PlanetExample.xcscheme | 10 ++----- Planet/CountryPickerViewController.swift | 4 +-- 5 files changed, 45 insertions(+), 29 deletions(-) create mode 100644 Planet.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Planet.xcodeproj/project.pbxproj b/Planet.xcodeproj/project.pbxproj index 31ec352..d55a42e 100644 --- a/Planet.xcodeproj/project.pbxproj +++ b/Planet.xcodeproj/project.pbxproj @@ -249,7 +249,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 1130; ORGANIZATIONNAME = "kWallet GmbH"; TargetAttributes = { 64585C2C1D37EECD00D836C4 = { @@ -268,7 +268,7 @@ }; buildConfigurationList = 64585C271D37EECD00D836C4 /* Build configuration list for PBXProject "Planet" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -391,14 +391,22 @@ 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_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = 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; @@ -443,14 +451,22 @@ 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_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = 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; @@ -495,7 +511,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -514,7 +530,7 @@ PRODUCT_BUNDLE_IDENTIFIER = at.kwallet.Planet; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -525,7 +541,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = at.kwallet.PlanetTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -536,7 +552,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = at.kwallet.PlanetTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Planet.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Planet.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Planet.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Planet.xcodeproj/xcshareddata/xcschemes/Planet.xcscheme b/Planet.xcodeproj/xcshareddata/xcschemes/Planet.xcscheme index f9d200d..6434e8e 100644 --- a/Planet.xcodeproj/xcshareddata/xcschemes/Planet.xcscheme +++ b/Planet.xcodeproj/xcshareddata/xcschemes/Planet.xcscheme @@ -1,6 +1,6 @@ + + + + @@ -39,17 +48,6 @@ - - - - - - - - - - - - + + - - UITableViewCell { - let style: UITableViewCellStyle = showsCallingCodes ? .subtitle : .default + let style: UITableViewCell.CellStyle = showsCallingCodes ? .subtitle : .default let identifier = showsCallingCodes ? "SubtitleCell" : "DefaultCell" let cell = tableView.dequeueReusableCell(withIdentifier: identifier)