From cf667fb6a7bafc02c18b69aebdff5af433aa373e Mon Sep 17 00:00:00 2001 From: Guillermo Gonzalez Date: Mon, 6 Nov 2017 11:34:26 +0100 Subject: [PATCH] Swift 4 (#85) * Add support for Xcode 9 and Swift 4 * Update podspec * Podspec++ --- .swift-version | 2 +- Groot.podspec | 2 +- Groot.xcodeproj/project.pbxproj | 28 +++++++++++-------- .../xcshareddata/xcschemes/Groot-Mac.xcscheme | 4 ++- .../xcshareddata/xcschemes/Groot.xcscheme | 4 ++- 5 files changed, 25 insertions(+), 15 deletions(-) diff --git a/.swift-version b/.swift-version index 9f55b2c..5186d07 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.0 +4.0 diff --git a/Groot.podspec b/Groot.podspec index 6cca4e5..0c9c323 100644 --- a/Groot.podspec +++ b/Groot.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Groot" - s.version = "2.0" + s.version = "3.0" s.summary = "From JSON to Core Data and back." s.description = <<-DESC diff --git a/Groot.xcodeproj/project.pbxproj b/Groot.xcodeproj/project.pbxproj index 3ab5fff..50a6f2d 100644 --- a/Groot.xcodeproj/project.pbxproj +++ b/Groot.xcodeproj/project.pbxproj @@ -463,7 +463,7 @@ attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = "Guillermo Gonzalez"; TargetAttributes = { B40873611B5AB6930063F150 = { @@ -474,11 +474,11 @@ }; B4DC1AEB1AA9CA5E00F67403 = { CreatedOnToolsVersion = 6.1.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; B4DC1AF61AA9CA5E00F67403 = { CreatedOnToolsVersion = 6.1.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; }; }; @@ -657,7 +657,6 @@ PRODUCT_NAME = Groot; SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -681,7 +680,6 @@ PRODUCT_NAME = Groot; SDKROOT = macosx; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; }; name = Release; }; @@ -705,7 +703,6 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.gonzalezreal.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = GrootTests; SDKROOT = macosx; - SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -726,7 +723,6 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.gonzalezreal.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = GrootTests; SDKROOT = macosx; - SWIFT_VERSION = 3.0; }; name = Release; }; @@ -738,14 +734,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; @@ -773,6 +775,7 @@ MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -787,14 +790,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; @@ -815,6 +824,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -838,7 +848,6 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -858,7 +867,6 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.gonzalezreal.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -876,7 +884,6 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.gonzalezreal.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -888,7 +895,6 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.gonzalezreal.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; }; name = Release; }; diff --git a/Groot.xcodeproj/xcshareddata/xcschemes/Groot-Mac.xcscheme b/Groot.xcodeproj/xcshareddata/xcschemes/Groot-Mac.xcscheme index cca663f..6697940 100644 --- a/Groot.xcodeproj/xcshareddata/xcschemes/Groot-Mac.xcscheme +++ b/Groot.xcodeproj/xcshareddata/xcschemes/Groot-Mac.xcscheme @@ -1,6 +1,6 @@