From c39d434577d90332f8b770f2515e854e0655218a Mon Sep 17 00:00:00 2001 From: Amit Kumar Swami Date: Wed, 3 Oct 2018 12:08:47 +0800 Subject: [PATCH 1/3] Update to swift 4.2, GoogleMap 2.7.0 RxSwift, RxCocoa 4.3.1 and Bump version to 3.1.0 --- .DS_Store | Bin 8196 -> 0 bytes .gitignore | 2 ++ Example/AppDelegate.swift | 2 +- Podfile | 2 +- Podfile.lock | 36 ++++++++++++++----------- README.md | 6 ++--- RxGoogleMaps.podspec | 10 +++---- RxGoogleMaps.xcodeproj/project.pbxproj | 15 +++++++---- Sources/GMSMapViewDelegateProxy.swift | 2 +- 9 files changed, 44 insertions(+), 31 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 678b63fac65d1037d0f88bd271e3bc18929fccd3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHM%TC)s6g@*D5vdF4rpnU%00@Z%OACyUsum%l?g?=oK$5ZS1iJL9>;3~j!I$to zJ$Ggbd8!FWw1_*>%o*Q%&-I-n$HN!^=3tcW0yO|tcEQb$9Og9fOP^_L!LmU#`_NmKoyu(K+f(}9HN07!}0U`s2Jw-?c+NNwCF9cgAU^^IKQN&=Qs_Fa0N?W zLR*1rX0gb4UB@ls+PvQ5)gii!A25SN?cfYQaLhQfX` z_RkBI-)6R^CsU*O#C6h>&Jf>avm{MIB~$zBQ0$DA;8I?gDUW<3j78D CtL2#h diff --git a/.gitignore b/.gitignore index b94a96e..284a482 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,5 @@ fastlane/screenshots fastlane/test_output Example/key.plist + +.DS_Store diff --git a/Example/AppDelegate.swift b/Example/AppDelegate.swift index 25dcb6d..16dff57 100644 --- a/Example/AppDelegate.swift +++ b/Example/AppDelegate.swift @@ -26,7 +26,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // TODO: Replace with your API Key from https://developers.google.com/maps/documentation/ios-sdk/ GMSServices.provideAPIKey("YOUR-API-KEY") return true diff --git a/Podfile b/Podfile index 54966c4..1433362 100644 --- a/Podfile +++ b/Podfile @@ -9,7 +9,7 @@ end post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| - config.build_settings['SWIFT_VERSION'] = '4.0' + config.build_settings['SWIFT_VERSION'] = '4.2' #config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.10' end end diff --git a/Podfile.lock b/Podfile.lock index e9e076e..c327a76 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,30 +1,36 @@ PODS: - - GoogleMaps (2.6.0): - - GoogleMaps/Maps (= 2.6.0) - - GoogleMaps/Base (2.6.0) - - GoogleMaps/Maps (2.6.0): + - GoogleMaps (2.7.0): + - GoogleMaps/Maps (= 2.7.0) + - GoogleMaps/Base (2.7.0) + - GoogleMaps/Maps (2.7.0): - GoogleMaps/Base - - RxCocoa (4.1.2): + - RxCocoa (4.3.1): - RxSwift (~> 4.0) - - RxGoogleMaps (3.0.1): - - GoogleMaps (~> 2.6.0) + - RxGoogleMaps (3.1.0): + - GoogleMaps (~> 2.7.0) - RxCocoa (~> 4.0) - RxSwift (~> 4.0) - - RxSwift (4.1.2) + - RxSwift (4.3.1) DEPENDENCIES: - RxGoogleMaps (from `./`) +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - GoogleMaps + - RxCocoa + - RxSwift + EXTERNAL SOURCES: RxGoogleMaps: - :path: ./ + :path: "./" SPEC CHECKSUMS: - GoogleMaps: 42f91c68b7fa2f84d5c86597b18ceb99f5414c7f - RxCocoa: d88ba0f1f6abf040011a9eb4b539324fc426843a - RxGoogleMaps: 35ac8f51dc37e2b2ca0bf475ddd713a96ad896a6 - RxSwift: e49536837d9901277638493ea537394d4b55f570 + GoogleMaps: f79af95cb24d869457b1f961c93d3ce8b2f3b848 + RxCocoa: 78763c7b07d02455598d9fc3c1ad091a28b73635 + RxGoogleMaps: a801d6a49c0c24c6e4003a376040b8714d76562c + RxSwift: fe0fd770a43acdb7d0a53da411c9b892e69bb6e4 -PODFILE CHECKSUM: 8926bb4f317d1813c964a7c97038b24441fbcde8 +PODFILE CHECKSUM: 5ddedf02cee7bfec75a7b664a996fde670dfb87b -COCOAPODS: 1.4.0 +COCOAPODS: 1.5.3 diff --git a/README.md b/README.md index 2b8b5ca..8481a8c 100644 --- a/README.md +++ b/README.md @@ -142,9 +142,9 @@ Than run `pod install`, and you should be good to go! ## Requirements -- Swift 4.0 -- [RxSwift](https://github.com/ReactiveX/RxSwift) >= 4.0 -- [RxCocoa](https://github.com/ReactiveX/RxSwift) >= 4.0 +- Swift 4.2 +- [RxSwift](https://github.com/ReactiveX/RxSwift) >= 4.3 +- [RxCocoa](https://github.com/ReactiveX/RxSwift) >= 4.3 ## License diff --git a/RxGoogleMaps.podspec b/RxGoogleMaps.podspec index a1b3b8f..df06df8 100644 --- a/RxGoogleMaps.podspec +++ b/RxGoogleMaps.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RxGoogleMaps" - s.version = "3.0.1" + s.version = "3.1.0" s.summary = "RxSwift reactive wrapper for GoogleMaps SDK." s.homepage = "https://github.com/RxSwiftCommunity/RxGoogleMaps" s.license = 'MIT' @@ -12,11 +12,11 @@ Pod::Spec.new do |s| s.source_files = 'Sources/*.swift' s.static_framework = true - s.dependency 'RxSwift', '~> 4.0' - s.dependency 'RxCocoa', '~> 4.0' - s.dependency 'GoogleMaps', '~> 2.6.0' + s.dependency 'RxSwift', '~> 4.3' + s.dependency 'RxCocoa', '~> 4.3' + s.dependency 'GoogleMaps', '~> 2.7.0' s.pod_target_xcconfig = { - 'SWIFT_VERSION' => '4.0' + 'SWIFT_VERSION' => '4.2' } end diff --git a/RxGoogleMaps.xcodeproj/project.pbxproj b/RxGoogleMaps.xcodeproj/project.pbxproj index 06d38f0..4731e62 100644 --- a/RxGoogleMaps.xcodeproj/project.pbxproj +++ b/RxGoogleMaps.xcodeproj/project.pbxproj @@ -183,7 +183,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1000; ORGANIZATIONNAME = "Gen X Hippies Company"; TargetAttributes = { 090646D11EB8C350007F53BA = { @@ -193,6 +193,7 @@ A90F9CB81DAABB5600A3461E = { CreatedOnToolsVersion = 8.0; DevelopmentTeam = H7VM6ZW9AJ; + LastSwiftMigration = 1000; ProvisioningStyle = Automatic; }; }; @@ -353,7 +354,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.oo-v.RxGoogleMaps"; PRODUCT_NAME = RxGoogleMaps; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -375,7 +376,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.oo-v.RxGoogleMaps"; PRODUCT_NAME = RxGoogleMaps; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -392,6 +393,7 @@ 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_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -399,6 +401,7 @@ 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; @@ -452,6 +455,7 @@ 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_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -459,6 +463,7 @@ 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; @@ -503,7 +508,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.oo-v.RxGoogleMaps.Example"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -518,7 +523,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.oo-v.RxGoogleMaps.Example"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; }; name = Release; }; diff --git a/Sources/GMSMapViewDelegateProxy.swift b/Sources/GMSMapViewDelegateProxy.swift index 46c043a..575aa6b 100644 --- a/Sources/GMSMapViewDelegateProxy.swift +++ b/Sources/GMSMapViewDelegateProxy.swift @@ -121,7 +121,7 @@ func castOrThrow(_ resultType: T.Type, _ object: Any) throws -> T { func castOrFatalError(_ value: Any!) -> T { let maybeResult: T? = value as? T guard let result = maybeResult else { - fatalError("Failure converting from \(value) to \(T.self)") + fatalError("Failure converting from \(value ?? "") to \(T.self)") } return result From 0ce1977b4fcf0e0599c626c4eff00a6fe47b7563 Mon Sep 17 00:00:00 2001 From: Amit Kumar Swami Date: Thu, 4 Oct 2018 11:56:22 +0800 Subject: [PATCH 2/3] Add Swift 4 backward compatibility for example project --- Example/AppDelegate.swift | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Example/AppDelegate.swift b/Example/AppDelegate.swift index 16dff57..f8890a9 100644 --- a/Example/AppDelegate.swift +++ b/Example/AppDelegate.swift @@ -21,12 +21,18 @@ import UIKit import GoogleMaps +#if swift(>=4.2) + typealias ApplicationLaunchOptionsKey = UIApplication.LaunchOptionsKey +#else + typealias ApplicationLaunchOptionsKey = UIApplicationLaunchOptionsKey +#endif + @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { - + var window: UIWindow? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [ApplicationLaunchOptionsKey: Any]?) -> Bool { // TODO: Replace with your API Key from https://developers.google.com/maps/documentation/ios-sdk/ GMSServices.provideAPIKey("YOUR-API-KEY") return true From 8375fcb76ac29c8aa32e9682411cb15211cc4df5 Mon Sep 17 00:00:00 2001 From: Amit Kumar Swami Date: Thu, 4 Oct 2018 11:58:08 +0800 Subject: [PATCH 3/3] Update carthage dependencies RxSwift 4.3.1 --- Cartfile | 2 +- Cartfile.resolved | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cartfile b/Cartfile index 61e1dcc..82119a9 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "ReactiveX/RxSwift" ~> 4.0 \ No newline at end of file +github "ReactiveX/RxSwift" ~> 4.3 \ No newline at end of file diff --git a/Cartfile.resolved b/Cartfile.resolved index 61e1dcc..b34f3f7 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1 +1 @@ -github "ReactiveX/RxSwift" ~> 4.0 \ No newline at end of file +github "ReactiveX/RxSwift" "4.3.1"