github maplibre/maplibre-native ios-v7.0.0

4 hours ago

💥 Breaking changes

  • Raise the minimum supported iOS version to 15.5, remove the filesystem polyfill, and clean up obsolete compatibility code (#4648, #4656).

  • Replace the Mapbox.h umbrella header with MapLibre.h. MapLibre.xcframework no longer ships Mapbox.h (#4731).

    Migration guide

    Swift: no changes needed. Keep using import MapLibre.

    Objective-C: include MapLibre.h instead of Mapbox.h:

    // Before
    #include <Mapbox.h>
    
    // After
    #include <MapLibre.h>

    #import <MapLibre/MapLibre.h> and, with modules enabled, @import MapLibre; also work.

    The MapboxVersionNumber and MapboxVersionString declarations from Mapbox.h were not carried over to MapLibre.h. These symbols were never defined in the binary, so referencing them caused a linker error. To get the SDK version at runtime, read it from the framework bundle:

    NSString *version = [NSBundle bundleForClass:[MLNMapView class]]
                            .infoDictionary[@"CFBundleShortVersionString"];
    let version = Bundle(for: MLNMapView.self)
        .infoDictionary?["CFBundleShortVersionString"] as? String

Plugin API

MapLibre iOS now has an experimental C plugin API for extending MapLibre with native code, defined in plugin_api.h. It currently supports adding custom style layer types. It is only available in the build of MapLibre iOS that is distributed as the separate Swift package maplibre/maplibre-ios-with-plugin-api, whose MapLibre product replaces the standard one. See Plugin API for how to use it (#4612, #4769). The announcement in the newsletter contains some inspiration for plugins.

We welcome ideas for extending the plugin API.

Features

  • Add -[MLNStyle setGlobalStateValue:forProperty:] and MLNStyle.globalState for the global-state expression and the root state property of the style (#4516).
  • Add the interpolate-lab and interpolate-hcl expressions (#4668).
  • Add support for colorizing SDF fill-pattern images with fill-color (#4551).
  • Add rendered feature introspection. With MLNMapOptions.featureInfoEnabled, MLNRenderingStats.frameRenderedFeatures reports the features rendered by each layer and their bounds, and -[MLNMapView renderedFeatureCountForFeatureID:LayerID:SourceID:] counts them (#4460).
  • Include device and simulator debug symbols in the dynamic XCFramework. The separate iOS debug-symbol ZIP is no longer published (#4698).
  • Export MLNBackendResource from the dynamic framework when using the Metal renderer (#4731).
  • Make the set of available images copy-on-write, speeding up styles with many images and frequently updated sources (#4651).
  • Avoid uploading the vertex data of fill layers on every frame (#4765).

Bug fixes

  • Size line-pattern images like MapLibre GL JS. They were drawn about 1.7× bigger and stretched along the line (#4726).
  • Load raster-dem tiles at the rounded zoom level, like raster sources and MapLibre GL JS (#4650).
  • Fix line-gradient being drawn as line-color when combined with line-dasharray (#4725).
  • Fix the lighting of fill-extrusion walls on rotated maps (#4662).
  • Fix the background layer disappearing after style changes (#4616).
  • Fix changes to layer transition options and the style's transition options not being applied (#4677).
  • Fix a crash when an image source lies wholly beyond the latitude limits of the map (#4753).
  • Fix a crash when querying a custom geometry source before its first tile data arrives (#4718).
  • Fix a race condition when releasing unused dynamic textures (#4817).
  • Fix invalidatePack on offline packs completing before the database operation finished and losing its error (#4760).
  • Fix resetting an in-memory offline database deleting a file of the same name (#4720).
  • Fix the cumulative draw call count in Metal rendering statistics (#4719).
  • Use @autoreleasepool blocks on worker threads, so autoreleased objects such as Metal textures are released (#4621).

Don't miss a new maplibre-native release

NewReleases is sending notifications on new releases.