Skip to content

Commit a858520

Browse files
committed
chore: handle merge conflicts
2 parents 1b71d72 + c4f851c commit a858520

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+3719
-1677
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.11.0"
2+
".": "0.12.0"
33
}

CARPLAY.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ This guide explains how to enable and integrate Apple CarPlay with the React Nat
1212

1313
Refer to the [Apple CarPlay Developer Guide](https://developer.apple.com/carplay/) to understand how CarPlay works and to complete the initial setup. Key steps include:
1414

15-
- Adding the CarPlay entitlement to your Xcode project.
16-
- Creating a separate scene for the CarPlay map and enabling support for multiple scenes.
15+
- Adding the CarPlay entitlement to your Xcode project
16+
- Creating a separate scene for the CarPlay map and enabling support for multiple scenes
17+
18+
For a complete implementation example, refer to [AppDelegateCarPlay.m](example/ios/SampleApp/AppDelegateCarPlay.m), [PhoneSceneDelegate.m](example/ios/SampleApp/PhoneSceneDelegate.m) and [CarSceneDelegate.m](example/ios/SampleApp/CarSceneDelegate.m). Pay special attention to how the React Native window is initialized in `PhoneSceneDelegate` when using multiple scenes.
1719

1820
### SceneDelegate for CarPlay
1921

@@ -83,4 +85,10 @@ For a more detailed example, refer to the `NavigationScreen.tsx` in the React Na
8385

8486
## Example Project
8587

86-
For a fully functional CarPlay implementation, check out the [SampleApp](./example/ios/) Xcode project, which includes the `SampleAppCarPlay` build target. The sample already contains test entitlement so you don't need to request one from Apple to run it.
88+
For a fully functional CarPlay implementation, check out the [SampleApp](./example/ios/) Xcode project, which includes the `SampleAppCarPlay` build target. The sample already contains test entitlement so you don't need to request one from Apple to run it.
89+
90+
Start the CarPlay example from the command line:
91+
92+
```bash
93+
yarn example ios:carplay
94+
```

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# Changelog
22

3+
## [0.12.0](https://github.com/googlemaps/react-native-navigation-sdk/compare/v0.11.0...v0.12.0) (2025-12-02)
4+
5+
6+
### ⚠ BREAKING CHANGES
7+
8+
* iOS header_dir changed to ReactNativeGoogleMapsNavigation for direct imports.
9+
* `no_destinations` error string on iOS is changed to `NO_DESTINATIONS`, matching other error code formats and Android implementation
10+
11+
### Features
12+
13+
* support for setting map color schema ([#500](https://github.com/googlemaps/react-native-navigation-sdk/issues/500)) ([6e0cd58](https://github.com/googlemaps/react-native-navigation-sdk/commit/6e0cd587a1a7ce5cefa1e6a592fd74e16a3983d7))
14+
* support mapId ([#495](https://github.com/googlemaps/react-native-navigation-sdk/issues/495)) ([d639fe4](https://github.com/googlemaps/react-native-navigation-sdk/commit/d639fe4e5f5a9d4a70908a542cb9d0887a41f280))
15+
* upgrade Android SDK to version 7.2.0 ([#506](https://github.com/googlemaps/react-native-navigation-sdk/issues/506)) ([3032359](https://github.com/googlemaps/react-native-navigation-sdk/commit/3032359e9085a0adbf2a62de52a4c1cf3f3c431d))
16+
* upgrade iOS SDK to version 10.6.0 ([#507](https://github.com/googlemaps/react-native-navigation-sdk/issues/507)) ([1f17d25](https://github.com/googlemaps/react-native-navigation-sdk/commit/1f17d25f7c16b1c696b1ed4923da6aa656e97dd1))
17+
18+
19+
### Bug Fixes
20+
21+
* android view invalidation mechanism ([#505](https://github.com/googlemaps/react-native-navigation-sdk/issues/505)) ([4f770c9](https://github.com/googlemaps/react-native-navigation-sdk/commit/4f770c9c32d61eff19e8b490be172db90d170b7e))
22+
* iOS navigation session attachment and detachment ([#497](https://github.com/googlemaps/react-native-navigation-sdk/issues/497)) ([cc0aae1](https://github.com/googlemaps/react-native-navigation-sdk/commit/cc0aae12c6294e667b5f561f4f81342ee90143fa))
23+
* navigation session error handling ([#502](https://github.com/googlemaps/react-native-navigation-sdk/issues/502)) ([a8ddabb](https://github.com/googlemaps/react-native-navigation-sdk/commit/a8ddabbf082c30a00350ace2dda3371d34cf15c7))
24+
* re-expose public iOS header files ([#509](https://github.com/googlemaps/react-native-navigation-sdk/issues/509)) ([00c4635](https://github.com/googlemaps/react-native-navigation-sdk/commit/00c4635436aed7b1c425077074ea4bb649379c9a))
25+
* resolve map view initialization timing issue ([#504](https://github.com/googlemaps/react-native-navigation-sdk/issues/504)) ([3c46f4d](https://github.com/googlemaps/react-native-navigation-sdk/commit/3c46f4d2d16553b4529a3fa6efba1fb929cc8ca0))
26+
27+
28+
### Miscellaneous Chores
29+
30+
* breaking change on re-expose public iOS header files ([#511](https://github.com/googlemaps/react-native-navigation-sdk/issues/511)) ([e04d42a](https://github.com/googlemaps/react-native-navigation-sdk/commit/e04d42aa2172ca851fba0e7a642c5c4cf2b612d6))
31+
332
## [0.11.0](https://github.com/googlemaps/react-native-navigation-sdk/compare/v0.10.3...v0.11.0) (2025-10-13)
433

534

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ in an unbounded widget will cause the application to behave unexpectedly.
287287
// Permissions must have been granted by this point.
288288

289289
<NavigationView
290+
mapId="your-map-id-here" // Optional: Your map ID configured in Google Cloud Console
290291
androidStylingOptions={{
291292
primaryDayModeThemeColor: '#34eba8',
292293
headerDistanceValueTextColor: '#76b5c5',
@@ -310,11 +311,21 @@ You can also add a bare `MapView` that works as a normal map view without naviga
310311

311312
```tsx
312313
<MapView
314+
mapId="your-map-id-here" // Optional: Your map ID configured in Google Cloud Console
313315
mapViewCallbacks={mapViewCallbacks}
314316
onMapViewControllerCreated={setMapViewController}
315317
/>
316318
```
317319

320+
### Control light and dark modes
321+
322+
Use the `mapColorScheme` prop on both `NavigationView` and `MapView` to force the map tiles into light, dark, or system-following mode.
323+
324+
For the navigation UI, pass the `navigationNightMode` prop to `NavigationView` to configure the initial lighting mode for navigation session.
325+
326+
> [!NOTE]
327+
> When navigation UI is enabled, `mapColorScheme` does not affect the view styling. To control the style of the navigation UI, use the `navigationNightMode` prop on `NavigationView` instead.
328+
318329
### Requesting and handling permissions
319330

320331
The Google Navigation SDK React Native library offers functionalities that necessitate specific permissions from the mobile operating system. These include, but are not limited to, location services, background execution, and receiving background location updates.

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ dependencies {
8282
implementation "androidx.car.app:app:1.4.0"
8383
implementation "androidx.car.app:app-projected:1.4.0"
8484
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
85-
implementation "com.google.android.libraries.navigation:navigation:7.0.0"
85+
implementation "com.google.android.libraries.navigation:navigation:7.1.0"
8686
api 'com.google.guava:guava:31.0.1-android'
8787
}

android/src/main/java/com/google/android/react/navsdk/CustomTypes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
package com.google.android.react.navsdk;
1515

1616
public class CustomTypes {
17-
public enum FragmentType {
17+
public enum MapViewType {
1818
MAP,
1919
NAVIGATION
2020
}

android/src/main/java/com/google/android/react/navsdk/EnumTranslationUtil.java

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import com.google.android.gms.maps.GoogleMap;
1717
import com.google.android.gms.maps.GoogleMap.CameraPerspective;
18+
import com.google.android.gms.maps.model.MapColorScheme;
1819
import com.google.android.libraries.navigation.AlternateRoutesStrategy;
1920
import com.google.android.libraries.navigation.ForceNightMode;
2021
import com.google.android.libraries.navigation.Navigator;
@@ -89,11 +90,22 @@ public static int getMapTypeFromJsValue(int jsValue) {
8990
}
9091
}
9192

92-
public static CustomTypes.FragmentType getFragmentTypeFromJsValue(int jsValue) {
93+
public static CustomTypes.MapViewType getMapViewTypeFromJsValue(int jsValue) {
9394
return switch (jsValue) {
94-
case 0 -> CustomTypes.FragmentType.MAP;
95-
case 1 -> CustomTypes.FragmentType.NAVIGATION;
96-
default -> throw new IllegalStateException("Unexpected FragmentType value: " + jsValue);
95+
case 0 -> CustomTypes.MapViewType.MAP;
96+
case 1 -> CustomTypes.MapViewType.NAVIGATION;
97+
default -> throw new IllegalStateException("Unexpected MapViewType value: " + jsValue);
9798
};
9899
}
100+
101+
public static @MapColorScheme int getMapColorSchemeFromJsValue(int jsValue) {
102+
switch (jsValue) {
103+
case 1:
104+
return MapColorScheme.LIGHT;
105+
case 2:
106+
return MapColorScheme.DARK;
107+
default:
108+
return MapColorScheme.FOLLOW_SYSTEM;
109+
}
110+
}
99111
}

android/src/main/java/com/google/android/react/navsdk/IMapViewFragment.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,17 @@
1515

1616
import android.view.View;
1717
import com.google.android.gms.maps.GoogleMap;
18-
import com.google.android.libraries.navigation.StylingOptions;
18+
import com.google.android.gms.maps.model.MapColorScheme;
1919

2020
public interface IMapViewFragment {
2121
MapViewController getMapController();
2222

23-
void setStylingOptions(StylingOptions stylingOptions);
24-
25-
void applyStylingOptions();
26-
2723
void setMapStyle(String url);
2824

2925
GoogleMap getGoogleMap();
3026

27+
void setMapColorScheme(@MapColorScheme int colorScheme);
28+
3129
// Fragment
3230
boolean isAdded();
3331

android/src/main/java/com/google/android/react/navsdk/INavViewFragment.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
*/
1414
package com.google.android.react.navsdk;
1515

16+
import com.google.android.libraries.navigation.ForceNightMode;
17+
import com.google.android.libraries.navigation.StylingOptions;
18+
1619
public interface INavViewFragment extends IMapViewFragment {
1720
void setNavigationUiEnabled(boolean enableNavigationUi);
1821

@@ -32,7 +35,11 @@ public interface INavViewFragment extends IMapViewFragment {
3235

3336
void showRouteOverview();
3437

35-
void setNightModeOption(int jsValue);
38+
void setNightModeOption(@ForceNightMode int nightModeOverride);
3639

3740
void setReportIncidentButtonEnabled(boolean enabled);
41+
42+
void setStylingOptions(StylingOptions stylingOptions);
43+
44+
void applyStylingOptions();
3845
}

android/src/main/java/com/google/android/react/navsdk/JsErrors.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,7 @@ public class JsErrors {
2121
public static final String NO_MAP_ERROR_CODE = "NO_MAP_ERROR_CODE";
2222
public static final String NO_MAP_ERROR_MESSAGE =
2323
"Make sure to initialize the map view has been initialized before executing.";
24+
25+
public static final String NO_DESTINATIONS_ERROR_CODE = "NO_DESTINATIONS";
26+
public static final String NO_DESTINATIONS_ERROR_MESSAGE = "Destinations not set";
2427
}

0 commit comments

Comments
 (0)