Skip to main content

Pre-built Chat Screen

Introduction to Chat in Dyte Meetings

In Dyte meetings, participants can also engage in real-time communication by sending chat messages. These messages can be text, images, or files, depending on the chat permissions set in their preset.

Dyte's Prebuilt Chat Screen

Dyte's iOS UiKit includes prebuilt Chat screen that handle the complete chat logic and offer a range of features to enhance the chat experience in Dyte meetings:

  • Display Messages: Displays all chat messages, including text, images, and files, in a clear and organized manner
  • Image Preview: Allows users to tap on an image message to view it in full screen
  • File Download: Enables users to download files sent in chat messages with a simple tap
  • Message Composer: Provides a user-friendly interface for composing messages, supporting text, image, and file messages. It automatically adjusts the UI based on the user's chat permissions, hiding or disabling options that are not permitted
  • Auto-Scroll: Auto-scrolls to new messages as they are received but stops auto-scrolling if the user has scrolled up to read an old message
  • Device Permissions: Handles device permissions elegantly on all supported Android versions for sending images, files, and downloading files to the device. This saves developers effort, allowing them to focus on building their apps

Topics:

Creating a chat screen.

 let chatView = ChatViewController(dyteMobileClient: self.meeting)

Add this chatView to your View hierarchy. In case you need to add this to a ViewController you can add it inside a view of sub ViewController, following example shows how to show chat screen on tap of button.

private var splitContentViewController: UIViewController?
private let splitContentBaseView = UIView()

func chatClick(button: DyteControlBarButton) {
if button.isSelected {
let controller = ChatViewController(dyteMobileClient: self.meeting)
self.splitContentBaseView.addSubview(controller.view)
controller.view.set(.fillSuperView(self.splitContentBaseView))
self.splitContentViewController = controller
}
}

Parameters:

meeting: Current ongoing meeting object.