UnbluMobileCoBrowsingModuleApi

public protocol UnbluMobileCoBrowsingModuleApi : UnbluModule

This is the api for the mobile co-browsing module. This is only usable if the corresponding module got registered in the used configuration.

  • The delegate for mobile co-browsing related events

    Declaration

    Swift

    var delegate: UnbluMobileCoBrowsingModuleDelegate? { get set }
  • The maximum windowLevel that Unblu will capture during mobile co-browsing. If you have other UIWindows in your application, their level must be lower or equal than maxWindowCapturingLevel to be captured. There are also some prerequisites for capturing defined in the discussion below.

    In order for a UIWindow to be captured by Unblu, it’s windowLevel property must be satisfied by the following criteria:

    • The UIWindow can have a windowLevel of UIWindow.Level.statusBar
    • The UIWindow can have a windowLevel of UIWindow.Level.alert
    • If 1 of the previous 2 points are not satisfied, the UIWindow must have a windowLevel of at most maxWindowCapturingLevel.

    Declaration

    Swift

    var maxWindowCapturingLevel: UIWindow.Level { get set }
  • The UIStatusBarStyle Unblu will use on UIViewController’s during a mobile co-browsing session. This can be configured at runtime, and when the mobile co-browsing module is created using UnbluMobileCoBrowsingModuleConfiguration. The default value is .default.

    Declaration

    Swift

    var preferredStatusBarStyle: UIStatusBarStyle { get set }
  • Checks if mobile co-browsing is active

    Default Implementation

    Declaration

    Swift

    func isMobileCoBrowsingActive(success: @escaping (Bool) -> Void, failure: ((UnbluIsMobileCoBrowsingActiveError) -> Void)?)

    Parameters

    success

    Called with true if mobile co-browsing is active

    failure

    Called if the api is not initialized or the used collaboration server is not of version 5.x newer than 5.17 or newer than 6.3

  • Stops mobile co-browsing

    Default Implementation

    Declaration

    Swift

    func stopMobileCoBrowsing(success: @escaping () -> Void, failure: ((UnbluStopMobileCoBrowsingError) -> Void)?)
  • Adds the view with the given tag to the set of private views.

    Private views are only visible on the mobile device and won’t be transmitted when co-browsing. The views will be covered before they are transmitted and therefore won’t be visible on the agent side.

    Note:

    Do not add to many tags simultaneously, because each private view will need extra performance while capturing the UI. The best practice is to dynamically make views private, when they are displayed in the app UI and remove them from the private view list when they are not visible anymore.

    Multiple calls with the same tag do not have any effect.

    Declaration

    Swift

    func addPrivateView(withTag tag: Int)

    Parameters

    tag

    Tag of the view that should be made private.

  • Removes the view with the given tag from the set of private views.

    Multiple calls with the same tag do not have any effect.

    See: #addPrivateView

    Declaration

    Swift

    func removePrivateView(withTag tag: Int)

    Parameters

    tag

    Tag of the view that should removed from the private views.

  • Adds a private area of the screen that will be obscured during a mobile co-browsing session. If a private area already exists with this id, the current existing one will be updated and returned.

    Declaration

    Swift

    func addPrivateArea(withId id: String, x: CGFloat?, y: CGFloat?, width: CGFloat?, height: CGFloat?) -> UnbluMobileCoBrowsingPrivateArea

    Parameters

    id

    A String id to be assigned to the private area. Use this id to update and remove later on.

    x

    The new absolute x position of the private area on the screen (optional)

    y

    The new absolute y position of the private area on the screen (optional)

    width

    The new width of the private area on the screen (optional)

    height

    The new width of the private area on the screen (optional)

    Return Value

    An instance of UnbluMobileCoBrowsingPrivateArea.

  • Removes a private area with a given id that represents an area of the screen currently obscured during a co browsing session.

    Declaration

    Swift

    func removePrivateArea(withId id: String)

    Parameters

    id

    A String id of a private area to remove.