iOS SDK v5 Migration guide

On December 7th, 2022 we released the Mappedin iOS SDK v5. This short migration guide explains the steps needed to migrate from version 4.

  • Mappedin iOS SDK is available from CocoaPods
  • See the API reference for more details

MapView

Labels

Labels have been divided into two individual objects with their own methods.

// Before
mapView.labelAllLocations()
// After
mapView.floatingLabelManager.labelAllLocations()
mapView.flatLabelManager.labelAllLocations()

Removed mapView.labelPolygon() and mapView.removeAllLabels(). Use mapView.floatingLabelManager or mapView.flatLabelManager instead

// Before
mapView.labelPolygon()
// After
mapView.floatingLabelManager.add()
mapView.flatLabelManager.add()
// Before
mapView.removeAllLabels()
// After
mapView.floatingLabelManager.removeAll()
mapView.flatLabelManager.removeAll()

Deprecated methods mapView.drawJourney() and mapView.clearJourney() have been removed.

// Before
mapView.drawJourney()
mapView.clearJourney()
// After
mapView.journeyManager.draw()
mapView.journeyManager.clear()

Camera Controls

  • Removed mapView.cameraControlsManager. Use mapView.cameraManager instead
  • Removed mapView.Focus(), use mapView.CameraManager.FocusOn instead
  • Renamed MPIOptions.FocusPadding to MPIOptions.CameraPadding

BlueDot

Removed deprecated delegate.onBlueDotUpdated event. Use delegate.onBlueDotPositionUpdate and delegate.onBlueDotStateChange to determine the state and position of BlueDot instead. All MPIBlueDot members are available in the MPIBlueDotPositionUpdate event.

// Before
delegate.onBlueDotUpdated(blueDot: MPIBlueDot)
// After
delegate.onBlueDotPositionUpdate(update: MPIBlueDotPositionUpdate)

mapView.enableBlueDot & mapView.disableBlueDot have been removed. use mapView.blueDotManager instead

// Before
mapView.enableBlueDot()
mapView.disableBlueDot()
// After
mapView.blueDotManager.enable()
mapView.blueDotManager.disable()

Data Objects

  • MPINode.map now resolves to a MPIMap instead of string
  • MPIPolygon.map now resolves to a MPIMap instead of string
  • MPILocation.categories now contains an array of MPICategory objects instead of strings
  • Removed MPILocation.color property.
Was this page helpful?