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.
Use the following guidance to implement this feature.
- Initialize the SDK and create an instance of
SpotImSDKFlowCoordinatoras described in
Add and initialize the OpenWeb iOS SDK and SpotImSDKFlowCoordinator
- Create and set
let articleMetadata = SpotImArticleMetadata(url: "URL TO THE ARTICLE PAGE ON THE WEB", title: "ARTICLE TITLE", subtitle: "ARTICLE SUBTITLE", thumbnailUrl: "URL TO ARTICLE THUMBNAIL IMAGE")
3a. Full conversation can be presented as a modal on top of article ViewController by calling
presentFullConversationViewController on the
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
SpotImLoginDelegateprotocol. 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.
3b. Full conversation can be pushed on top of the host app own navigation controller by calling
pushFullConversationViewController on the
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
SpotImLoginDelegateprotocol. 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.
Updated 10 months ago