Supported file types

Hello, due to the design of our app, we need to replace default file picker of sendbird ui kit.
What we want to know is what type of files are supported by sendbird when using iOS DocumentPicker, as the DocumentPicker requires to explicitly specifiy types of files.

Thanks,
Sergiu Losetchi

Hi @sergiu.ncy SendbirdUIKit use “public.content” as document types for DocumentPickerViewController.

if type == .document {
    let documentPicker = UIDocumentPickerViewController(
        documentTypes: ["public.content"],
        in: UIDocumentPickerMode.import
    )
    documentPicker.delegate = self
    documentPicker.modalPresentationStyle = .formSheet
    self.present(documentPicker, animated: true, completion: nil)
}

if you would like to replace the behavior, you can override

open func messageInputView(_ messageInputView: SBUMessageInputView, didSelectResource type: MediaResourceType)

and implement own logic for .document

1 Like

Thanks, that’s what I needed!