Brand Concierge API reference (iOS)
wrap
Wraps a SwiftUI view with the Brand Concierge overlay and optional floating button. Call this once at the app's root to enable the chat overlay across the entire view hierarchy.
data-variant=info
data-slots=text
The
surfaces, title, subtitle, and handleLink parameters on wrap(...) only apply when chat is triggered via the built-in floating button. When chat is triggered via Concierge.show(...) or Concierge.present(on:...), the values passed to those APIs are used instead.Syntax
static func wrap<Content: View>(
_ content: Content,
surfaces: [String] = [],
title: String? = nil,
subtitle: String? = nil,
hideButton: Bool = false,
handleLink: ((URL) -> Bool)? = nil
) -> some View
Parameters
- content required - The SwiftUI content to wrap.
- surfaces - Surface identifiers sent to the Brand Concierge server. Defaults to
[]. - title - Header title text shown at the top of the chat.
- subtitle - Header subtitle text shown at the top of the chat.
- hideButton - When
true, hides the built-in floating button. Defaults tofalse. - handleLink - Optional callback for link routing. Return
trueto claim the URL; returnfalseto let the SDK handle it.
Example
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
Concierge.wrap(
ContentView(),
surfaces: ["web://example.com/your-surface.html"]
)
}
}
}
show
Opens the chat overlay for a new chat session. Requires the view hierarchy to have been wrapped with Concierge.wrap(...) first.
Syntax
static func show(
surfaces: [String],
title: String? = nil,
subtitle: String? = nil,
speechCapturer: SpeechCapturing? = nil,
textSpeaker: TextSpeaking? = nil,
handleLink: ((URL) -> Bool)? = nil
)
Parameters
- surfaces required - Surface identifiers sent to the Brand Concierge server.
- title - Header title text shown at the top of the chat for this session.
- subtitle - Header subtitle text shown at the top of the chat for this session.
- speechCapturer - Custom
SpeechCapturingimplementation. Ifnil, a default is created internally. - textSpeaker - Custom
TextSpeakingimplementation. Ifnil, text-to-speech is disabled. - handleLink - Optional callback for link routing. Return
trueto claim the URL; returnfalseto let the SDK handle it.
Example
Button("Chat") {
Concierge.show(
surfaces: ["web://example.com/your-surface.html"],
title: "Concierge",
subtitle: "Powered by Adobe"
)
}
hide
Dismisses the currently presented chat overlay.
Syntax
static func hide()
Example
Concierge.hide()
present
Embeds the chat UI as a child view controller into an existing UIViewController. Use this for UIKit-based apps.
Syntax
static func present(
on presentingViewController: UIViewController,
surfaces: [String],
title: String? = nil,
subtitle: String? = nil,
speechCapturer: SpeechCapturing? = nil,
textSpeaker: TextSpeaking? = nil,
handleLink: ((URL) -> Bool)? = nil
)
Parameters
- on presentingViewController required - The
UIViewControllerthat will host the chat UI, filling its view. - surfaces required - Surface identifiers sent to the Brand Concierge server.
- title - Header title text shown at the top of the chat for this session.
- subtitle - Header subtitle text shown at the top of the chat for this session.
- speechCapturer - Custom
SpeechCapturingimplementation. Ifnil, a default is created internally. - textSpeaker - Custom
TextSpeakingimplementation. Ifnil, text-to-speech is disabled. - handleLink - Optional callback for link routing. Return
trueto claim the URL; returnfalseto let the SDK handle it.
Example
import AEPBrandConcierge
final class MyViewController: UIViewController {
@objc private func openChat() {
Concierge.present(
on: self,
surfaces: ["web://example.com/your-surface.html"],
title: "Concierge",
subtitle: "Powered by Adobe"
)
}
}
ConciergeThemeLoader.load
Loads a ConciergeTheme from a JSON file in a bundle. Returns nil if the file cannot be found or parsed.
Syntax
public static func load(from filename: String, in bundle: Bundle = .main) -> ConciergeTheme?
Parameters
- filename required - The name of the JSON theme file (without the
.jsonextension). - bundle - The bundle to search for the file. Defaults to
.main.
Example
let theme = ConciergeThemeLoader.load(from: "my-theme", in: .main)
?? ConciergeThemeLoader.default()
ConciergeThemeLoader.default
Returns the built-in default ConciergeTheme.
Syntax
public static func `default`() -> ConciergeTheme
Example
let theme = ConciergeThemeLoader.default()