diff --git a/Apps/Apps.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Apps/Apps.xcworkspace/xcshareddata/swiftpm/Package.resolved index 22c2c892cb42..650bedc993e2 100644 --- a/Apps/Apps.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Apps/Apps.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-common-ios.git", "state" : { - "revision" : "6c8d234c47d3e04c66eaca94f1ff4aff39722f09", - "version" : "24.1.0-beta.2" + "revision" : "660cc68685c4ca551cc2815ab3607d54d906c8a7", + "version" : "24.1.0-rc.1" } }, { @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-core-maps-ios.git", "state" : { - "revision" : "2f478b611291ef60d77a3b89549b2765ab417cce", - "version" : "11.1.0-beta.1" + "revision" : "8b3d2e9bf0886995cd6c05f39f7a5ac4691d0fc9", + "version" : "11.1.0-rc.1" } }, { diff --git a/CHANGELOG.md b/CHANGELOG.md index a1116835654b..702271bcb557 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ Mapbox welcomes participation and contributions from everyone. ## main +## 11.1.0-rc.1 - 04 January, 2024 + +### Bug fixes 🐞 + +* Fix the bug where the annotation could disappear when it is dragged. + ## 11.1.0-beta.1 - 19 December, 2023 ⚠️⚠️⚠️ Known Issues ⚠️⚠️⚠️ diff --git a/LICENSE.md b/LICENSE.md index 9b763e119d99..8c1e74ee15fc 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,9 +1,9 @@ ## License -Mapbox Maps for iOS version 11.1.0-beta.1 +Mapbox Maps for iOS version 11.1.0-rc.1 Mapbox Maps iOS SDK -Copyright © 2021 - 2023 Mapbox, Inc. All rights reserved. +Copyright © 2021 - 2024 Mapbox, Inc. All rights reserved. The software and files in this repository (collectively, “Software”) are licensed under the Mapbox TOS for use only with the relevant Mapbox product(s) listed at www.mapbox.com/pricing. This license allows developers with a current active Mapbox account to use and modify the authorized portions of the Software as needed for use only with the relevant Mapbox product(s) through their Mapbox account in accordance with the Mapbox TOS. This license terminates automatically if a developer no longer has a Mapbox account in good standing or breaches the Mapbox TOS. For the license terms, please see the Mapbox TOS at https://www.mapbox.com/legal/tos/ which incorporates the Mapbox Product Terms at www.mapbox.com/legal/service-terms. If this Software is a SDK, modifications that change or interfere with marked portions of the code related to billing, accounting, or data collection are not authorized and the SDK sends limited de-identified location and usage data which is used in accordance with the Mapbox TOS. [Updated 2023-01] @@ -31,7 +31,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --- -### MapboxCoreMaps,11.1.0-beta.1,Mapbox ToS,Mapbox,https://www.mapbox.com/ +### MapboxCoreMaps,11.1.0-rc.1,Mapbox ToS,Mapbox,https://www.mapbox.com/ ``` Mapbox Core Maps version 10.0 diff --git a/MapboxMaps.podspec b/MapboxMaps.podspec index 9f3c7b608837..3ae25f31e18c 100644 --- a/MapboxMaps.podspec +++ b/MapboxMaps.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |m| - maps_version = '11.1.0-beta.1' + maps_version = '11.1.0-rc.1' m.name = 'MapboxMaps' m.version = maps_version @@ -21,8 +21,8 @@ Pod::Spec.new do |m| m.source_files = 'Sources/MapboxMaps/**/*.{swift,h}' m.resource_bundles = { 'MapboxMapsResources' => ['Sources/**/*.{xcassets,strings}', 'Sources/MapboxMaps/MapboxMaps.json', 'Sources/MapboxMaps/PrivacyInfo.xcprivacy'] } - m.dependency 'MapboxCoreMaps', '11.1.0-beta.1' - m.dependency 'MapboxCommon', '24.1.0-beta.2' + m.dependency 'MapboxCoreMaps', '11.1.0-rc.1' + m.dependency 'MapboxCommon', '24.1.0-rc.1' m.dependency 'Turf', '2.7.0' end diff --git a/Package.resolved b/Package.resolved index b57fae9e8457..c646014d2173 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-common-ios.git", "state" : { - "revision" : "6c8d234c47d3e04c66eaca94f1ff4aff39722f09", - "version" : "24.1.0-beta.2" + "revision" : "660cc68685c4ca551cc2815ab3607d54d906c8a7", + "version" : "24.1.0-rc.1" } }, { @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/mapbox/mapbox-core-maps-ios.git", "state" : { - "revision" : "2f478b611291ef60d77a3b89549b2765ab417cce", - "version" : "11.1.0-beta.1" + "revision" : "8b3d2e9bf0886995cd6c05f39f7a5ac4691d0fc9", + "version" : "11.1.0-rc.1" } }, { diff --git a/Package.swift b/Package.swift index 0af858bf7228..0819b0a052e0 100644 --- a/Package.swift +++ b/Package.swift @@ -3,9 +3,9 @@ import PackageDescription -let coreMaps = MapsDependency.coreMaps(version: "11.1.0-beta.1") +let coreMaps = MapsDependency.coreMaps(version: "11.1.0-rc.1") -let common = MapsDependency.common(version: "24.1.0-beta.2") +let common = MapsDependency.common(version: "24.1.0-rc.1") let mapboxMapsPath: String? = nil @@ -76,7 +76,7 @@ struct MapsDependency { self.registryProjectName = registryProjectName self.registryFileName = registryFileName } - + let name: String let version: String let checksum: String? @@ -125,7 +125,7 @@ struct MapsDependency { } var repositoryURL: String { return "https://github.com/mapbox/\(repositoryName).git" } - + var registryReleaseFolder: String { isSnapshot ? "snapshots" : "releases" } var registryURL: String { diff --git a/Sources/MapboxMaps/Annotations/Generated/CircleAnnotationManager.swift b/Sources/MapboxMaps/Annotations/Generated/CircleAnnotationManager.swift index e69c7f61ee23..219e5a63c86f 100644 --- a/Sources/MapboxMaps/Annotations/Generated/CircleAnnotationManager.swift +++ b/Sources/MapboxMaps/Annotations/Generated/CircleAnnotationManager.swift @@ -315,10 +315,6 @@ public class CircleAnnotationManager: AnnotationManagerInternal { } if let idx = mainAnnotations.lastIndex(where: predicate) { - let annotation = mainAnnotations.remove(at: idx) - draggedAnnotations.append(annotation) - draggedAnnotationIndex = draggedAnnotations.endIndex - 1 - insertDraggedLayerAndSourceOnce { let source = GeoJSONSource(id: dragId) let layer = CircleLayer(id: dragId, source: dragId) @@ -329,6 +325,10 @@ public class CircleAnnotationManager: AnnotationManagerInternal { Log.error(forMessage: "Add drag source/layer \(error)", category: "Annotations") } } + + let annotation = mainAnnotations.remove(at: idx) + draggedAnnotations.append(annotation) + draggedAnnotationIndex = draggedAnnotations.endIndex - 1 return true } return false diff --git a/Sources/MapboxMaps/Annotations/Generated/PointAnnotationManager.swift b/Sources/MapboxMaps/Annotations/Generated/PointAnnotationManager.swift index 3bac53d550ce..178ae2466857 100644 --- a/Sources/MapboxMaps/Annotations/Generated/PointAnnotationManager.swift +++ b/Sources/MapboxMaps/Annotations/Generated/PointAnnotationManager.swift @@ -651,10 +651,6 @@ public class PointAnnotationManager: AnnotationManagerInternal { } if let idx = mainAnnotations.lastIndex(where: predicate) { - let annotation = mainAnnotations.remove(at: idx) - draggedAnnotations.append(annotation) - draggedAnnotationIndex = draggedAnnotations.endIndex - 1 - insertDraggedLayerAndSourceOnce { let source = GeoJSONSource(id: dragId) let layer = SymbolLayer(id: dragId, source: dragId) @@ -665,6 +661,10 @@ public class PointAnnotationManager: AnnotationManagerInternal { Log.error(forMessage: "Add drag source/layer \(error)", category: "Annotations") } } + + let annotation = mainAnnotations.remove(at: idx) + draggedAnnotations.append(annotation) + draggedAnnotationIndex = draggedAnnotations.endIndex - 1 return true } return false diff --git a/Sources/MapboxMaps/Annotations/Generated/PolygonAnnotationManager.swift b/Sources/MapboxMaps/Annotations/Generated/PolygonAnnotationManager.swift index 5acce2fc9f9b..61cd44aa6b18 100644 --- a/Sources/MapboxMaps/Annotations/Generated/PolygonAnnotationManager.swift +++ b/Sources/MapboxMaps/Annotations/Generated/PolygonAnnotationManager.swift @@ -305,10 +305,6 @@ public class PolygonAnnotationManager: AnnotationManagerInternal { } if let idx = mainAnnotations.lastIndex(where: predicate) { - let annotation = mainAnnotations.remove(at: idx) - draggedAnnotations.append(annotation) - draggedAnnotationIndex = draggedAnnotations.endIndex - 1 - insertDraggedLayerAndSourceOnce { let source = GeoJSONSource(id: dragId) let layer = FillLayer(id: dragId, source: dragId) @@ -319,6 +315,10 @@ public class PolygonAnnotationManager: AnnotationManagerInternal { Log.error(forMessage: "Add drag source/layer \(error)", category: "Annotations") } } + + let annotation = mainAnnotations.remove(at: idx) + draggedAnnotations.append(annotation) + draggedAnnotationIndex = draggedAnnotations.endIndex - 1 return true } return false diff --git a/Sources/MapboxMaps/Annotations/Generated/PolylineAnnotationManager.swift b/Sources/MapboxMaps/Annotations/Generated/PolylineAnnotationManager.swift index c02fbbeab68b..95fec32b6a01 100644 --- a/Sources/MapboxMaps/Annotations/Generated/PolylineAnnotationManager.swift +++ b/Sources/MapboxMaps/Annotations/Generated/PolylineAnnotationManager.swift @@ -355,10 +355,6 @@ public class PolylineAnnotationManager: AnnotationManagerInternal { } if let idx = mainAnnotations.lastIndex(where: predicate) { - let annotation = mainAnnotations.remove(at: idx) - draggedAnnotations.append(annotation) - draggedAnnotationIndex = draggedAnnotations.endIndex - 1 - insertDraggedLayerAndSourceOnce { let source = GeoJSONSource(id: dragId) let layer = LineLayer(id: dragId, source: dragId) @@ -369,6 +365,10 @@ public class PolylineAnnotationManager: AnnotationManagerInternal { Log.error(forMessage: "Add drag source/layer \(error)", category: "Annotations") } } + + let annotation = mainAnnotations.remove(at: idx) + draggedAnnotations.append(annotation) + draggedAnnotationIndex = draggedAnnotations.endIndex - 1 return true } return false diff --git a/Sources/MapboxMaps/Info.plist b/Sources/MapboxMaps/Info.plist index c86c70e4d778..068d5b9ae0c9 100644 --- a/Sources/MapboxMaps/Info.plist +++ b/Sources/MapboxMaps/Info.plist @@ -17,6 +17,6 @@ CFBundleShortVersionString 11.1.0 CFBundleVersion - 110 + 111 diff --git a/Sources/MapboxMaps/MapboxMaps.json b/Sources/MapboxMaps/MapboxMaps.json index 982278a263b4..a40f85db05f0 100644 --- a/Sources/MapboxMaps/MapboxMaps.json +++ b/Sources/MapboxMaps/MapboxMaps.json @@ -1,3 +1,3 @@ { - "version" : "11.1.0-beta.1" + "version" : "11.1.0-rc.1" } diff --git a/Tests/MapboxMapsTests/Annotations/Generated/CircleAnnotationManagerTests.swift b/Tests/MapboxMapsTests/Annotations/Generated/CircleAnnotationManagerTests.swift index 75f27d8490fd..d3bd7dbdcaa4 100644 --- a/Tests/MapboxMapsTests/Annotations/Generated/CircleAnnotationManagerTests.swift +++ b/Tests/MapboxMapsTests/Annotations/Generated/CircleAnnotationManagerTests.swift @@ -714,6 +714,11 @@ final class CircleAnnotationManagerTests: XCTestCase, AnnotationInteractionDeleg XCTAssertEqual(addLayerParameters.layerPosition, .above(manager.id)) XCTAssertEqual(addedLayer.id, manager.id + "_drag") + XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.count, 0) + $displayLink.send() + XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.count, 1) + XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.last?.parameters.id, "\(manager.id)_drag") + _ = manager.handleDragBegin(with: "circle1", context: .zero) XCTAssertEqual(style.addSourceStub.invocations.count, 1) diff --git a/Tests/MapboxMapsTests/Annotations/Generated/PointAnnotationManagerTests.swift b/Tests/MapboxMapsTests/Annotations/Generated/PointAnnotationManagerTests.swift index a0d0dd72a565..840ab80b0c0d 100644 --- a/Tests/MapboxMapsTests/Annotations/Generated/PointAnnotationManagerTests.swift +++ b/Tests/MapboxMapsTests/Annotations/Generated/PointAnnotationManagerTests.swift @@ -3306,6 +3306,11 @@ final class PointAnnotationManagerTests: XCTestCase, AnnotationInteractionDelega XCTAssertEqual(addLayerParameters.layerPosition, .above(manager.id)) XCTAssertEqual(addedLayer.id, manager.id + "_drag") + XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.count, 0) + $displayLink.send() + XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.count, 1) + XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.last?.parameters.id, "\(manager.id)_drag") + _ = manager.handleDragBegin(with: "point1", context: .zero) XCTAssertEqual(style.addSourceStub.invocations.count, 1) diff --git a/Tests/MapboxMapsTests/Annotations/Generated/PolygonAnnotationManagerTests.swift b/Tests/MapboxMapsTests/Annotations/Generated/PolygonAnnotationManagerTests.swift index 858c459a7a4e..852c9ffeffa9 100644 --- a/Tests/MapboxMapsTests/Annotations/Generated/PolygonAnnotationManagerTests.swift +++ b/Tests/MapboxMapsTests/Annotations/Generated/PolygonAnnotationManagerTests.swift @@ -721,6 +721,11 @@ final class PolygonAnnotationManagerTests: XCTestCase, AnnotationInteractionDele XCTAssertEqual(addLayerParameters.layerPosition, .above(manager.id)) XCTAssertEqual(addedLayer.id, manager.id + "_drag") + XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.count, 0) + $displayLink.send() + XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.count, 1) + XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.last?.parameters.id, "\(manager.id)_drag") + _ = manager.handleDragBegin(with: "polygon1", context: .zero) XCTAssertEqual(style.addSourceStub.invocations.count, 1) diff --git a/Tests/MapboxMapsTests/Annotations/Generated/PolylineAnnotationManagerTests.swift b/Tests/MapboxMapsTests/Annotations/Generated/PolylineAnnotationManagerTests.swift index f26e95becf9e..af5a961cf6d0 100644 --- a/Tests/MapboxMapsTests/Annotations/Generated/PolylineAnnotationManagerTests.swift +++ b/Tests/MapboxMapsTests/Annotations/Generated/PolylineAnnotationManagerTests.swift @@ -1040,6 +1040,11 @@ final class PolylineAnnotationManagerTests: XCTestCase, AnnotationInteractionDel XCTAssertEqual(addLayerParameters.layerPosition, .above(manager.id)) XCTAssertEqual(addedLayer.id, manager.id + "_drag") + XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.count, 0) + $displayLink.send() + XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.count, 1) + XCTAssertEqual(style.updateGeoJSONSourceStub.invocations.last?.parameters.id, "\(manager.id)_drag") + _ = manager.handleDragBegin(with: "polyline1", context: .zero) XCTAssertEqual(style.addSourceStub.invocations.count, 1) diff --git a/scripts/doc-generation/restrict-top-sections.py b/scripts/doc-generation/restrict-top-sections.py new file mode 100755 index 000000000000..908ecc38f1af --- /dev/null +++ b/scripts/doc-generation/restrict-top-sections.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python3 + +# Load the JSON file +import argparse +import json + +acceptedTopSectionTitles = ['Essentials', 'Style', 'Annotations', 'Advanced', 'Other', 'Dependencies', 'Internal', 'Extended Modules'] + +def main(): + parser = argparse.ArgumentParser(description='Check DocC top sections for unexpected items.') + parser.add_argument('--docc', required=True, + type=str, help='Path to doccarchive folder') + + args = parser.parse_args() + + root_file_path = f"{args.docc}/data/documentation/mapboxmaps.json" + print(f"Checking DocC top sections for unexpected items in {args.docc}") + + with open(root_file_path) as f: + root = json.load(f) + + sectionTitles = list(map(lambda section: section['title'], root['topicSections'])) + + unexpectedTitles = list(filter(lambda title: title not in acceptedTopSectionTitles, sectionTitles)) + + if len(unexpectedTitles) > 0: + print(f"Unexpected section titles found: {unexpectedTitles}") + exit(1) + else: + print("Check passed.") + +main() diff --git a/scripts/release/packager/versions.json b/scripts/release/packager/versions.json index dad2e1234170..5d129fe3173f 100644 --- a/scripts/release/packager/versions.json +++ b/scripts/release/packager/versions.json @@ -1,5 +1,5 @@ { - "MapboxCoreMaps": "11.1.0-beta.1", - "MapboxCommon": "24.1.0-beta.2", + "MapboxCoreMaps": "11.1.0-rc.1", + "MapboxCommon": "24.1.0-rc.1", "Turf": "2.7.0" } diff --git a/scripts/release/sync_deps_versions.sh b/scripts/release/sync_deps_versions.sh index 3f766e4d8d55..dbf3592033e9 100755 --- a/scripts/release/sync_deps_versions.sh +++ b/scripts/release/sync_deps_versions.sh @@ -20,8 +20,8 @@ sed -i '' -E "s/(m.dependency.*MapboxCoreMaps.*, ).*/\1'$CORE_MAPS_VERSION'/" Ma sed -i '' -E "s/(m.dependency.*MapboxCommon.*, ).*/\1'$COMMON_VERSION'/" MapboxMaps.podspec info "Update dependencies in Package.swift" -sed -i '' -E "s/(.*MapboxCoreMaps.*exact).*/\1\(\"$CORE_MAPS_VERSION\"\)\),/" Package.swift -sed -i '' -E "s/(.*MapboxCommon.*exact).*/\1\(\"$COMMON_VERSION\"\)\),/" Package.swift +sed -i '' -E "s/(.*MapsDependency.coreMaps.*):.*/\1: \"$CORE_MAPS_VERSION\"\)/" Package.swift +sed -i '' -E "s/(.*MapsDependency.common.*):.*/\1: \"$COMMON_VERSION\"\)/" Package.swift info "Resolve SPM dependencies" swift package update