MBMMapRecorder


@interface MBMMapRecorder : NSObject

MapRecorder provides functions to record and replay API calls of a Map instance. These recordings can be used to debug issues which requie multiple steps to reproduce. Additionaly, playbacks can be used for performance testing custom scenarios.

Note: The file format produced by MapRecorder is experimental and there is no guarantee for version cross-compatibility. The set of recorded APIs and their paramters might change in future releases.

  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (nonnull instancetype)init NS_UNAVAILABLE;
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    + (nonnull instancetype)new NS_UNAVAILABLE;
  • Initializes the map recorder object.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithMap:(nonnull MBMMap *)map;

    Swift

    init(map: MBMMap)

    Parameters

    map

    The map to record.

  • Begins the API call sequence recording.

    Declaration

    Objective-C

    - (void)startRecordingForOptions:(nonnull MBMMapRecorderOptions *)options;

    Swift

    func startRecording(for options: MBMMapRecorderOptions)
  • Stops the current recording session.

    Declaration

    Objective-C

    - (nonnull MBXDataRef *)stopRecording;

    Swift

    func stopRecording() -> MBXDataRef

    Return Value

    a data reference which contains the recorded sequence as a gzip compressed JSON string.

  • Replay a supplied sequence.

    Note! This is an experimental API and behavior might change in future.

    Declaration

    Objective-C

    - (void)replayForContent:(nonnull MBXDataRef *)content
                     options:(nonnull MBMMapPlayerOptions *)options
                    callback:(nonnull MBMPlaybackFinished)callback;

    Swift

    func replay(forContent content: MBXDataRef, options: MBMMapPlayerOptions, callback: @escaping PlaybackFinished)

    Parameters

    content

    A data reference which should contain a replayable sequence as a gzip compressed or plain JSON string.

    options

    Options to customize the behaviour of the playback.

    callback

    Callback to call when the playback ends.

  • Temporarily pauses or resumes playback if already paused.

    Declaration

    Objective-C

    - (void)togglePauseReplay;

    Swift

    func togglePauseReplay()
  • Returns the string description of the current state of playback.

    Declaration

    Objective-C

    - (nonnull NSString *)getPlaybackState;

    Swift

    func getPlaybackState() -> String