ShareLink with custom UT type not opening in my app

Hey all, my first time posting on these forums as I've finally become completely stumped. I'm working to implement a ShareLink to share data between users on my app, and have gotten pretty far (file saves, sends correctly), but am having significant issues getting the link to open in my app when sharing by email and not getting any action at all when tapping a shared link in iMessage. I'll go through my setup below:

I have declared my new UTType, and created my new model which conforms to transferable here:

struct transferTemplate: Codable {
    var id: UUID = UUID()
    var name: String = "TempName"
    var words: [String] = ["word1","word2"]
}

extension transferTemplate: Transferable {
    static var transferRepresentation: some TransferRepresentation {
        CodableRepresentation(contentType: .oltemplate)
    }
}

extension UTType {
    static var oltemplate: UTType { UTType(exportedAs: "com.overloadapp.oltemplate") }
}

I have declared the document type in my info.plist:

<key>CFBundleDocumentTypes</key>
	<array>
		<dict>
			<key>CFBundleTypeName</key>
			<string>Template Session</string>
			<key>LSHandlerRank</key>
			<string>Owner</string>
			<key>LSItemContentTypes</key>
			<array>
				<string>com.overloadapp.oltemplate</string>
			</array>
		</dict>
	</array>

I have declared the Exported Type Identifier:

<key>UTExportedTypeDeclarations</key>
	<array>
		<dict>
			<key>UTTypeConformsTo</key>
			<array>
				<string>public.json</string>
			</array>
			<key>UTTypeDescription</key>
			<string>Template Session</string>
			<key>UTTypeIconFiles</key>
			<array/>
			<key>UTTypeIdentifier</key>
			<string>com.overloadapp.oltemplate</string>
			<key>UTTypeTagSpecification</key>
			<dict>
				<key>public.filename-extension</key>
				<array>
					<string>oltemplate</string>
				</array>
				<key>public.mime-type</key>
				<array>
					<string>application/json</string>
				</array>
			</dict>
		</dict>
	</array>

I've also included the "LSSupportsOpeningDocumentsInPlace" boolean to True in the PLIST.

My physical ShareLink setup is:

@State private var transferred: transferTemplate = transferTemplate(name: "NameTemplate", words: ["One","Two"])
...
ShareLink(item: transferred, preview: SharePreview("Share your template", image: Image("tanLogo")))

Heres where the above code gets you:

  • ShareLink brings up the share sheet and allows you to send the file (with the .oltemplate file extension). Sharing via iMessage will send a file, but within iMessage, the file cannot be opened at all. By email, the file can be opened but does not show any information. If you open the ShareSheet within the email attachment, you can manually choose to open the file in my app. If the file is saved to "Files", it will open my app when it is tapped (work as intended).

Heres what I have tried to fix this:

  • Modifying the Exported File Type "Conforms to" value. Ive used public.data, public.text, public.json.
  • Including and not including the mime type

I've scoured forums trying to solve this issue, and it doesn't seem like there is a clear cut solution for this issue. I appreciate any help you can provide! Please let me know if I can include any more helpful information.

ShareLink with custom UT type not opening in my app
 
 
Q