For my iOS 16.x app, I define a custom UTI following in my Info.plist.
It isn't performing as expected. For example, I tap file links or attachments that have the new extension, but I am simply shown a view of the (simple JSON) contents.
Strangely, when I drag a file that has that .custom extension as an attachment into a Messages thread on the Mac, it recognizes it as a type of App Name Document (the Mac seems to properly associate it with my iOS app that I'm building in Xcode on that Mac and running on a real iPhone).
But no matter where I click or tap and hold, in Files app, in Messages, in E-Mail, on http://iCloud.com browsing iCloud drive, it doesn't show me an option to open my app it just displays the contents (simple JSON).
I've implemented the open url delegate method in AppDelegate.swift and the corresponding one in SceneDelegate.swift.
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeIdentifier</key>
<string>llc.company.App-Name-document</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.json</string>
</array>
<key>UTTypeDescription</key>
<string>App Name Document</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>custom</string>
</array>
</dict>
</dict>
</array>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>App Name Document</string>
<key>LSItemContentTypes</key>
<array>
<string>llc.company.App-Name-document</string>
</array>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>