Mapbox iOS SDK

The Mapbox iOS SDK is an open-source framework for embedding interactive map views with scalable, customizable vector maps into Cocoa Touch applications on iOS 7.0 and above using Objective-C, Swift, or Interface Builder. It takes stylesheets that conform to the Mapbox GL 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 iOS SDK homepage. For detailed usage instructions, read “First steps with the Mapbox iOS SDK” and consult the online examples. A full changelog is also available.

If you have any questions, please contact our support team. We welcome your bug reports and feature requests.

Changes in version 3.3.0

  • Applications linking against the SDK static framework no longer need to add -ObjC to the Other Linker Flags (OTHER_LDFLAGS) build setting. If you previously added this flag solely for this SDK, removing the flag may potentially reduce the overall size of your application. (#4641)
  • Removed the armv7s slice from the SDK to reduce its size. iPhone 5 and iPhone 5c automatically use the armv7 slice instead. (#4641)
  • MGLPointAnnotation and custom MGLAnnotation implementations (but not MGLMultiPoint) can be backed by an MGLAnnotationView instead of an MGLAnnotationImage. MGLAnnotationView is a subclass of UIView, so you can use Core Animation and other familiar technologies with it. To associate an MGLAnnotation with an MGLAnnotationView, implement -mapView:viewForAnnotation: in your MGLMapViewDelegate class. (#4801)
  • The user dot now moves smoothly between user location updates while user location tracking is disabled. (#1582)
  • An MGLAnnotation can be relocated by changing its coordinate property in a KVO-compliant way. An MGLMultiPoint cannot be relocated. (#3835)
  • Setting the image property of an MGLAnnotationImage to nil resets it to the default red pin image and reclaims resources that can be used to customize additional annotations. (#3835)
  • Added methods to MGLMapView for obtaining the underlying map data rendered by the current style, along with additional classes to represent complex geometry in that data. (#5110)
  • An MGLPolygon can now have interior polygons, representing holes knocked out of the overall shape. (#5110)
  • MGLOfflinePackProgress now indicates how many tiles have been downloaded and how much space they take up. (#4874)
  • The compass, user dot, and visible annotations are now accessible to VoiceOver users. (#1496)
  • Fixed an issue (speculatively) where the tile cache could be included in iCloud backups. (#5124)
  • Improved performance viewing regions with large landcover polygons when viewing a style that uses the Mapbox Streets source. (#2444)
  • Fixed a memory leak when using raster resources. (#5141)
  • The SDK is now localizable. No localizations are currently provided, other than English, but if you need a particular localization, you can install the SDK manually and drop a .lproj folder into the framework. (#4783)
  • Fixed an issue preventing KVO change notifications from being generated on MGLMapView’s userTrackingMode key path when -setUserTrackingMode:animated: is called. (#4724)
  • Rendering now occurs on the main thread, fixing a hang when calling -[MGLMapView styleURL] before the map view has fully loaded or while the application is in the background. (#2909)
  • Improved responsiveness when zooming in then immediately panning around. (#4595)
  • Added category methods on NSValue for converting to and from the structure types defined in MGLGeometry.h. (#4802)
  • Added NSFormatter subclasses for converting geographic coordinates and directions into display strings. (#4802)
  • Added a new method, -[MGLMapView cameraThatFitsCoordinateBounds:], to get a camera that you can pass into -setCamera: that fits the given coordinate bounds. (#4790)
  • Added a -reloadStyle: action to MGLMapView to force a reload of the current style. (#4728)
  • A more specific user agent string is now sent with style and tile requests. (#4012)
  • Mapbox Telemetry is automatically disabled while the host application is running in the iOS Simulator. (#4726)
  • Fixed an issue preventing -[MGLMapViewDelegate mapViewDidFinishLoadingMap:] from being called when returning to the view controller containing the map view from another view controller. (#5164)
  • Suppressed “Unable to make space for entry” console spew. (#4708)
  • Removed unused SVG files from the SDK’s resource bundle. (#4641)
  • Deprecated -[MGLMapView emptyMemoryCache]. (#4725)
  • Added MGLCoordinateInCoordinateBounds(), a function that tests whether or not a coordinate is in a given bounds. (#5053)
  • Added a new option to MGLMapDebugMaskOptions, MGLMapDebugWireframesMask, that shows wireframes instead of the usual rendered output. (#4359)