Xamarin file picker file types for IOS

Abinash Patra 41 Reputation points

I have an xamarin app and I am using Essential File Picker for selecting files from library. I am trying to find a way to define doc and docx files for IOS which I am not getting it right. for Android I got it going. Below is the code I have used.

 private List<string> androidAcceptableList = new List<string> { "application/pdf", "image/*" }; //TODO:Read from configuration
            private List<string> iOsAcceptableList = new List<string> {  "application/pdf",
          "image/*"}; //TODO:Read from configuration

    var customFileTypes = new FilePickerFileType(new Dictionary<DevicePlatform, IEnumerable<string>> {
                    { DevicePlatform.iOS,iOsAcceptableList },
                    { DevicePlatform.Android, androidAcceptableList}
var resp = FilePicker.PickAsync(new PickOptions { FileTypes = FileTypesList() });
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,820 questions
No comments
{count} votes

Accepted answer
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 41,821 Reputation points Microsoft Employee


    Welcome to our Microsoft Q&A platform!

    If you used FilePicker to open the file in iOS, actually it used UIDocumentPickerViewController to achieve it like following thread. Doc limitation is "com.microsoft.word.doc","org.openxmlformats.wordprocessingml.document"


    But all documents should present in your iCloud, Files and in Google Drive will be shown if Google Drive is connected in user device. Do you put your doc file in the public files or iCloud.

    If still not work, you can try to create a dependenceService. Wirte native code like this thread:


    Best Regards,

    Leon Lu

    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

0 additional answers

Sort by: Most helpful