0

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",
          "application/msword",
          "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
          "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() });

`

Abi P
  • 1,410
  • 3
  • 22
  • 36
  • "com.microsoft.word.doc","org.openxmlformats.wordprocessingml.document". – Abi P Apr 20 '21 at 15:57
  • https://stackoverflow.com/questions/47865646/how-to-open-the-document-files-e-g-pdf-doc-docx-in-ios-mobile-when-a-button – Abi P Apr 20 '21 at 15:57

1 Answers1

0

How to open the Document files e.g(.pdf,.doc,.docx) in ios mobile when a button action using swift3.0?

"com.microsoft.word.doc","org.openxmlformats.wordprocessingml.document" for Doc and Docx respectively,

Abi P
  • 1,410
  • 3
  • 22
  • 36