expo-share-intent icon indicating copy to clipboard operation
expo-share-intent copied to clipboard

[BUG] iOS - Does not work in Chrome

Open jaaywags opened this issue 9 months ago • 2 comments

📋 Describe the bug I am trying to get this to work in iOS on Chrome browsers but cannot figure it out. It works in safari just fine and on Android just fine.

I tried the normal setup without really skewing at all. I tried clean prebuilds and restarting my device but nothing is working.

My app.json plugin section looks like this

    "plugins": [
      [
        "expo-share-intent",
        {
          "iosActivationRules": {
            "NSExtensionActivationSupportsWebURLWithMaxCount": 1
          },
          "androidIntentFilters": [
            "text/*"
          ]
        }
      ],

I even tried a subquery like this (never worked with them before so possibly did something wrong):

    "plugins": [
      [
        "expo-share-intent",
        {
          "iosActivationRules": "SUBQUERY (extensionItems, $extensionItem,SUBQUERY ($extensionItem.attachments, $attachment,(ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO \"public.url\")).@count > 0).@count > 0",
          "androidIntentFilters": [
            "text/*"
          ]
        }
      ],

Any ideas?

⚙️ Environment Details

  • Expo SDK Version: 52
  • Package version: 3.2.3
  • Platform target: iOS
  • Routing: expo router
  • Using firebase: yes
  • Using static build: just using npx expo prebuild --clean and expo run:ios --device
  • Device: real (iPhone 12 pro max)
  • Type: local build

Thanks!

jaaywags avatar Jun 29 '25 05:06 jaaywags

I got it working using this iosActivationRules

    "plugins": [
      [
        "expo-share-intent",
        {
          "iosActivationRules": "SUBQUERY (extensionItems, $extensionItem, SUBQUERY ($extensionItem.attachments, $attachment, (ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO \"public.url\" OR ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO \"public.text\" OR ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO \"public.plain-text\")).@count > 0).@count > 0",
          "androidIntentFilters": [
            "text/*"
          ]
        }
      ],

jaaywags avatar Jun 29 '25 20:06 jaaywags

got the same problem, thanks for the feedback with custom iosActivationRules, will check if we can do something without custom rule.

achorein avatar Jul 08 '25 07:07 achorein