From c0d100665cc2afcad85e4a4aa24257d03ee55127 Mon Sep 17 00:00:00 2001 From: Bradley Mackey Date: Tue, 15 Sep 2026 09:52:00 +0400 Subject: [PATCH] Declare the drag-identifier UTType correctly across bundles UTType(exportedAs:) faults when the calling bundle does not declare the type, and the autofill extension links VaultiOS (its code selector embeds the feed drag rows) with no declaration at all. Switch the shared code to importedAs, repair the malformed export in the main app Info.plist, and add the import declaration to the extension. Co-Authored-By: Claude Fable 5 --- .../VaultiOS/Utilities/VaultItem+Transferable.swift | 6 +++++- VaultApp/VaultApp/Info.plist | 6 +++--- VaultApp/VaultAppAutofill/Info.plist | 13 +++++++++++++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Vault/Sources/VaultiOS/Utilities/VaultItem+Transferable.swift b/Vault/Sources/VaultiOS/Utilities/VaultItem+Transferable.swift index 072dad2ac..a2d4e927c 100644 --- a/Vault/Sources/VaultiOS/Utilities/VaultItem+Transferable.swift +++ b/Vault/Sources/VaultiOS/Utilities/VaultItem+Transferable.swift @@ -66,5 +66,9 @@ extension Identifier: Transferable where T == VaultItem { } extension UTType { - static let vaultIdentifierItemType = UTType(exportedAs: "vault.identifier.drop.id") + /// importedAs, not exportedAs: this code is evaluated in every bundle + /// that links VaultiOS (main app AND the autofill extension), but only + /// the main app exports the type declaration. `exportedAs` raises a + /// runtime fault when the calling bundle does not declare the type. + static let vaultIdentifierItemType = UTType(importedAs: "vault.identifier.drop.id", conformingTo: .data) } diff --git a/VaultApp/VaultApp/Info.plist b/VaultApp/VaultApp/Info.plist index ea09a76a5..7489f3298 100644 --- a/VaultApp/VaultApp/Info.plist +++ b/VaultApp/VaultApp/Info.plist @@ -20,12 +20,12 @@ UTTypeConformsTo - + public.data + UTTypeDescription + Vault item drag identifier UTTypeIdentifier vault.identifier.drop.id - UTTypeTagSpecification - diff --git a/VaultApp/VaultAppAutofill/Info.plist b/VaultApp/VaultAppAutofill/Info.plist index cf3f801af..a9e4bf8ff 100644 --- a/VaultApp/VaultAppAutofill/Info.plist +++ b/VaultApp/VaultAppAutofill/Info.plist @@ -4,6 +4,19 @@ ITSAppUsesNonExemptEncryption + UTImportedTypeDeclarations + + + UTTypeConformsTo + + public.data + + UTTypeDescription + Vault item drag identifier + UTTypeIdentifier + vault.identifier.drop.id + + NSExtension NSExtensionAttributes