URL Display Mode for iOS

The URL Display Mode in the UIConfiguration object determines how a link opens when clicked by a user. You can set the SDK to open the links in an external browser (Safari) or in a browser within the app (SFSafariViewController).

This article applies to the following implementations:

UI SDKCore SDK

To open links in an external browser (Safari), set urlDisplayMode to externalBrowser. To open links in a browser within the app (SFSafariViewController), set urlDisplayMode to inlineBrowser.

Set the URL display mode
1UrlDisplayMode.swift
2
3// The value determines how a URL opens when clicked
4public enum UrlDisplayMode: String {
5
6    // In an external browser, the URL opens in the default browser while the application stays in the background
7    case externalBrowser
8
9    // In an inline browser, the URL opens within the app and it doesn't background the application
10    case inlineBroswer
11}
Set the preferred way to open a link
1UIConfiguration.swift
2
3// Set the urlDisplayMode to either externalBrowser or inlineBrowser. The default is inlineBrowser.
4// For universal links that direct to another app, set it to externalBrowser.
5public init(serviceAPI: URL,
6            organizationId: String,
7            developerName: String,
8            userVerificationRequired: Bool,
9            conversationId: UUID,
10            createConversationOnSubmit: Bool,
11            urlDisplayMode: UrlDisplayMode)