achorein / expo-share-intent

🚀 Simple share intent in an Expo Native Module
MIT License
119 stars 10 forks source link

MacOS share extension called "Share Extension" instead of app name #39

Closed joshmohrer closed 2 weeks ago

joshmohrer commented 3 months ago

This seems to only happen on MacOS - on iOS its named as expected.

2024-04-01_15 59@2x copy

Not sure if I missed a setting.

achorein commented 3 months ago

I've never tested it on MacOS, but I'm sure there's a configuration for that. but that's not really the target of this package. Do you really use react native on the desktop, or it's just a compatibility matter as users can now do it ?

RobinHeidenis commented 3 months ago

Are you building with EAS? In my app.json I have the following entry:

"eas": {
  "build": {
    "experimental": {
      "ios": {
        "appExtensions": [
          {
            "targetName": "ShareExtension",
            "bundleIdentifier": "com.robinheidenis.hephaestus.share-extension",
            "entitlements": {
              "com.apple.security.application-groups": [
                "group.com.robinheidenis.hephaestus"
              ]
            }
          },
          {
            "targetName": "ShareExtension",
            "bundleIdentifier": "com.robinheidenis.hephaestus.share-extension"
          }
        ]
      }
    }
  },
  "projectId": "xxx"
}

Perhaps changing the name here from ShareExtension to something else might help? I don't have an IOS device, so I can't test it myself

joshmohrer commented 3 months ago

@achorein not MacOS exactly, I think technically an iPad OS with MacOS support. Some users do it, but this is not that important to me.

@RobinHeidenis I do use EAS but my understanding is that we should ommit what you've included as build, leaving it as

 "extra": {
      "eas": {
        "projectId": "xxx"
      }
   },

for me. I dont recall from where I got that idea, but it seems to work.

achorein commented 3 months ago

the eas.build.experimental have to be removed, this is mention in the FAQ in the related issue :)

@joshmohrer for your problem in macOS share menu, can you try to edit the generated ios/ShareExtension/ShareExtension-Info.plist with this ?

<key>CFBundleDisplayName</key>
<string>TESTNAME Share Extension</string>
achorein commented 3 months ago

@joshmohrer do you know how to test this share menu in local ? without an eas build

joshmohrer commented 3 months ago

I think so -- but can I launch the ipad version of the app as a MacOS app via Expo Go or development build? I'm not sure you can?

achorein commented 3 months ago

it cannot be tested without shipping a version to test flight :/

achorein commented 2 months ago

@joshmohrer can you try with this patch in your patches/ directory for install script ? expo-share-intent+1.4.0.patch

joshmohrer commented 2 months ago

Will do @achorein -- do I need to do this if im using 1.4.1 already?

joshmohrer commented 2 months ago

Or perhaps I should roll back to 1.4.0?


  Info:
    Patch file: patches/expo-share-intent+1.4.0.patch
    Patch was made for version: 1.4.0
    Installed version: 1.4.1

---
patch-package finished with 1 error(s).
achorein commented 2 months ago

1.4.1 does not include this change, so yes for testing purpose rollback to 1.4.0.

achorein commented 2 weeks ago

v2.1.1 and v1.6.1 includes an attempted correction but has not been tested in real conditions