Open full conversation page directly

Show the full conversation screen directly in your iOS app.

📘

BETA API

Please be aware that API adjustments in the upcoming SDK versions may be required to also support loading and showing interstitial ads when transitioning to the full conversation screen.

If you have any beta feedback that you would like to share, please contact us at [email protected].


OpenWeb allows you to open a full conversation screen directly. Prior to this feature, OpenWeb's implementation required a developer to display the Pre-Conversation View Controller. Then, the user would need to tap a button to display the full conversation.


Implementation

Use the following guidance to implement this feature.


  1. Initialize the SDK and create an instance of SpotImSDKFlowCoordinator as described in
    Add and initialize the OpenWeb iOS SDK and SpotImSDKFlowCoordinator

  1. Create and set SpotImArticleMetadata.
let articleMetadata = SpotImArticleMetadata(url: "URL TO THE ARTICLE PAGE                                           ON THE WEB", 
                      title: "ARTICLE TITLE", 
                      subtitle: "ARTICLE SUBTITLE", 
                      thumbnailUrl: "URL TO ARTICLE THUMBNAIL IMAGE")

Present full conversation modally

3a. Full conversation can be presented as a modal on top of article ViewController by calling presentFullConversationViewController on the SpotImSDKFlowCoordinator instance.

self.coordinator.presentFullConversationViewController(
inViewController: self, withPostId: self.postId, 
articleMetadata: self.metadata, selectedCommentId: nil)

📘

Handling SSO flow when presenting full conversation modally

When presenting the full conversation modally, the host app will need to implement presentControllerForSSOFlow(with spotNavController: UIViewController) of the SpotImLoginDelegate protocol. In this flow the host app should present its own login/signup UI on top of the provided spotNavController: UIViewController. Once the login/signup and the SSO flow completed successfully, the host app should dismiss its own login/signup UI.


Push full conversation to the host app navigation controller

3b. Full conversation can be pushed on top of the host app own navigation controller by calling pushFullConversationViewController on the SpotImSDKFlowCoordinator.

self.coordinator.pushFullConversationViewController(
navigationController: self.navigationController!, 
withPostId: self.postId, articleMetadata: self.metadata)

📘

Handling SSO flow when pushing full conversation on the host app navigation controller

When pushing the full conversation, the host app will need to implement startLoginFlow() of the SpotImLoginDelegate protocol. In this flow the host app should push its own login/signup UI presented on top of the host app navigation controller . Once the login/signup and the SSO flow completed successfully, the host app should pop its own login/signup UI.


Did this page help you?