MapLibre Native

6.5.0

MapLibre Native for iOS distributed via the Swift Package Manager.
maplibre/maplibre-gl-native-distribution

What's New

6.5.0

2024-06-05T18:54:18Z
  • Allow uses to handle authorization for location services (#2453). See MLNMapview.shouldRequestAuthorizationToUseLocationServices.
  • Fixed memory usage high in some cases (#2442).
  • Avoid processing raster tiles after destruction mailbox (#2443).
  • Annotation view recycling re-enabled (#2454). Fixes some issues with Annotations.
  • Increase the deferred cleanup timeout (#2455). Workaround for rare crash.
  • Fixes crash that happened with some PBF files (#795, #2460).
  • Allow using MapLibre Native on iPad Air 2. Note: tests your styles! iPad Air 2 has one of the oldest GPUs that support Metal (#2470).

MapLibre Native for iOS

Requires Xcode 12 Requires Swift 5.3 SPM compatible

Note
This repository only exists for the purpose of binary distribution of MapLibre Native for iOS on the Swift Package Index. Please use the main MapLibre Native repository to report issues or ask for help.

MapLibre Native is a community-led fork derived from mapbox-gl-native before 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 Swift Packages documentation 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 ⇧-⌘-⏎
  • See issue maplibre-gl-native-distribution#8 for screenshots of the MapLibre for Swift Playgrounds in action.

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

  • None
Last updated: Thu Sep 26 2024 17:03:10 GMT-0900 (Hawaii-Aleutian Daylight Time)