diff --git a/.swift-version b/.swift-version index bf77d54..819e07a 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.2 +5.0 diff --git a/Arrow.framework.zip b/Arrow.framework.zip index 0330f0a..a7f6b5c 100644 Binary files a/Arrow.framework.zip and b/Arrow.framework.zip differ diff --git a/Arrow.podspec b/Arrow.podspec index b553262..7f509c1 100644 --- a/Arrow.podspec +++ b/Arrow.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Arrow' - s.version = "4.2.0" + s.version = "5.0.0" s.summary = "Elegant JSON Parsing in Swift" s.homepage = "https://github.com/freshOS/Arrow" s.license = { :type => "MIT", :file => "LICENSE" } diff --git a/Arrow.xcodeproj/project.pbxproj b/Arrow.xcodeproj/project.pbxproj index b19565c..48436b6 100644 --- a/Arrow.xcodeproj/project.pbxproj +++ b/Arrow.xcodeproj/project.pbxproj @@ -268,23 +268,23 @@ attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = "Sacha Durand Saint Omer"; TargetAttributes = { 99C292E61B24AD5E0008C32B = { CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; }; 99C292F01B24AD5F0008C32B = { CreatedOnToolsVersion = 6.3.1; DevelopmentTeam = A6CJ26NGRU; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; }; }; }; buildConfigurationList = 99C292B81B24AD4A0008C32B /* Build configuration list for PBXProject "Arrow" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -399,6 +399,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_CODE_COVERAGE = NO; @@ -448,7 +449,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -456,6 +457,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_CODE_COVERAGE = NO; @@ -496,7 +498,8 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_VERSION = 4.2; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -522,8 +525,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -547,8 +549,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -568,8 +569,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.fresh.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -583,8 +583,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.fresh.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Arrow.xcodeproj/xcshareddata/xcschemes/Arrow.xcscheme b/Arrow.xcodeproj/xcshareddata/xcschemes/Arrow.xcscheme index b5bc6f3..c51ab08 100644 --- a/Arrow.xcodeproj/xcshareddata/xcschemes/Arrow.xcscheme +++ b/Arrow.xcodeproj/xcshareddata/xcschemes/Arrow.xcscheme @@ -1,6 +1,6 @@ JSON? { let bundle = Bundle(for: NativeTypesTests.self) if let path: String = bundle.path(forResource: name, ofType: "json"), let jsonData = try? Data(contentsOf: URL(fileURLWithPath: path)), - let json = try? JSONSerialization + let json = ((try? JSONSerialization .jsonObject(with: jsonData, - options: .mutableContainers) as? NSDictionary, + options: .mutableContainers) as? NSDictionary) as NSDictionary??), let dic = json as? [String: Any] { return JSON(dic) } diff --git a/README.md b/README.md index 857da6b..52b786f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Arrow -[![Language: Swift 2, 3 and 4 3](https://img.shields.io/badge/language-swift2|swift3|swift4-f48041.svg?style=flat)](https://developer.apple.com/swift) +[![Language: Swift 5](https://img.shields.io/badge/language-swift5-f48041.svg?style=flat)](https://developer.apple.com/swift) ![Platform: iOS 8+](https://img.shields.io/badge/platform-iOS%208%2B-blue.svg?style=flat) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Cocoapods compatible](https://img.shields.io/badge/Cocoapods-compatible-4BC51D.svg?style=flat)](https://cocoapods.org) @@ -241,6 +241,7 @@ if let collection = json.collection { - Swift 4 -> version [**4.0.0**](https://github.com/freshOS/Arrow/releases/tag/4.0.0) - Swift 4.1 -> version [**4.1.0**](https://github.com/freshOS/Arrow/releases/tag/4.1.0) - Swift 4.2 -> version [**4.2.0**](https://github.com/freshOS/Arrow/releases/tag/4.2.0) +- Swift 5.0 -> version [**5.0.0**](https://github.com/freshOS/Arrow/releases/tag/5.0.0) ## Acknoledgments This wouldn't exist without [YannickDot](https://github.com/YannickDot), [Damien-nd](https://github.com/damien-nd) and [maxkonovalov](https://github.com/maxkonovalov) diff --git a/Source/Arrow.swift b/Source/Arrow.swift index ae7cc81..829cc9a 100644 --- a/Source/Arrow.swift +++ b/Source/Arrow.swift @@ -36,7 +36,7 @@ public protocol ArrowParsable { public extension ArrowParsable { /// A shortcut to init custom models with JSON. - public init?(_ json: JSON?) { + init?(_ json: JSON?) { guard let json = json else { return nil } diff --git a/Source/Info.plist b/Source/Info.plist index b6ba904..e677190 100644 --- a/Source/Info.plist +++ b/Source/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.2.0 + 5.0.0 CFBundleSignature ???? CFBundleVersion