From 189f9a6186658ba05d383805fbe2fe83f856db4c Mon Sep 17 00:00:00 2001 From: Pravin Prakash Kumar Date: Fri, 1 Nov 2024 11:10:06 -0700 Subject: [PATCH] update doc --- .../iOS/public-classes/contentcarduieventlistening.md | 6 ++++++ .../iOS/tutorial/customizing-content-card-templates.md | 4 ++-- .../iOS/tutorial/listening-content-card-events.md | 10 ++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/iOS/public-classes/contentcarduieventlistening.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/iOS/public-classes/contentcarduieventlistening.md index 886e3d0c7b..ce552d153f 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/iOS/public-classes/contentcarduieventlistening.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/iOS/public-classes/contentcarduieventlistening.md @@ -39,6 +39,8 @@ Called when the content card appears on the screen. Implementation of this metho - _card_ - The [ContentCardUI](./contentcardui.md) that is displayed. +#### Syntax + #### Swift @@ -55,6 +57,8 @@ Called when the content card is dismissed. Implementation of this method is opti - _card_ - The [ContentCardUI](./contentcardui.md) that is dismissed. +#### Syntax + #### Swift @@ -77,6 +81,8 @@ Called when the user interacts with the content card. Implementation of this met 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 + #### Swift diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/iOS/tutorial/customizing-content-card-templates.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/iOS/tutorial/customizing-content-card-templates.md index b7a53efa6c..29d79caeab 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/iOS/tutorial/customizing-content-card-templates.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/iOS/tutorial/customizing-content-card-templates.md @@ -29,8 +29,8 @@ Messaging extension provides a way to customize content cards based on the templ Perform the following steps to customize content card templates: -1. Conform to the [ContentCardCustomizing](../public-classes/contentcardcustomizing.md) protocol in your class or struct. -2. Implement the desired methods of the [ContentCardCustomizing](../public-classes/contentcardcustomizing.md) protocol. +1. Conform to the ContentCardCustomizing protocol in your class or struct. +2. Implement the desired methods of the ContentCardCustomizing protocol. Below is an example implementation of `ContentCardCustomizing`. In this example, the `HomePageCardCustomizer` class conforms to the `ContentCardCustomizing` protocol and customizes the `SmallImageTemplate` content card template: diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/iOS/tutorial/listening-content-card-events.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/iOS/tutorial/listening-content-card-events.md index 75f57bce72..c5ecf5f488 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/iOS/tutorial/listening-content-card-events.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/iOS/tutorial/listening-content-card-events.md @@ -83,7 +83,11 @@ struct HomePage: View, ContentCardUIEventListening { ## Handling actionable URLs -The `onInteract` method provides an optional `actionURL` parameter associated with the interaction event. To handle this URL in your application, return true from the `onInteract` method: +The `onInteract` method provides an optional `actionURL` parameter associated with the interaction event. The return value of this method determines how the URL is handled. + +- Return `true` if your application has successfully handled the URL. This indicates to the SDK that no further action is needed. + +- Return `false` to allow the SDK to process the URL. @@ -93,7 +97,9 @@ The `onInteract` method provides an optional `actionURL` parameter associated wi func onInteract(_ card: ContentCardUI, _ interactionId: String, actionURL: URL?) -> Bool { guard let url = actionURL else { return false } - // Handle the actionable URL in your application + // Your application handles the actionable URL here + + // Return true to indicate that the SDK need not process the URL return true } ```