From 5f473401d67de6e366ef1b74805ed82c56d9682e Mon Sep 17 00:00:00 2001 From: Code Love Date: Sun, 1 Jun 2025 06:47:51 -0400 Subject: feat(mobile): Add PDF support to share extension (#1494) Enable the mobile app to receive PDF files from other apps via the iOS/Android share sheet. PDFs can now be shared from Files app, email clients, and other apps that support document sharing. - Add PDF UTI (com.adobe.pdf) to iOS share extension activation rules - Add application/pdf to Android intent filters Known limitation: PDFs viewed in Safari cannot be shared directly as Safari shares the PDF URL rather than the file itself. Users can share the URL instead, and Karakeep will fetch the PDF from that URL. Addresses issue #284 for file attachment support --- apps/mobile/app.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps/mobile/app.json') diff --git a/apps/mobile/app.json b/apps/mobile/app.json index 159319d2..6b3ab543 100644 --- a/apps/mobile/app.json +++ b/apps/mobile/app.json @@ -62,9 +62,11 @@ "NSExtensionActivationSupportsWebPageWithMaxCount": 1, "NSExtensionActivationSupportsImageWithMaxCount": 1, "NSExtensionActivationSupportsMovieWithMaxCount": 0, - "NSExtensionActivationSupportsText": true + "NSExtensionActivationSupportsText": true, + "NSExtensionActivationSupportsFileWithMaxCount": 10, + "NSExtensionActivationRule": "SUBQUERY (extensionItems, $extensionItem, SUBQUERY ($extensionItem.attachments, $attachment, SUBQUERY ($attachment.registeredTypeIdentifiers, $uti, $uti UTI-CONFORMS-TO \"com.adobe.pdf\" || $uti UTI-CONFORMS-TO \"public.image\" || $uti UTI-CONFORMS-TO \"public.url\" || $uti UTI-CONFORMS-TO \"public.plain-text\").@count >= 1).@count >= 1).@count >= 1" }, - "androidIntentFilters": ["text/*", "image/*"] + "androidIntentFilters": ["text/*", "image/*", "application/pdf"] } ], "expo-secure-store", -- cgit v1.2.3-70-g09d2