You should have mentioned the solutions you tried and it did not work for you.
By the way, there are few steps that you can follow:
Step 1. Create your document type in info.plist
- Give the name of your file type such as
xyz
- Define the
type
identifier such as com.app.xyz
- Define the file icon against the key
CFBundleTypeIconFiles

Step 2: Define the exported type identifier in info.plist
Add the same identifier that we added while defining document type, i.e. com.app.xyz
define your extension xyz
, XYZ

Step 3: Now while initialising UIDocumentPickerViewController, use the UTtype with identifier you declared in first two steps:
let xyzUTType = UTType("com.app.xyz")
let documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: [xyzUTType], asCopy: true)