Skip to content

Commit aed2ce9

Browse files
evil159github-actions[bot]
authored andcommitted
Add swift_compat Map binding (#2900)
This PR: * [bindgen] Adds support for importing types marked as `internal` for `swift_compat` generator * [gl-native] Marks `Map` type as internal for `swift_compat` + adds a nongenerated `swift_compat`-compatible binding for `Map` type. * This is done in order to enable using it from `swift_compat` bindings in other modules * [maps-ios] Makes the underlying `Map` instance available externally under `@_spi(Internal)` cc @mapbox/core-sdk cc @mapbox/gl-native cc @mapbox/maps-ios cc @mapbox/sdk-ci GitOrigin-RevId: 9a1b28881257b3857657f85cbb607b1b08c92833
1 parent 6768cad commit aed2ce9

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

MapboxMaps.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ Pod::Spec.new do |m|
2121
m.source_files = 'Sources/MapboxMaps/**/*.{swift,h}'
2222
m.resource_bundles = { 'MapboxMapsResources' => ['Sources/MapboxMaps/**/*.{xcassets,strings}', 'Sources/MapboxMaps/MapboxMaps.json', 'Sources/MapboxMaps/PrivacyInfo.xcprivacy'] }
2323

24-
m.dependency 'MapboxCoreMaps', '11.11.0-SNAPSHOT-03-27--04-29.git-a0e6128'
25-
m.dependency 'MapboxCommon', '24.11.0-SNAPSHOT-03-27--04-29.git-a0e6128'
24+
m.dependency 'MapboxCoreMaps', '11.11.0-SNAPSHOT-03-21--09-47.git-8a42e6a'
25+
m.dependency 'MapboxCommon', '24.11.0-SNAPSHOT-03-21--09-47.git-8a42e6a'
2626
m.dependency 'Turf', '4.0.0'
2727

2828
end

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import PackageDescription
55
import Foundation
66

7-
let coreMaps = MapsDependency.coreMaps(version: "11.11.0-SNAPSHOT-03-27--04-29.git-a0e6128", checksum: "00fe6b6b5fa99919003a8a1988395e3083b1f56ad4141f4baa93b9f9e27deb1a")
7+
let coreMaps = MapsDependency.coreMaps(version: "11.11.0-SNAPSHOT-03-21--09-47.git-8a42e6a", checksum: "268a2d19cc674193537a29cfafa5e1cea9ccf30d54724650158d1afa73e3a30a")
88

9-
let common = MapsDependency.common(version: "24.11.0-SNAPSHOT-03-27--04-29.git-a0e6128", checksum: "9e6a4bfafba1031b99bf948acb731d7251181b824c1860032f07e9133e5149c2")
9+
let common = MapsDependency.common(version: "24.11.0-SNAPSHOT-03-21--09-47.git-8a42e6a", checksum: "878a09721d48e5a55dfbde15420953e5f71721877e419c56ae59728943bdd107")
1010

1111
let mapboxMapsPath: String? = nil
1212

Sources/MapboxMaps/Foundation/MapboxMap.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// swiftlint:disable file_length
22
import UIKit
3-
import MapboxCoreMaps
3+
@_spi(Internal) @_spi(Marshalling) import MapboxCoreMaps
44
@_implementationOnly import MapboxCommon_Private
55
import Turf
66

@@ -196,6 +196,9 @@ public final class MapboxMap: StyleManager {
196196
/// Triggered when map is loaded for the first time, and camera is initialized with default style camera options.
197197
var isDefaultCameraInitialized: Signal<Bool> { _isDefaultCameraInitialized.signal.skipRepeats() }
198198

199+
@_spi(Internal)
200+
public lazy var map: MapboxCoreMaps.Map = .Marshaller.toSwift(__map)
201+
199202
deinit {
200203
__map.destroyRenderer()
201204
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"MapboxCoreMaps": "11.11.0-SNAPSHOT-03-27--04-29.git-a0e6128",
3-
"MapboxCommon": "24.11.0-SNAPSHOT-03-27--04-29.git-a0e6128",
2+
"MapboxCoreMaps": "11.11.0-SNAPSHOT-03-21--09-47.git-8a42e6a",
3+
"MapboxCommon": "24.11.0-SNAPSHOT-03-21--09-47.git-8a42e6a",
44
"Turf": "4.0.0"
55
}

0 commit comments

Comments
 (0)