Configure DOM capture and replay for native iOS applications


You configure DOM-Diff capture for a Native iOS application by modifying the UIC defaultconfiguration.js file.



You can find an example of configuring the Dom Capture in the Sample iOS Application.

Before you begin

Install the UIC library in your native application.

Set the DOM Capture options

Modify the defaultconfiguration.js file and set the DOM Capture options that you want to use.



Enabling DOM Capture has significant implications on data transmission and infrastructure. If enabled, further configuration is required to perform the DOM Capture only based on specific events and elements.

replay: {
    // DOM Capture configuration
    domCapture: {
        enabled: true,
        triggers: [{
            event: "load"



In UI Capture version 5.0.0 and later, DOM Diff is automatically enabled when DOM Capture is enabled.

Indicate pages that use WKWebView in the config file

Modify TealeafLayoutConfig.json to indicate you have a page that uses WKWebView.
The following example indicates that there are two pages - WEWKWebViewController and DoubleWebPageViewController - that use webviews.

    "AutoLayout": {
            "ScreenChange": true,
            "DisplayName": "",
            "CaptureLayoutDelay": 500,
            "ScreenShot": false,
            "NumberOfWebViews": 0,
            "CaptureUserEvents": true,
            "CaptureScreenVisits": false,
            "CaptureLayoutOn": 2,
            "CaptureScreenshotOn": 0
            "DisplayName": "Start",
            "CaptureLayoutDelay": 0
        "WEWKWebViewController": {
            "DisplayName": "WKWebView",
            "NumberOfWebViews": 1
        "DoubleWebPageViewController": {
            "DisplayName": "Multi WKWebView",
            "NumberOfWebViews": 2
    "AppendMapIds": {
        "[w,9290],[v,0]": {
            "mid": "ASimpleUIView"
        "tag2999999": {
            "mid": "giveAdditionalId1"
        "idxPathValue": {
            "mid": "giveAdditionalId2"

Where the following syntax:

  • "WEWKWebViewController" - is the classname of the page with webview.
  • "DisplayName": "WKWebView" - is the display name used for replay. Give a user-friendly name for replay rather than using a classname.
  • "NumberOfWebViews": 1 - is the number of webviews on the page. The library will wait until all webviews load before capturing the page.

Did this page help you?