achorein / expo-share-intent-demo

React Native Expo Share Intent Demonstration
89 stars 9 forks source link

Not working on IOS #1

Closed Randall71 closed 1 year ago

Randall71 commented 1 year ago

Before all, thanks for take your time to made it easy to use this feature with Expo. I clone the project and configure it with EAS with a paid apple developer account but i can't get the build working on EAS.

One thing also that i don't understand is that before launching the build, expo detect two target for the share extension, is this correct ?

Capture d’écran (330)

xcode-build-04c8eb81-0e39-4e55-97fb-7b2ce3a245d8.log

achorein commented 1 year ago

I confirm, you should have only one "ShareExtension" Target. the problem seems to come from the npx eas-cli build --platform ios auto-configuration of eas build.

in your app.json you only need this part :

    "extra": {
      "eas": {
        "projectId": "xxxx-xxx-xxx-xxx-xxxxxx"
      }
    }

You must remove the experimental build config generated :

        "build": {
          "experimental": {
            "ios": {
              "appExtensions": [
                {
                  "targetName": "ShareExtension",
                  "bundleIdentifier": "com.example.exposhareintentdemo.share-extension",
                  "entitlements": {
                    "com.apple.security.application-groups": [
                      "group.com.example.exposhareintentdemo"
                    ]
                  }
                }
              ]
            }
          }
        },
Randall71 commented 1 year ago

This work perfectly now , i can be able to share text or url with the app.

Randall71 commented 1 year ago

I think i can close this issue and update the readme to let other people make it right the first time what do you think about it ?

Also,can i know if you plan to add support for Android to the patch, this would be very awesome.

achorein commented 1 year ago

Great ! I just add the initial eas build config to the project for new comers, should solve the problem.

About android i have a little patch but only tested with Expo SDK 46. Need some work on react-native-receive-sharing-intent side to get it working in Expo 49.

I look into it when I have time

achorein commented 1 year ago

@Randall71 FYI, I add a new branch with Android working in Expo46 https://github.com/achorein/expo-share-intent-demo/tree/expo46

achorein commented 1 year ago

after more test, got a version working with Expo 48, merged to the main branch.

Randall71 commented 1 year ago

you are amazing. I tested the new version specially for the SDK 47 but the android tricks part are a limitation for now to build this properly with the managed workflow. i think customize this step with a plugin would be the missing piece

achorein commented 1 year ago

Sure, should be great to have a single plugin doing all that stuff. Already working on it, but that take more time

Randall71 commented 1 year ago

@achorein great to know, for this and the support for sharing files, i am definitely ready to offer you some coffee πŸ”₯πŸ”₯

achorein commented 1 year ago

for the joke, i added the coffee link in the readme πŸ™ πŸ˜„

Randall71 commented 1 year ago

And I was happy to follow it πŸ˜„πŸ‘