Open m1st1ck opened 2 weeks ago
When you initiate a share for a PDF in Safari, it will actually consider 2 input items: the PDF and the URL. To manage this we need a custom NSExtensionActivationRule
. But it's not handle in this plugin yet.
a workaround is to use chrome on iOS to share pdf from the url
you can configure custom activation rule like this on your app.json
:
"plugins": [
[
"expo-share-intent",
{
"iosActivationRules": "SUBQUERY (\nextensionItems,\n$extensionItem,\nSUBQUERY (\n$extensionItem.attachments,\n$attachment,\nANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO \"com.adobe.pdf\"\n|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO \"public.file-url\"\n|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO \"public.url\"\n|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO \"public.jpeg\"\n|| ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO \"public.png\"\n).@count == $extensionItem.attachments.@count\n).@count >= 1",
...
}
],
with this configuration (and some code update), the app appear in sharing view.
but the plugin doesn't handle it in the custom view
Describe the bug In Safari if the web page is a file and we try to share it, our app is not showing as an option. We are able to share images, videos, files, audio from Photos and Files, also regular web pages and selected text. Android works fine and so does iOS chrome.
Here is our plugin config. Maybe we are missing some activation rule, but could not find information.
https://github.com/user-attachments/assets/55b82f24-32b3-416a-b11a-24f84de63db3
To Reproduce
npx create-expo-app StickerSmash --template blank
expo-share-intent
Additional context