From ab325dcb337e462789b1e9d0b699a7ccdb63def5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Fazekas?= Date: Sun, 28 Apr 2024 08:00:42 +0200 Subject: [PATCH] feat: upgrade default mapbox version to 10.17.0 (#3466) --- .github/workflows/ios-actions.yml | 2 +- android/build.gradle | 2 +- android/install.md | 4 +- docs/GettingStarted.md | 22 +++-- example/android/build.gradle | 4 +- example/ios/Podfile | 2 +- example/ios/Podfile.lock | 148 +++++------------------------- ios/install.md | 2 +- plugin/install.md | 4 +- rnmapbox-maps.podspec | 2 +- 10 files changed, 48 insertions(+), 144 deletions(-) diff --git a/.github/workflows/ios-actions.yml b/.github/workflows/ios-actions.yml index ee5f0eccf..5a4e43f40 100644 --- a/.github/workflows/ios-actions.yml +++ b/.github/workflows/ios-actions.yml @@ -109,7 +109,7 @@ jobs: - name: Install Pod Dependencies if: steps.pods-cache.outputs.cache-hit != 'true' - run: cd ios && pod --version && pod update MapboxMaps hermes-engine RCT-Folly && pod install + run: cd ios && pod --version && pod update MapboxMaps hermes-engine RCT-Folly Turf && pod install env: CI_MAP_IMPL: ${{ inputs.MAP_IMPL }} RCT_NEW_ARCH_ENABLED: ${{ inputs.NEW_ARCH && 1 || 0 }} diff --git a/android/build.gradle b/android/build.gradle index d022c64e5..0db13e2df 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ def defaultMapboxMapsImpl = "mapbox" -def defaultMapboxMapsVersion = "10.16.4" +def defaultMapboxMapsVersion = "10.17.0" def safeExtGet(prop, fallback) { rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback diff --git a/android/install.md b/android/install.md index 67acc37c8..1a360a4ea 100644 --- a/android/install.md +++ b/android/install.md @@ -46,7 +46,7 @@ Set `RNMapboxMapsVersion` in `android/build.gradle > buildscript > ext` section ```groovy buildscript { ext { - RNMapboxMapsVersion = '11.1.0' + RNMapboxMapsVersion = '11.3.0' } } ``` @@ -70,7 +70,7 @@ buildscript { ```groovy buildscript { ext { - RNMapboxMapsVersion = '11.0.0' + RNMapboxMapsVersion = '11.3.0' } } ``` diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index 5392f4f65..04ee4320d 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -5,6 +5,10 @@ Where to go from here? You can head straight to [examples](/example) folder if you want to jump into the deep end. However, if you prefer an easier ramp-up, then make sure to stick around and check out the guides below. +## Installation + +Please follow our install guides for the platforms you're interested in (ios, android, expo): https://rnmapbox.github.io/docs/install + ## Setting your accessToken In order to work, mapbox requires you to create an accessToken and set it in your app. @@ -13,9 +17,9 @@ You can create and manage your access tokens on your [Mapbox Account page](https Once you have your accessToken, set it like this ```js -import MapboxGL from "@rnmapbox/maps"; +import Mapbox from "@rnmapbox/maps"; -MapboxGL.setAccessToken(""); +Mapbox.setAccessToken(""); ``` ## Setting connection status [Android only] @@ -25,9 +29,9 @@ If you are hosting styles and sources on localhost, you might need to set the co Manually sets the connectivity state of the app, bypassing any checks to the ConnectivityManager. Set to `true` for connected, `false` for disconnected, and `null` for ConnectivityManager to determine. ```js -import MapboxGL from "@rnmapbox/maps"; +import Mapbox from "@rnmapbox/maps"; -MapboxGL.setConnected(true); +Mapbox.setConnected(true); ``` ## Disabling Telemetry @@ -37,7 +41,7 @@ If you would like to programmatically disable this within your app add the code ```js componentDidMount() { - MapboxGL.setTelemetryEnabled(false); + Mapbox.setTelemetryEnabled(false); } ``` @@ -48,9 +52,9 @@ For more information on mapbox and telemetry: [https://www.mapbox.com/telemetry] ```js import React, { Component } from "react"; import { StyleSheet, View } from "react-native"; -import MapboxGL from "@rnmapbox/maps"; +import Mapbox, {MapView} from "@rnmapbox/maps"; -MapboxGL.setAccessToken(""); +Mapbox.setAccessToken(""); const styles = StyleSheet.create({ page: { @@ -71,14 +75,14 @@ const styles = StyleSheet.create({ export default class App extends Component { componentDidMount() { - MapboxGL.setTelemetryEnabled(false); + Mapbox.setTelemetryEnabled(false); } render() { return ( - + ); diff --git a/example/android/build.gradle b/example/android/build.gradle index c9ecdeff8..a48843cff 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -8,10 +8,10 @@ buildscript { RNMapboxMapsImpl = "mapbox" kotlinVersion = '1.6.21' } else if (System.getenv('CI_MAP_IMPL').equals('mapbox11')) { - RNMapboxMapsVersion = '11.1.0' + RNMapboxMapsVersion = '11.3.0' RNMapboxMapsImpl = "mapbox" } else if (project.hasProperty('RNMBX11') && project.getProperty('RNMBX11').toBoolean()) { - RNMapboxMapsVersion = '11.1.0' + RNMapboxMapsVersion = '11.3.0' } // Mapbox deps diff --git a/example/ios/Podfile b/example/ios/Podfile index 0f0e6cbe0..de92c84c2 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -20,7 +20,7 @@ if ENV['CI_MAP_IMPL'] $RNMapboxMapsImpl = 'mapbox' when 'mapbox11' $RNMapboxMapsImpl = 'mapbox' - $RNMapboxMapsVersion = '= 11.0.0' + $RNMapboxMapsVersion = '= 11.3.0' else fail "Invalid CI_MAP_IMPL value: #{ENV['CI_MAP_IMPL']}" end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 85a10623a..1cf6b772a 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,6 +1,5 @@ PODS: - boost (1.83.0) - - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - FBLazyVector (0.73.0) - FBReactNativeSpec (0.73.0): @@ -10,78 +9,21 @@ PODS: - React-Core (= 0.73.0) - React-jsi (= 0.73.0) - ReactCommon/turbomodule/core (= 0.73.0) - - Flipper (0.201.0): - - Flipper-Folly (~> 2.6) - - Flipper-Boost-iOSX (1.76.0.1.11) - - Flipper-DoubleConversion (3.2.0.1) - - Flipper-Fmt (7.1.7) - - Flipper-Folly (2.6.10): - - Flipper-Boost-iOSX - - Flipper-DoubleConversion - - Flipper-Fmt (= 7.1.7) - - Flipper-Glog - - libevent (~> 2.1.12) - - OpenSSL-Universal (= 1.1.1100) - - Flipper-Glog (0.5.0.5) - - Flipper-PeerTalk (0.0.4) - - FlipperKit (0.201.0): - - FlipperKit/Core (= 0.201.0) - - FlipperKit/Core (0.201.0): - - Flipper (~> 0.201.0) - - FlipperKit/CppBridge - - FlipperKit/FBCxxFollyDynamicConvert - - FlipperKit/FBDefines - - FlipperKit/FKPortForwarding - - SocketRocket (~> 0.6.0) - - FlipperKit/CppBridge (0.201.0): - - Flipper (~> 0.201.0) - - FlipperKit/FBCxxFollyDynamicConvert (0.201.0): - - Flipper-Folly (~> 2.6) - - FlipperKit/FBDefines (0.201.0) - - FlipperKit/FKPortForwarding (0.201.0): - - CocoaAsyncSocket (~> 7.6) - - Flipper-PeerTalk (~> 0.0.4) - - FlipperKit/FlipperKitHighlightOverlay (0.201.0) - - FlipperKit/FlipperKitLayoutHelpers (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutTextSearchable - - FlipperKit/FlipperKitLayoutIOSDescriptors (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutHelpers - - FlipperKit/FlipperKitLayoutPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutHelpers - - FlipperKit/FlipperKitLayoutIOSDescriptors - - FlipperKit/FlipperKitLayoutTextSearchable - - FlipperKit/FlipperKitLayoutTextSearchable (0.201.0) - - FlipperKit/FlipperKitNetworkPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitReactPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitUserDefaultsPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/SKIOSNetworkPlugin (0.201.0): - - FlipperKit/Core - - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) - hermes-engine (0.73.0): - hermes-engine/Pre-built (= 0.73.0) - hermes-engine/Pre-built (0.73.0) - libevent (2.1.12) - - MapboxCommon (23.8.6) - - MapboxCoreMaps (10.16.4): - - MapboxCommon (~> 23.8) - - MapboxMaps (10.16.4): - - MapboxCommon (= 23.8.6) - - MapboxCoreMaps (= 10.16.4) + - MapboxCommon (23.9.2) + - MapboxCoreMaps (10.17.0): + - MapboxCommon (~> 23.9) + - MapboxMaps (10.17.0): + - MapboxCommon (= 23.9.2) + - MapboxCoreMaps (= 10.17.0) - MapboxMobileEvents (= 1.0.10) - - Turf (~> 2.0) + - Turf (= 2.7.0) - MapboxMobileEvents (1.0.10) - - OpenSSL-Universal (1.1.1100) - RCT-Folly (2022.05.16.00): - boost - DoubleConversion @@ -953,7 +895,7 @@ PODS: - React-Mapbuffer (0.73.0): - glog - React-debug - - react-native-safe-area-context (4.8.0): + - react-native-safe-area-context (4.8.2): - React-Core - React-nativeconfig (0.73.0) - React-NativeModulesApple (0.73.0): @@ -1122,16 +1064,16 @@ PODS: - React-jsi (= 0.73.0) - React-logger (= 0.73.0) - React-perflogger (= 0.73.0) - - RNCAsyncStorage (1.18.1): + - RNCAsyncStorage (1.23.1): - React-Core - - rnmapbox-maps (10.1.10): - - MapboxMaps (~> 10.16.4) + - rnmapbox-maps (10.1.19): + - MapboxMaps (~> 10.17.0) - React - React-Core - - rnmapbox-maps/DynamicLibrary (= 10.1.10) + - rnmapbox-maps/DynamicLibrary (= 10.1.19) - Turf - - rnmapbox-maps/DynamicLibrary (10.1.10): - - MapboxMaps (~> 10.16.4) + - rnmapbox-maps/DynamicLibrary (10.1.19): + - MapboxMaps (~> 10.17.0) - React - React-Core - Turf @@ -1150,30 +1092,9 @@ DEPENDENCIES: - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) - - Flipper (= 0.201.0) - - Flipper-Boost-iOSX (= 1.76.0.1.11) - - Flipper-DoubleConversion (= 3.2.0.1) - - Flipper-Fmt (= 7.1.7) - - Flipper-Folly (= 2.6.10) - - Flipper-Glog (= 0.5.0.5) - - Flipper-PeerTalk (= 0.0.4) - - FlipperKit (= 0.201.0) - - FlipperKit/Core (= 0.201.0) - - FlipperKit/CppBridge (= 0.201.0) - - FlipperKit/FBCxxFollyDynamicConvert (= 0.201.0) - - FlipperKit/FBDefines (= 0.201.0) - - FlipperKit/FKPortForwarding (= 0.201.0) - - FlipperKit/FlipperKitHighlightOverlay (= 0.201.0) - - FlipperKit/FlipperKitLayoutPlugin (= 0.201.0) - - FlipperKit/FlipperKitLayoutTextSearchable (= 0.201.0) - - FlipperKit/FlipperKitNetworkPlugin (= 0.201.0) - - FlipperKit/FlipperKitReactPlugin (= 0.201.0) - - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.201.0) - - FlipperKit/SKIOSNetworkPlugin (= 0.201.0) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) - libevent (~> 2.1.12) - - OpenSSL-Universal (= 1.1.1100) - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) @@ -1182,7 +1103,6 @@ DEPENDENCIES: - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) - React-Codegen (from `build/generated/ios`) - React-Core (from `../node_modules/react-native/`) - - React-Core/DevSupport (from `../node_modules/react-native/`) - React-Core/RCTWebSocket (from `../node_modules/react-native/`) - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) @@ -1227,22 +1147,12 @@ DEPENDENCIES: SPEC REPOS: trunk: - - CocoaAsyncSocket - - Flipper - - Flipper-Boost-iOSX - - Flipper-DoubleConversion - - Flipper-Fmt - - Flipper-Folly - - Flipper-Glog - - Flipper-PeerTalk - - FlipperKit - fmt - libevent - MapboxCommon - MapboxCoreMaps - MapboxMaps - MapboxMobileEvents - - OpenSSL-Universal - SocketRocket - Turf @@ -1356,28 +1266,18 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - boost: 26fad476bfa736552bbfa698a06cc530475c1505 - CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 - DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 + boost: d3f49c53809116a5d38da093a8aa78bf551aed09 + DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 FBLazyVector: 39ba45baf4e398618f8b3a4bb6ba8fcdb7fc2133 FBReactNativeSpec: 20cfca68498e27879514790359289d1df2b52c56 - Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44 - Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c - Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 - Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b - Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 - Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 - Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 - FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 hermes-engine: 34304f8c6e8fa68f63a5fe29af82f227d817d7a7 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 - MapboxCommon: 90f76693dc02438acbb5ea9a5b266a4c0eb1c875 - MapboxCoreMaps: 7b07d1ca8c454a4381daf09df901b9d6bf90bce0 - MapboxMaps: cbb38845a9bf49b124f0e937975d560a4e01894e + MapboxCommon: 768660d6fca8193529ecf82eb6f5f9ae7a5acdf9 + MapboxCoreMaps: be412ff97b16aa7820922c818115a9a0d8211caa + MapboxMaps: 87ef0003e6db46e45e7a16939f29ae87e38e7ce2 MapboxMobileEvents: de50b3a4de180dd129c326e09cd12c8adaaa46d6 - OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0 RCTRequired: 5e3631b27c08716986980ef23eed8abdee1cdcaf RCTTypeSafety: 02a64828b0b428eb4f63de1397d44fb2d0747e85 @@ -1399,7 +1299,7 @@ SPEC CHECKSUMS: React-jsinspector: 9f6fb9ed9f03a0fb961ab8dc2e0e0ee0dc729e77 React-logger: 008caec0d6a587abc1e71be21bfac5ba1662fe6a React-Mapbuffer: 58fe558faf52ecde6705376700f848d0293d1cef - react-native-safe-area-context: d1c8161a1e9560f7066e8926a7d825eb57c5dab5 + react-native-safe-area-context: 0ee144a6170530ccc37a0fd9388e28d06f516a89 React-nativeconfig: a063483672b8add47a4875b0281e202908ff6747 React-NativeModulesApple: 169506a5fd708ab22811f76ee06a976595c367a1 React-perflogger: b61e5db8e5167f5e70366e820766c492847c082e @@ -1420,14 +1320,14 @@ SPEC CHECKSUMS: React-runtimescheduler: 77543c74df984ce56c09d49d427149c53784aaf6 React-utils: 42708ea436853045ef1eaff29996813d9fbbe209 ReactCommon: 851280fb976399ca1aabc74cc2c3612069ea70a2 - RNCAsyncStorage: b90b71f45b8b97be43bc4284e71a6af48ac9f547 - rnmapbox-maps: c8178f723f84ca1067dea8599cfe4aaf2f9d20aa + RNCAsyncStorage: 826b603ae9c0f88b5ac4e956801f755109fa4d5c + rnmapbox-maps: 81a5656a3a5a577c1ec750a58c428cfc3f1dd2c1 RNScreens: b582cb834dc4133307562e930e8fa914b8c04ef2 RNVectorIcons: fcc2f6cb32f5735b586e66d14103a74ce6ad61f8 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Turf: 13d1a92d969ca0311bbc26e8356cca178ce95da2 Yoga: 20d6a900dcc8d61d5e3b799bbf627cc34474a8c4 -PODFILE CHECKSUM: 769bf362d25d9fedd9a23e2f1351a14e6aa3d8e3 +PODFILE CHECKSUM: c9924c42d1b0f1a4aab21bfddc98e69f3e42b043 -COCOAPODS: 1.14.3 +COCOAPODS: 1.14.2 diff --git a/ios/install.md b/ios/install.md index 6fea81e43..b9323ca66 100644 --- a/ios/install.md +++ b/ios/install.md @@ -69,7 +69,7 @@ We have support for mapbox 11. Add the following to your Podfile: ```ruby -$RNMapboxMapsVersion = '= 11.1.0' +$RNMapboxMapsVersion = '= 11.3.0' ``` If using expo managed workflow, set the "RNMapboxMapsVersion" variable. See the [expo guide](/plugin/install.md) diff --git a/plugin/install.md b/plugin/install.md index 970022a04..c3cffa541 100644 --- a/plugin/install.md +++ b/plugin/install.md @@ -20,7 +20,7 @@ After installing this package, add the [config plugin](https://docs.expo.io/guid [ "@rnmapbox/maps", { - "RNMapboxMapsVersion": "11.1.0" + "RNMapboxMapsVersion": "11.3.0" } ] ] @@ -93,7 +93,7 @@ To use V11 just set the version to a 11 version, see [the ios guide](/ios/instal [ "@rnmapbox/maps", { - "RNMapboxMapsVersion": "11.1.0", + "RNMapboxMapsVersion": "11.3.0", "RNMapboxMapsDownloadToken": "sk.ey...qg", } ] diff --git a/rnmapbox-maps.podspec b/rnmapbox-maps.podspec index bd92038b4..9b4ed791d 100644 --- a/rnmapbox-maps.podspec +++ b/rnmapbox-maps.podspec @@ -20,7 +20,7 @@ require 'json' package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) ## Warning: these lines are scanned by autogenerate.js -rnMapboxMapsDefaultMapboxVersion = '~> 10.16.4' +rnMapboxMapsDefaultMapboxVersion = '~> 10.17.0' rnMapboxMapsDefaultImpl = 'mapbox'