diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..50df5d3 Binary files /dev/null and b/.DS_Store differ diff --git a/.swift-version b/.swift-version index 5186d07..819e07a 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.0 +5.0 diff --git a/.travis.yml b/.travis.yml index b98f777..97f37cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: objective-c -osx_image: xcode10 +osx_image: xcode10.2 podfile: Example/Podfile notifications: email: false diff --git a/Example/.DS_Store b/Example/.DS_Store new file mode 100644 index 0000000..3496767 Binary files /dev/null and b/Example/.DS_Store differ diff --git a/Example/Moya-SwiftyJSONMapper.xcodeproj/project.pbxproj b/Example/Moya-SwiftyJSONMapper.xcodeproj/project.pbxproj index aa82e65..a007a91 100644 --- a/Example/Moya-SwiftyJSONMapper.xcodeproj/project.pbxproj +++ b/Example/Moya-SwiftyJSONMapper.xcodeproj/project.pbxproj @@ -238,17 +238,18 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 1000; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = CocoaPods; TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 1000; - ProvisioningStyle = Manual; + DevelopmentTeam = FFLRU7747R; + LastSwiftMigration = 1020; + ProvisioningStyle = Automatic; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 1000; + LastSwiftMigration = 1020; TestTargetID = 607FACCF1AFB9204008FA782; }; }; @@ -258,6 +259,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -301,7 +303,7 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-Moya-SwiftyJSONMapper_Tests/Pods-Moya-SwiftyJSONMapper_Tests-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-Moya-SwiftyJSONMapper_Tests/Pods-Moya-SwiftyJSONMapper_Tests-frameworks.sh", "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", "${BUILT_PRODUCTS_DIR}/Moya/Moya.framework", "${BUILT_PRODUCTS_DIR}/Moya-SwiftyJSONMapper/Moya_SwiftyJSONMapper.framework", @@ -322,7 +324,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Moya-SwiftyJSONMapper_Tests/Pods-Moya-SwiftyJSONMapper_Tests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Moya-SwiftyJSONMapper_Tests/Pods-Moya-SwiftyJSONMapper_Tests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; CCD5DA6A1025628E2FEB2086 /* [CP] Embed Pods Frameworks */ = { @@ -331,7 +333,7 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-Moya-SwiftyJSONMapper_Example/Pods-Moya-SwiftyJSONMapper_Example-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-Moya-SwiftyJSONMapper_Example/Pods-Moya-SwiftyJSONMapper_Example-frameworks.sh", "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", "${BUILT_PRODUCTS_DIR}/Moya/Moya.framework", "${BUILT_PRODUCTS_DIR}/Moya-SwiftyJSONMapper/Moya_SwiftyJSONMapper.framework", @@ -352,7 +354,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Moya-SwiftyJSONMapper_Example/Pods-Moya-SwiftyJSONMapper_Example-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Moya-SwiftyJSONMapper_Example/Pods-Moya-SwiftyJSONMapper_Example-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; DF728A03AA3CAF525CCA42DD /* [CP] Check Pods Manifest.lock */ = { @@ -447,6 +449,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_MODULES = YES; @@ -503,6 +506,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_MODULES = YES; @@ -553,12 +557,16 @@ baseConfigurationReference = 2DEC71E25016FC11FE062150 /* Pods-Moya-SwiftyJSONMapper_Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = FFLRU7747R; INFOPLIST_FILE = "Moya-SwiftyJSONMapper/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -567,12 +575,16 @@ baseConfigurationReference = 2A0941FB078096C59A878701 /* Pods-Moya-SwiftyJSONMapper_Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = FFLRU7747R; INFOPLIST_FILE = "Moya-SwiftyJSONMapper/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -593,7 +605,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Moya-SwiftyJSONMapper_Example.app/Moya-SwiftyJSONMapper_Example"; }; name = Debug; @@ -611,7 +623,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Moya-SwiftyJSONMapper_Example.app/Moya-SwiftyJSONMapper_Example"; }; name = Release; diff --git a/Example/Moya-SwiftyJSONMapper.xcodeproj/xcshareddata/xcschemes/Moya-SwiftyJSONMapper-Example.xcscheme b/Example/Moya-SwiftyJSONMapper.xcodeproj/xcshareddata/xcschemes/Moya-SwiftyJSONMapper-Example.xcscheme index e758fbc..d28616f 100644 --- a/Example/Moya-SwiftyJSONMapper.xcodeproj/xcshareddata/xcschemes/Moya-SwiftyJSONMapper-Example.xcscheme +++ b/Example/Moya-SwiftyJSONMapper.xcodeproj/xcshareddata/xcschemes/Moya-SwiftyJSONMapper-Example.xcscheme @@ -1,6 +1,6 @@ 11.0) + - Alamofire (4.8.2) + - Moya (13.0.1): + - Moya/Core (= 13.0.1) + - Moya-SwiftyJSONMapper (4.0.0): + - Moya-SwiftyJSONMapper/Core (= 4.0.0) + - Moya-SwiftyJSONMapper/Core (4.0.0): + - Moya (~> 13.0.1) - SwiftyJSON - - Moya-SwiftyJSONMapper/ReactiveCocoa (3.1.0): + - Moya-SwiftyJSONMapper/ReactiveCocoa (4.0.0): - Moya-SwiftyJSONMapper/Core - Moya/ReactiveSwift - - Moya-SwiftyJSONMapper/RxSwift (3.1.0): + - Moya-SwiftyJSONMapper/RxSwift (4.0.0): - Moya-SwiftyJSONMapper/Core - Moya/RxSwift - - Moya/Core (11.0.2): + - Moya/Core (13.0.1): - Alamofire (~> 4.1) - - Result (~> 3.0) - - Moya/ReactiveSwift (11.0.2): + - Result (~> 4.1) + - Moya/ReactiveSwift (13.0.1): - Moya/Core - - ReactiveSwift (~> 3.0) - - Moya/RxSwift (11.0.2): + - ReactiveSwift (~> 5.0) + - Moya/RxSwift (13.0.1): - Moya/Core - RxSwift (~> 4.0) - - ReactiveSwift (3.1.0): - - Result (~> 3.2) - - Result (3.2.4) - - RxSwift (4.3.0) - - SwiftyJSON (3.1.4) + - ReactiveSwift (5.0.1): + - Result (~> 4.1) + - Result (4.1.0) + - RxSwift (4.5.0) + - SwiftyJSON (5.0.0) DEPENDENCIES: - Moya-SwiftyJSONMapper (from `../`) @@ -47,14 +47,14 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568 - Moya: a725035953bc1c0eb1be505ab903984501d82440 - Moya-SwiftyJSONMapper: 7d63343fe826514ff710b5d39bdccda5cfce9dbb - ReactiveSwift: 5b26d2e988fe0eed2daf48c4054d1de74db50184 - Result: d2d07204ce72856f1fd9130bbe42c35a7b0fea10 - RxSwift: a9717a34df3179fe63563f76e046ad345078dd3a - SwiftyJSON: c2842d878f95482ffceec5709abc3d05680c0220 + Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3 + Moya: f4a4b80ff2f8a4ffc208dfb31cd91636622fee6e + Moya-SwiftyJSONMapper: 46766fd2fa3543af73cb6e0674b732417e1c7a83 + ReactiveSwift: cac20a5bbe560c5806bd29c0fccf90d03b996ac1 + Result: bd966fac789cc6c1563440b348ab2598cc24d5c7 + RxSwift: f172070dfd1a93d70a9ab97a5a01166206e1c575 + SwiftyJSON: 36413e04c44ee145039d332b4f4e2d3e8d6c4db7 -PODFILE CHECKSUM: f4b96694fb484a90dfd563ab2c7e9cbd793722e9 +PODFILE CHECKSUM: b2070400d16a827b30d7177b42586267696afe2d -COCOAPODS: 1.5.3 +COCOAPODS: 1.6.1 diff --git a/Moya-SwiftyJSONMapper.podspec b/Moya-SwiftyJSONMapper.podspec index 3f3111a..abbb2e8 100644 --- a/Moya-SwiftyJSONMapper.podspec +++ b/Moya-SwiftyJSONMapper.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = "Moya-SwiftyJSONMapper" - s.version = "3.1.0" + s.version = "4.0.0" s.summary = "Map objects through SwiftyJSON in combination with Moya" s.description = <<-EOS [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON) bindings for @@ -32,7 +32,7 @@ Pod::Spec.new do |s| s.subspec "Core" do |ss| ss.source_files = "Source/*.swift" - ss.dependency "Moya", "~> 11.0" + ss.dependency "Moya", "~> 13.0.1" ss.dependency "SwiftyJSON" ss.framework = "Foundation" end diff --git a/Source/Response+SwiftyJSONMapper.swift b/Source/Response+SwiftyJSONMapper.swift index a3c984a..5675935 100755 --- a/Source/Response+SwiftyJSONMapper.swift +++ b/Source/Response+SwiftyJSONMapper.swift @@ -13,7 +13,7 @@ public extension Response { /// Maps data received from the signal into an object which implements the ALSwiftyJSONAble protocol. /// If the conversion fails, the signal errors. - public func map(to type:T.Type) throws -> T { + func map(to type:T.Type) throws -> T { let jsonObject = try mapJSON() guard let mappedObject = T(jsonData: JSON(jsonObject)) else { @@ -25,7 +25,7 @@ public extension Response { /// Maps data received from the signal into an array of objects which implement the ALSwiftyJSONAble protocol /// If the conversion fails, the signal errors. - public func map(to type:[T.Type]) throws -> [T] { + func map(to type:[T.Type]) throws -> [T] { let jsonObject = try mapJSON() let mappedArray = JSON(jsonObject)