From d818263287b203eb91ac29eb4c039c6edf5c1dca Mon Sep 17 00:00:00 2001 From: Roman Laitarenko Date: Wed, 5 Nov 2025 17:14:24 +0200 Subject: [PATCH 1/7] bump version to 2.17.0-beta.1 and Maps SDK to 11.17.0-beta.1 --- CHANGELOG.md | 3 +- LICENSE | 66 ++++++++++++++---------- README.md | 2 +- android/build.gradle | 2 +- example/pubspec.lock | 2 +- ios/mapbox_maps_flutter.podspec | 4 +- ios/mapbox_maps_flutter/Package.resolved | 12 ++--- ios/mapbox_maps_flutter/Package.swift | 2 +- lib/src/package_info.dart | 2 +- pubspec.yaml | 2 +- 10 files changed, 54 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bd981b7..4f375b01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ -### main +### 2.17.0-beta.1 +* Update Maps SDK to v11.17.0-beta.1 * Bump Flutter SDK minimum required version to 3.27.0 and `compileSdk` to 35 on Android. ### 2.12.0 diff --git a/LICENSE b/LICENSE index 568099c0..bad63841 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ ## License -Mapbox Maps for Flutter version 2.12.0 +Mapbox Maps for Flutter version 2.17.0-beta.1 Mapbox Maps Flutter SDK Copyright © 2022 - 2025 Mapbox, Inc. All rights reserved. @@ -134,7 +134,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ## License -Mapbox Maps for iOS version 11.16.0 +Mapbox Maps for iOS version 11.17.0-beta.1 Mapbox Maps iOS SDK Copyright © 2021 - 2025 Mapbox, Inc. All rights reserved. @@ -165,7 +165,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --- -### MapboxCoreMaps,11.16.0,Mapbox ToS,Mapbox,https://www.mapbox.com/ +### MapboxCoreMaps,11.17.0-beta.1,Mapbox ToS,Mapbox,https://www.mapbox.com/ ``` Mapbox Core Maps version 11.0 @@ -762,18 +762,20 @@ SOFTWARE. ### protozero,1.7.1,BSD-2-Clause,Mapbox,https://github.com/mapbox/protozero ``` -protozero copyright (c) Mapbox. +Copyright (C) 2022, Mapbox. +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, @@ -1944,7 +1946,7 @@ DEALINGS IN THE SOFTWARE. ### License -Mapbox Maps for Android version 11.16.0 +Mapbox Maps for Android version 11.17.0-beta.1 Mapbox Maps Android SDK Copyright © 2021 - 2025 Mapbox, Inc. All rights reserved. @@ -2214,6 +2216,12 @@ License: [Chromium and built-in dependencies](https://storage.cloud.google.com/c =========================================================================== +Mapbox Maps Android uses portions of the error-prone annotations. + +License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + Mapbox Maps Android uses portions of the Experimental annotation. URL: [https://developer.android.com/jetpack/androidx/releases/annotation#1.3.0](https://developer.android.com/jetpack/androidx/releases/annotation#1.3.0) @@ -2222,9 +2230,17 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens =========================================================================== +Mapbox Maps Android uses portions of the Gradle License Plugin. + +URL: [https://github.com/jaredsburrows/gradle-license-plugin](https://github.com/jaredsburrows/gradle-license-plugin) + +License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +=========================================================================== + Mapbox Maps Android uses portions of the Gson. -License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +License: [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== @@ -2418,15 +2434,7 @@ License: [The Apache Software License, Version 2.0](http://www.apache.org/licens =========================================================================== -Mapbox Maps Android uses portions of the Gradle License Plugin. - -URL: [https://github.com/jaredsburrows/gradle-license-plugin](https://github.com/jaredsburrows/gradle-license-plugin) - -License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - -=========================================================================== - -### MapboxCoreMaps,11.16.0,Mapbox ToS,Mapbox,https://www.mapbox.com/ +### MapboxCoreMaps,11.17.0-beta.1,Mapbox ToS,Mapbox,https://www.mapbox.com/ ``` Mapbox Core Maps version 11.0 @@ -3082,18 +3090,20 @@ SOFTWARE. ### protozero,1.7.1,BSD-2-Clause,Mapbox,https://github.com/mapbox/protozero ``` -protozero copyright (c) Mapbox. +Copyright (C) 2022, Mapbox. +All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, diff --git a/README.md b/README.md index 3cf7a4f9..448824f0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Mapbox Maps SDK Flutter SDK -The Mapbox Maps SDK Flutter SDK is an officially developed solution from Mapbox that enables use of our latest Maps SDK product (v11.16.0). The SDK allows developers to embed highly-customized maps using a Flutter widget on Android and iOS. +The Mapbox Maps SDK Flutter SDK is an officially developed solution from Mapbox that enables use of our latest Maps SDK product (v11.17.0-beta.1). The SDK allows developers to embed highly-customized maps using a Flutter widget on Android and iOS. Web and desktop are not supported. diff --git a/android/build.gradle b/android/build.gradle index 5d23c77b..0875acb2 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -59,7 +59,7 @@ if (file("$rootDir/gradle/ktlint.gradle").exists() && file("$rootDir/gradle/lint } dependencies { - implementation "com.mapbox.maps:android-ndk27:11.16.0" + implementation "com.mapbox.maps:android-ndk27:11.17.0-beta.1" implementation "androidx.annotation:annotation:1.5.0" implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.2" diff --git a/example/pubspec.lock b/example/pubspec.lock index c43d36c8..0c89ecba 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -269,7 +269,7 @@ packages: path: ".." relative: true source: path - version: "2.12.0" + version: "2.17.0-beta.1" matcher: dependency: transitive description: diff --git a/ios/mapbox_maps_flutter.podspec b/ios/mapbox_maps_flutter.podspec index 64e2b1e8..258dd9b0 100644 --- a/ios/mapbox_maps_flutter.podspec +++ b/ios/mapbox_maps_flutter.podspec @@ -4,7 +4,7 @@ # Pod::Spec.new do |s| s.name = 'mapbox_maps_flutter' - s.version = '2.12.0' + s.version = '2.17.0-beta.1' s.summary = 'Mapbox Maps SDK Flutter Plugin.' s.description = 'An officially developed solution from Mapbox that enables use of our latest Maps SDK product.' @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.dependency 'Flutter' s.platform = :ios, '14.0' - s.dependency 'MapboxMaps', '11.16.0' + s.dependency 'MapboxMaps', '11.17.0-beta.1' s.dependency 'Turf', '4.0.0' # Flutter.framework does not contain a i386 slice. diff --git a/ios/mapbox_maps_flutter/Package.resolved b/ios/mapbox_maps_flutter/Package.resolved index 98e20287..2e2ca1b8 100644 --- a/ios/mapbox_maps_flutter/Package.resolved +++ b/ios/mapbox_maps_flutter/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-common-ios.git", "state" : { - "revision" : "a46ad68c7f6151216abfabd0e71bb08e53e95443", - "version" : "24.16.0" + "revision" : "8a299b32cc90578eead8340fc45f77259d41374e", + "version" : "24.17.0-beta.1" } }, { @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-core-maps-ios.git", "state" : { - "revision" : "1871be4b3d590c3bff2618f42ac2d7068da0e979", - "version" : "11.16.0" + "revision" : "215f09a8cbe472a8dbdf53000eee940d06d8e8de", + "version" : "11.17.0-beta.1" } }, { @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-maps-ios.git", "state" : { - "revision" : "486c66ef8f50945963820c9b490fd36c19e3ef04", - "version" : "11.16.0" + "revision" : "c2f3f4d30cc0eb4fac2767cb4ae111aa58e17f92", + "version" : "11.17.0-beta.1" } }, { diff --git a/ios/mapbox_maps_flutter/Package.swift b/ios/mapbox_maps_flutter/Package.swift index 546dd642..b03b72b1 100644 --- a/ios/mapbox_maps_flutter/Package.swift +++ b/ios/mapbox_maps_flutter/Package.swift @@ -12,7 +12,7 @@ let package = Package( .library(name: "mapbox-maps-flutter", targets: ["mapbox_maps_flutter"]) ], dependencies: [ - .package(url: "https://github.com/mapbox/mapbox-maps-ios.git", exact: "11.16.0"), + .package(url: "https://github.com/mapbox/mapbox-maps-ios.git", exact: "11.17.0-beta.1"), ], targets: [ .target( diff --git a/lib/src/package_info.dart b/lib/src/package_info.dart index 7b755c40..1b628e14 100644 --- a/lib/src/package_info.dart +++ b/lib/src/package_info.dart @@ -1,3 +1,3 @@ part of mapbox_maps_flutter; -const String mapboxPluginVersion = '2.12.0'; +const String mapboxPluginVersion = '2.17.0-beta.1'; diff --git a/pubspec.yaml b/pubspec.yaml index 68216746..c36b2477 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mapbox_maps_flutter description: Interactive, thoroughly customizable maps powered by Mapbox Maps mobile SDKs. -version: 2.12.0 +version: 2.17.0-beta.1 homepage: https://github.com/mapbox/mapbox-maps-flutter environment: From 6bb3cba807a72edd87525b20a4641168bd9a4220 Mon Sep 17 00:00:00 2001 From: Roman Laitarenko Date: Wed, 5 Nov 2025 17:34:08 +0200 Subject: [PATCH 2/7] add a note about version number skip --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f375b01..45bdb756 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ### 2.17.0-beta.1 + > [!NOTE] + > Version numbering has been updated to align with Mapbox's cross-platform SDK versioning scheme. This release skips from 2.12.0 to 2.17.0-beta.1 to synchronize with other Mapbox SDKs (version x.17.0-beta.1), ensuring consistent version numbers across all platforms. + * Update Maps SDK to v11.17.0-beta.1 * Bump Flutter SDK minimum required version to 3.27.0 and `compileSdk` to 35 on Android. From 41f49b744db4d4b07f56dc70729c32a4fd171168 Mon Sep 17 00:00:00 2001 From: Roman Laitarenko Date: Thu, 6 Nov 2025 09:36:36 +0200 Subject: [PATCH 3/7] fix feature state test GeoJSON source doesn't have layers --- example/integration_test/map_interface_test.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/example/integration_test/map_interface_test.dart b/example/integration_test/map_interface_test.dart index ec0c9c0e..996b8117 100644 --- a/example/integration_test/map_interface_test.dart +++ b/example/integration_test/map_interface_test.dart @@ -234,15 +234,15 @@ void main() { await app.events.onMapIdle.future; await mapboxMap.setFeatureState( - 'source', 'custom', 'point', json.encode({'choose': true})); + 'source', null, 'point', json.encode({'choose': true})); var featureState = - await mapboxMap.getFeatureState('source', 'custom', 'point'); + await mapboxMap.getFeatureState('source', null, 'point'); var stateMap = json.decode(featureState); expect(stateMap.length, 1); expect(stateMap['choose'], true); - await mapboxMap.removeFeatureState('source', 'custom', 'point', 'choose'); - featureState = await mapboxMap.getFeatureState('source', 'custom', 'point'); + await mapboxMap.removeFeatureState('source', null, 'point', 'choose'); + featureState = await mapboxMap.getFeatureState('source', null, 'point'); stateMap = json.decode(featureState); expect(stateMap.length, 0); }); From 8821688c98b28105229f222819482b5e5547cc69 Mon Sep 17 00:00:00 2001 From: Roman Laitarenko Date: Thu, 6 Nov 2025 15:01:23 +0200 Subject: [PATCH 4/7] change Android test device --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b9dd4254..7f3393c7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -143,7 +143,7 @@ jobs: --app << parameters.workspace-path >>/debug/app-debug.apk \ --test << parameters.workspace-path >>/androidTest/debug/app-debug-androidTest.apk \ --timeout 10m \ - --device model=shiba,version=34,locale=en,orientation=portrait \ + --device model=blazer,version=36,locale=en,orientation=portrait \ --results-dir=result_dir \ --use-orchestrator \ --num-flaky-test-attempts 3 \ From 065f5505eda559fcdffae25e839879a9b11dd009 Mon Sep 17 00:00:00 2001 From: Roman Laitarenko Date: Thu, 6 Nov 2025 18:35:50 +0200 Subject: [PATCH 5/7] fix memory leaks --- .../com/mapbox/maps/mapbox_maps/EventHandler.kt | 5 +++++ .../mapbox/maps/mapbox_maps/MapboxMapController.kt | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/EventHandler.kt b/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/EventHandler.kt index 67454dad..7881a410 100644 --- a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/EventHandler.kt +++ b/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/EventHandler.kt @@ -56,6 +56,11 @@ class MapboxEventHandler( .forEach { subscribeToEvent(it) } } + fun dispose() { + cancellables.forEach { it.cancel() } + cancellables.clear() + } + override fun onMethodCall(methodCall: MethodCall, result: MethodChannel.Result) { if (methodCall.method == "subscribeToEvents" && methodCall.arguments is List<*>) { cancellables.forEach { it.cancel() } diff --git a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxMapController.kt b/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxMapController.kt index b9ed5944..3899fb41 100644 --- a/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxMapController.kt +++ b/android/src/main/kotlin/com/mapbox/maps/mapbox_maps/MapboxMapController.kt @@ -231,8 +231,16 @@ class MapboxMapController( return mapView } + private var onFlutterViewAttachedCalled = false override fun onFlutterViewAttached(flutterView: View) { super.onFlutterViewAttached(flutterView) + + if (onFlutterViewAttachedCalled) { + return + } + + onFlutterViewAttachedCalled = true + val context = flutterView.context val shouldDestroyOnDestroy = when (context is FlutterActivity) { true -> context.shouldDestroyEngineWithHost() @@ -245,6 +253,9 @@ class MapboxMapController( override fun onFlutterViewDetached() { super.onFlutterViewDetached() + + onFlutterViewAttachedCalled = false + lifecycleHelper?.dispose() lifecycleHelper = null mapView?.setViewTreeLifecycleOwner(null) @@ -254,6 +265,8 @@ class MapboxMapController( if (mapView == null) { return } + + eventHandler.dispose() lifecycleHelper?.dispose() lifecycleHelper = null mapView?.setViewTreeLifecycleOwner(null) From 505a3fa789cb2b54fc2fdb39e1e9fc206cd17e88 Mon Sep 17 00:00:00 2001 From: Roman Laitarenko Date: Thu, 6 Nov 2025 22:53:33 +0200 Subject: [PATCH 6/7] Revert "change Android test device" This reverts commit 8821688c98b28105229f222819482b5e5547cc69. --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7f3393c7..b9dd4254 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -143,7 +143,7 @@ jobs: --app << parameters.workspace-path >>/debug/app-debug.apk \ --test << parameters.workspace-path >>/androidTest/debug/app-debug-androidTest.apk \ --timeout 10m \ - --device model=blazer,version=36,locale=en,orientation=portrait \ + --device model=shiba,version=34,locale=en,orientation=portrait \ --results-dir=result_dir \ --use-orchestrator \ --num-flaky-test-attempts 3 \ From 865c22c483ed92742eb0f55ee131707dc35a5a47 Mon Sep 17 00:00:00 2001 From: Roman Laitarenko Date: Thu, 6 Nov 2025 22:55:03 +0200 Subject: [PATCH 7/7] changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45bdb756..49bfad85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Update Maps SDK to v11.17.0-beta.1 * Bump Flutter SDK minimum required version to 3.27.0 and `compileSdk` to 35 on Android. +* Fix memory leaks on Android. ### 2.12.0