UnbluCoBrowsingModuleApi
public protocol UnbluCoBrowsingModuleApi
This is the api for the co-browsing module. This is only usable if the corresponding module got registered in the used configuration.
-
isMobileCoBrowsingActive(success:
Default implementationfailure: ) Checks if mobile co-browsing is active
Default Implementation
Declaration
Swift
func isMobileCoBrowsingActive(success: @escaping (Bool) -> Void, failure: ((UnbluApiIsMobileCoBrowsingActiveError) -> 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
-
stopMobileCoBrowsing(success:
Default implementationfailure: ) Stops mobile co-browsing
Default Implementation
Declaration
Swift
func stopMobileCoBrowsing(success: @escaping () -> Void, failure: ((UnbluApiStopMobileCoBrowsingError) -> 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 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?) -> UnbluCoBrowsingPrivateArea
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
UnbluCoBrowsingPrivateArea
. -
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.