Mapbox Maps SDK for iOS
The Mapbox Maps SDK for iOS is an open-source framework for embedding interactive map views with scalable, customizable vector maps into Cocoa Touch applications on iOS 9.0 and above using Objective-C, Swift, or Interface Builder. It takes stylesheets that conform to the Mapbox Style Specification, applies them to vector tiles that conform to the Mapbox Vector Tile Specification, and renders them using OpenGL.
For setup information, check out the Mapbox Maps SDK for iOS homepage. For detailed usage instructions, read “First steps with the Mapbox Maps SDK for iOS” and consult the online examples.
If you have any questions, please see our help page. We welcome your bug reports, feature requests, and contributions.
Changes in version 4.7.0
Packaging
- Added the
Mapbox-iOS-SDK-stripped
build flavor, featuring fewer debug symbols. Regular framework binaries are no longer stripped of debug symbols and theMapbox-iOS-SDK-symbols
build has been retired. (#13504) - This SDK’s dynamic framework now has a bundle identifier of
com.mapbox.Mapbox
. (#12857)
Styles and rendering
- Fixed an issue where the
{prefix}
token in tile URL templates was evaluated incorrectly when requesting a source’s tiles. (#13429) - Added an
-[MGLStyle removeSource:error:]
method that returns a descriptive error if the style fails to remove the source, whereas-[MGLStyle removeSource:]
fails silently. (#13399) - Added the
MGLFillExtrusionStyleLayer.fillExtrusionHasVerticalGradient
property. (#13463) - Added support for setting
MGLCollisionBehaviorPre4_0
inNSUserDefaults
. (#13426) -[MGLStyle localizeLabelsIntoLocale:]
and-[NSExpression(MGLAdditions) mgl_expressionLocalizedIntoLocale:]
can automatically localize styles that use version 8 of the Mapbox Streets source. (#13481)- Fixed symbol flickering during instantaneous transitions. (#13535)
MGLMapView
,MGLShapeOfflineRegion
, andMGLTilePyramidOfflineRegion
now default to version 11 of the Mapbox Streets style. Similarly, several class properties ofMGLStyle
, such asMGLStyle.lightStyleURL
, have been updated to return URLs to new versions of their respective styles.
Map snapshots
MGLMapSnapshotter
now respects theMGLIdeographicFontFamilyName
key in Info.plist, which reduces bandwidth consumption when snapshotting regions that contain Chinese or Japanese characters. (#13427)- Fixed a sporadic crash when using
MGLMapSnapshotter
. (#13300)
Other changes
- Modified the behavior of the map view so that programmatic camera transitions can no longer be interrupted by user interaction when
MGLMapView.zoomEnabled
,MGLMapView.rotateEnabled
,MGLMapView.scrollEnabled
, andMGLMapView.pitchEnabled
are set to false. (#13362) - Renamed
-[MGLOfflineStorage putResourceWithUrl:data:modified:expires:etag:mustRevalidate:]
to-[MGLOfflineStorage preloadData:forURL:modificationDate:expirationDate:eTag:mustRevalidate:]
. (#13318) - Added
MGLLoggingConfiguration
andMGLLoggingBlockHandler
that handle error and fault events produced by the SDK. (#13235) - Fixed random crashes during app termination. (#13367)
- Fixed a crash when specifying
MGLShapeSourceOptionLineDistanceMetrics
when creating anMGLShapeSource
. (#13543)
Recent changes
See the full changelog for previous releases.