I am creating an app in which there are custom file types such as .xyz file, which is not part of UTType API.
Here are the case problems:
- I want to create a custom UTType with
xyzextension. - While opening file app, only those file should be enable which has extension
.xyz - The file with
xyzextension should show a custom icon on file App.
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
xyztypeidentifier such ascom.app.xyzCFBundleTypeIconFilesStep 2: Define the exported type identifier in info.plist
Add the same identifier that we added while defining document type, i.e.
com.app.xyzdefine your extension
xyz,XYZStep 3: Now while initialising UIDocumentPickerViewController, use the UTtype with identifier you declared in first two steps: