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 SDK | Core 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.
UrlDisplayMode.swift
// The value determines how a URL opens when clicked
public enum UrlDisplayMode: String {
// In an external browser, the URL opens in the default browser while the application stays in the background
case externalBrowser
// In an inline browser, the URL opens within the app and it doesn't background the application
case inlineBroswer
}
UIConfiguration.swift
// Set the urlDisplayMode to either externalBrowser or inlineBrowser. The default is inlineBrowser.
// For universal links that direct to another app, set it to externalBrowser.
public init(serviceAPI: URL,
organizationId: String,
developerName: String,
userVerificationRequired: Bool,
conversationId: UUID,
createConversationOnSubmit: Bool,
urlDisplayMode: UrlDisplayMode)