From cdd7b686e630b85f7945aee2a4a5802d2045e96a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20V=C3=A4limaa?= Date: Thu, 24 Oct 2024 20:18:04 +0800 Subject: [PATCH] feat: update navigation sdk versions (iOS -> 9.1.2, Android -> 6.0.0) and min iOS version to 15 (#306) --- CARPLAY.md | 2 +- README.md | 2 +- android/build.gradle | 6 ++++-- example/android/app/build.gradle | 2 +- example/android/build.gradle | 8 ++++---- example/ios/Podfile | 4 ++-- example/ios/SampleApp.xcodeproj/project.pbxproj | 6 +++--- example/ios/SampleApp/AppDelegate.m | 1 - example/ios/SampleApp/AppDelegateCarPlay.m | 1 - example/src/controls/mapsControls.tsx | 1 + react-native-navigation-sdk.podspec | 4 ++-- src/maps/mapView/types.ts | 2 +- 12 files changed, 20 insertions(+), 19 deletions(-) diff --git a/CARPLAY.md b/CARPLAY.md index f46cd7b..40e1f06 100644 --- a/CARPLAY.md +++ b/CARPLAY.md @@ -4,7 +4,7 @@ This guide explains how to enable and integrate Apple CarPlay with the React Nat ## Requirements -- iOS device or iOS simulator (iOS 14.0+) +- iOS device or iOS simulator (iOS 15.0+) - CarPlay Simulator - CarPlay entitlement for your application (provided by Apple) diff --git a/README.md b/README.md index e6d5b55..78fe757 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This repository contains a React Native plugin that provides a [Google Navigatio | | Android | iOS | | ------------------------------- | ------- | --------- | -| **Minimum mobile OS supported** | SDK 23+ | iOS 14.0+ | +| **Minimum mobile OS supported** | SDK 23+ | iOS 15.0+ | * A React Native project * A Google Cloud project diff --git a/android/build.gradle b/android/build.gradle index 62ba866..2f1f7da 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -15,13 +15,15 @@ import groovy.json.JsonSlurper buildscript { + ext.kotlin_version = '2.0.0' repositories { google() mavenCentral() } dependencies { - classpath("com.android.tools.build:gradle:7.2.1") + classpath("com.android.tools.build:gradle:8.4.0") + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -76,6 +78,6 @@ dependencies { implementation 'com.facebook.react:react-native:+' implementation 'com.android.support:multidex:1.0.3' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation "com.google.android.libraries.navigation:navigation:5.3.1" + implementation "com.google.android.libraries.navigation:navigation:6.0.0" api 'com.google.guava:guava:31.0.1-android' } diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index e999c47..fa0514a 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -131,7 +131,7 @@ dependencies { // For Android Auto Sample support implementation "androidx.car.app:app:1.4.0" implementation "androidx.car.app:app-projected:1.4.0" - implementation 'com.google.android.libraries.navigation:navigation:5.3.1' + implementation 'com.google.android.libraries.navigation:navigation:6.0.0' } secrets { diff --git a/example/android/build.gradle b/example/android/build.gradle index bf9dc9e..c1a71ea 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,11 +1,11 @@ // Copyright 2023 Google LLC -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,7 +25,7 @@ buildscript { mavenCentral() } dependencies { - classpath("com.android.tools.build:gradle:7.2.1") + classpath('com.android.tools.build:gradle:8.4.0') classpath("com.facebook.react:react-native-gradle-plugin") classpath("com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1") } diff --git a/example/ios/Podfile b/example/ios/Podfile index 76a93f6..597d7a3 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -10,7 +10,7 @@ end node_require('react-native/scripts/react_native_pods.rb') node_require('react-native-permissions/scripts/setup.rb') -platform :ios, "14.0" +platform :ios, "15.0" prepare_react_native_project! setup_permissions([ @@ -55,4 +55,4 @@ post_install do |installer| config[:reactNativePath], :mac_catalyst_enabled => false ) -end \ No newline at end of file +end diff --git a/example/ios/SampleApp.xcodeproj/project.pbxproj b/example/ios/SampleApp.xcodeproj/project.pbxproj index 7fadfe9..b0075c8 100644 --- a/example/ios/SampleApp.xcodeproj/project.pbxproj +++ b/example/ios/SampleApp.xcodeproj/project.pbxproj @@ -13,7 +13,7 @@ 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 29F89EA4FF546EABE968E1D2 /* libPods-SampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 354226CC8A58229ECC025410 /* libPods-SampleApp.a */; }; 2A20E8122C8994DB00DB7ADA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 2A20E8142C8994DB00DB7ADA /* BuildFile in Frameworks */ = {isa = PBXBuildFile; }; + 2A20E8142C8994DB00DB7ADA /* (null) in Frameworks */ = {isa = PBXBuildFile; }; 2A20E8282C899A1400DB7ADA /* Info-CarPlay.plist in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB61A68108700A75B9A /* Info-CarPlay.plist */; }; 2AB8C27A2C89A07000250560 /* Keys.plist in Resources */ = {isa = PBXBuildFile; fileRef = 52D4271C2C81D3F300C7FB36 /* Keys.plist */; }; 2AB8C27E2C89A0B400250560 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; @@ -96,7 +96,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2A20E8142C8994DB00DB7ADA /* BuildFile in Frameworks */, + 2A20E8142C8994DB00DB7ADA /* (null) in Frameworks */, 29F89EA4FF546EABE968E1D2 /* libPods-SampleApp.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -946,7 +946,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD = ""; LDPLUSPLUS = ""; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/example/ios/SampleApp/AppDelegate.m b/example/ios/SampleApp/AppDelegate.m index 09cb90d..2ada6ec 100644 --- a/example/ios/SampleApp/AppDelegate.m +++ b/example/ios/SampleApp/AppDelegate.m @@ -36,7 +36,6 @@ - (BOOL)application:(UIApplication *)application NSString *api_key = [keysDictionary objectForKey:@"API_KEY"]; [GMSServices provideAPIKey:api_key]; - [GMSServices setMetalRendererEnabled:YES]; return [super application:application didFinishLaunchingWithOptions:launchOptions]; } diff --git a/example/ios/SampleApp/AppDelegateCarPlay.m b/example/ios/SampleApp/AppDelegateCarPlay.m index 9e75dbe..eedb109 100644 --- a/example/ios/SampleApp/AppDelegateCarPlay.m +++ b/example/ios/SampleApp/AppDelegateCarPlay.m @@ -37,7 +37,6 @@ - (BOOL)application:(UIApplication *)application NSString *api_key = [keysDictionary objectForKey:@"API_KEY"]; [GMSServices provideAPIKey:api_key]; - [GMSServices setMetalRendererEnabled:YES]; RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; self.rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:self.moduleName diff --git a/example/src/controls/mapsControls.tsx b/example/src/controls/mapsControls.tsx index b1fc031..978cf0e 100644 --- a/example/src/controls/mapsControls.tsx +++ b/example/src/controls/mapsControls.tsx @@ -77,6 +77,7 @@ const MapsControls: React.FC = ({ mapViewController }) => { case 2: return MapType.SATELLITE; case 3: + /** MapType.TERRAIN does not work during navigation. */ return MapType.TERRAIN; case 4: return MapType.HYBRID; diff --git a/react-native-navigation-sdk.podspec b/react-native-navigation-sdk.podspec index 535ecf9..d9c9b00 100644 --- a/react-native-navigation-sdk.podspec +++ b/react-native-navigation-sdk.podspec @@ -27,13 +27,13 @@ Pod::Spec.new do |s| s.license = package["license"] s.authors = package["author"] - s.platforms = { :ios => "14.0" } + s.platforms = { :ios => "15.0" } s.source = { :git => "https://github.com/googlemaps/react-native-navigation-sdk.git", :tag => "#{s.version}" } s.source_files = "ios/react-native-navigation-sdk/*.{h,m,mm}" s.dependency "React-Core" - s.dependency "GoogleNavigation", "5.4.0" + s.dependency "GoogleNavigation", "9.1.2" # Don't install the dependencies when we run `pod install` in the old architecture. if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then diff --git a/src/maps/mapView/types.ts b/src/maps/mapView/types.ts index 6a502f0..5c11eb8 100644 --- a/src/maps/mapView/types.ts +++ b/src/maps/mapView/types.ts @@ -117,7 +117,7 @@ export enum MapType { NORMAL, /** Satellite maps with a transparent layer of major streets. */ SATELLITE, - /** Shows the terrain of the map only */ + /** Shows the terrain of the map only. This map type does not work during navigation. */ TERRAIN, /** Satellite maps with a transparent layer of major streets. */ HYBRID,