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.
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
Copied to your clipboardstatic 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
Copied to your clipboard@mainstruct 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
Copied to your clipboardstatic 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
Copied to your clipboardButton("Chat") {Concierge.show(surfaces: ["web://example.com/your-surface.html"],title: "Concierge",subtitle: "Powered by Adobe")}
hide
Dismisses the currently presented chat overlay.
Syntax
Copied to your clipboardstatic func hide()
Example
Copied to your clipboardConcierge.hide()
present
Embeds the chat UI as a child view controller into an existing UIViewController. Use this for UIKit-based apps.
Syntax
Copied to your clipboardstatic 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
Copied to your clipboardimport AEPBrandConciergefinal 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
Copied to your clipboardpublic 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
Copied to your clipboardlet theme = ConciergeThemeLoader.load(from: "my-theme", in: .main)?? ConciergeThemeLoader.default()
ConciergeThemeLoader.default
Returns the built-in default ConciergeTheme.
Syntax
Copied to your clipboardpublic static func `default`() -> ConciergeTheme
Example
Copied to your clipboardlet theme = ConciergeThemeLoader.default()
