Edit in GitHubLog an issue

ContentCardUIEventListening

A protocol that defines methods for listening to UI events related to content cards.

Protocol Definition

Copied to your clipboard
public protocol ContentCardUIEventListening {
func onDisplay(_ card: ContentCardUI)
func onDismiss(_ card: ContentCardUI)
func onInteract(_ card: ContentCardUI, _ interactionId: String, actionURL: URL?) -> Bool
}

Methods

onDisplay

Called when the content card appears on the screen. Implementation of this method is optional.

Parameters

Syntax

Copied to your clipboard
func onDisplay(_ card: ContentCardUI)

onDismiss

Called when the content card is dismissed. Implementation of this method is optional.

Parameters

Syntax

Copied to your clipboard
func onDismiss(_ card: ContentCardUI)

onInteract

Called when the user interacts with the content card. Implementation of this method is optional.

Parameters

  • card - The ContentCardUI that is interacted with.
  • interactionId - A string identifier for the interaction event.
  • actionURL - The optional URL associated with the interaction.

Returns

A boolean value indicating whether the interaction event was handled. Return true if the client app has handled the actionURL associated with the interaction. Return false if the SDK should handle the actionURL.

Syntax

Copied to your clipboard
func onInteract(_ card: ContentCardUI, _ interactionId: String, actionURL: URL?) -> Bool
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.