Chat UIKit iOS v2
Chat UIKit iOS
Chat UIKit
Version 2
Sendbird Chat UIKit v2 for iOS is no longer supported as a new version is released. Check out our latest Chat UIKit v3

File sharing

Copy link

File sharing is a feature that allows users to send files such as images, audio files, and videos while chatting in a channel. File sharing appears in the messageInput component of the SBUChannelViewController class.

In UIKit for iOS, there are currently four different types of file messages that users can send: image file, video file, audio file, and document file. These files can be shared with other members in the channel by either directly taking a photo with the camera on a mobile device or uploading an image, video, audio, or document file from the sender’s mobile device.

Note : In order to use the file sharing feature, you must first create a channel and enable the chat service. To learn how to allow users to chat in a channel, refer to Chat in a channel.

Customize the UI for file sharing

Copy link

You can customize the UI for file sharing using SBUMessageCellTheme in the SBUTheme, SBUStringSet, and SBUIconSet.


Copy link

The following table shows customizable theme properties of file sharing.


File message


The background color of the file icon.

File message


The color of the file icon.

File message


The text font of the file message name element.

File message


The text color of the left side of a file message.

File message


The text color of the right side of a file message.

File message


The text color of a file message's placeholder.


Copy link

The following table lists customizable properties of SBUStringSet that can be modified to customize file sharing. The SBUStringSet is a set of strings used to compose the screen. You need to modify the stringSet values in advance if you want to make changes to the screen.

Property nameDescription


A text for file save completion.


A text for file save failure.


A text for file open failure.


Copy link

The following table shows customizable file sharing icons.

Icon nameImageDescription


Add a file.


Select a file to send.


An audio file message.


A document file message.


A GIF, Graphics Interchange Format, file message.


Play a video file message.

Image compression

Copy link

UIKit for iOS allows users to compress images when sending them to other users in the channel on the client app. By reducing the image size, they can send and receive image files faster and minimize data storage and data usage.

The following table lists properties in the SBUGlobals class that are related to image compression. These properties can be customized before you initialize UIKit or create a new channel.




Determines whether to compress the image when sending an image file message. (Default: false)



The value of the compression rate to apply to the image. Acceptable values are 0.0 to 1.0, inclusive. (Default: 0.85)



The value of the size dimensions to apply to the image. (Default: device screen size)

Note: To compress an image without changing the size dimensions, use the imageCompressionRate property. To resize the image, use the imageResizingSize property.

SBUGlobals.UsingImageCompression = true
SBUGlobals.imageCompressionRate = 0.85
SBUGlobals.imageResizingSize = CGSize(width: 480, height: 480)