I'm having a problem importing a file from the cloud. I'm dealing with a custom filetype that I didn't actually create. So I don't know what the actual extension type is (for example com.example.pdf). The file ends in .toc, so is there a way I can only accept files that end in .toc?

For example something like this:

UIDocumentPickerViewController(documentTypes: [String("*.toc")], in: .import)

If this is not possible, is there a way to allow ANY file to be selected? From there I could just check the last 4 digits and let the user know that the file must end in .toc?

To try and get more information on what type of file this is, I have also ran the following command in terminal:

file -I filename.toc

Which returned:

filename.toc: text/html; charset=us-ascii

Because this says it's a "text/html" file I tried using:

UIDocumentPickerViewController(documentTypes: [String(kUTTypeText)], in: .import)

However, this didn't allow me to select the file... Does anyone have any ideas?