1. Implement the VFLoginDelegate. This delegate will be called when the user tries to interact with the container in a way that needs authentication. For example: Liking a comment or trying to create their own comment.
    Your app should present your authentication flow and authenticate with Viafoura SDK Authenticate your users
extension ArticleViewController: VFLoginDelegate {
    func startLogin() {
      	// Launch your custom login/signup flow
  1. Create your VFArticleMetadata object.
let articleMetadata = VFArticleMetadata(
  url: "",
  title: "So you got New Engagement Tools, Now What?",
  subtitle: "What better way to grow a community than with on-site engagement tools?",
  thumbnailUrl: "")
urlURL StringURL of the content
titleStringTitle of the content
subtitleStringSubtitle of the content
thumbnailUrlURL StringContent thumbnail URL
  1. Create your VFSettings object.
    For customization options, refer to Use custom colors and fonts
let colors = VFColors(colorPrimary: .green, colorPrimaryLight: .systemGreen)
let settings = VFSettings(colors: colors)
  1. Create the chat view controller.
let vc =
  containerId: "containerId",
  articleMetadata: metadata,
  loginDelegate: self,
  settings: settings
  1. Add the chat view to your view controller. Make sure you have created a container view to add the conversation VC into.


preCommentsViewController.view.frame = CGRect(x: 0, y: 0, width: yourCommentsContainerView.frame.width, height: preCommentsViewController.view.frame.height)   
preCommentsViewController.willMove(toParent: self)
preCommentsViewController.didMove(toParent: self)