Swiftpack.co -  maplibre/maplibre-gl-native-distribution as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
maplibre/maplibre-gl-native-distribution
An open-source fork of Mapbox GL SDK for iOS distributed via the Swift Package Manager.
.package(url: "https://github.com/maplibre/maplibre-gl-native-distribution.git", from: "5.13.0-pre.1")

MapLibre GL Native SDK for iOS

Requires Xcode 12 Requires Swift 5.3 SPM compatible

MapLibre GL Native is a community led fork derived from mapbox-gl-native prior to their switch to a non-OSS license. The fork also includes Maps SDK for iOS and macOS (forked from mapbox-gl-native-ios) and Android SDK (forked from mapbox-gl-native-android).


Add MapLibre to your Project

To add a package dependency to your Xcode project, select File > Swift Packages > Add Package Dependency and enter its repository URL. See Adding Package Dependencies to Your App.

Swift Packages Development

You can override the MapLibre package dependency and edit its content by adding it as a local package. See Editing a Package Dependency as a Local Package.

For example, you can add this to Package.swift, if you are interested in testing the Mapbox framework with another framework.

products: [
    .library( name: "Mapbox", targets: ["Mapbox"]),
    .library( name: "MetalANGLE", targets: ["MetalANGLE"])
],
dependencies: [ ],
// target path should be relative to package root
targets: [
    .binaryTarget(name: "Mapbox", path: "Mapbox.xcframework"),
    .binaryTarget(name: "MetalANGLE", path: "MetalANGLE.xcframework")
]

Other References from developer.apple.com

Test MapLibre with a Swift Playgrounds

When you download this repo there is a Swift Playground that allows you to change the style and play around with a very simple rendered map.

  • Download this repo
  • Navigate to the folder where you cloned, and open Package.swift in at least Xcode 12.
  • Run Playground by choosing Editor > Run Playground or ⇧⌘⏎

GitHub

link
Stars: 18
Last commit: 4 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

Version 5.13.0-pre.1
4 weeks ago

Warning: unstable release for test purposes only.

Bug Fixes

  • Displaying view annotations #98
  • Not render MapView if frame is empty #67

Known Issues

  • Failed tests:
    • MGLDocumentationExampleTests testMGLMapSnapshotter
    • MGLMapSnapshotterTests testOverlayHandler
    • MGLMapSnapshotterTests testDelegate
    • MGLMapSnapshotterTests testRuntimeStyling
    • MGLMapSnapshotterTests testLocalGlyphRendering

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API