ajith-ab / react-native-receive-sharing-intent

A React Native plugin that enables React Native apps to receive sharing photos, videos, text, urls or any other file types from another app
MIT License
297 stars 106 forks source link

DEAD PACKAGE (!?) #170

Open DaneHoward opened 1 year ago

DaneHoward commented 1 year ago

1.) iOS has been unusable since 2022 with no signs of improvement or even whispers of working towards a solution.

2.) As of xCode 14.3 I believe this package is completely unusable as it won't even compile.

3.) 54 PRs and the vast majority are bot generated

I don't know of any other packages that handle receiving data from another source in RN. Does anyone know of any packages/forks/built-in RN features that allow for this functionality to work again?

spyglee commented 1 year ago

Have the same issue - it won't compile RN 0.69.9. I haven't found any alternatives yet though

indapublic commented 1 year ago

Compile works on 0.71.10 but cannot find my app in Share list

fukemy commented 1 year ago

I can not get shared data anymore with React Native 0.71.8, before it's work on 0.68.2

indapublic commented 1 year ago

@fukemy But app is visible in share list?

fukemy commented 1 year ago

@indapublic, it show on share list. Everything work normally until I upgrade React Native version to 0.71.8

fukemy commented 1 year ago

ok I found problem, in the Swift file ppl need to modify the groupIdentifier

indapublic commented 1 year ago

@fukemy ~Can you build small example please? I cannot find what I missed, my app is absent in Share list~

Hm. Works in Simulator but not works for real device debug release.

fukemy commented 1 year ago

Did u get a log from console?

ReceiveSharingIntent.getReceivedFiles((datas) => {
      console.log('getReceivedFiles', datas)
      if (datas && datas.length > 0) {
        RootNavigation.navigate('ShareFileToChat', {
          datas: datas
        })
      }
    },
      (error) => {
        // console.log('getReceivedFiles error', error); => alert a log here
      },
      'some unique' // share url protocol (must be unique to your app, suggest using your apple bundle id)
    );
indapublic commented 1 year ago

No, I meant my app is not visible in Share list if I debug app on real device via cable. But app is visible when I tried to run in Simulator.

Anyway app wasn't focused, like here

fukemy commented 1 year ago

I solved for the issues by debug each step carefully. First please run the Share Extension on your real device, put some debug here:

Screenshot 2023-06-29 at 15 38 32

If this line triggered, it's mean the extension work correctly and will send data to the host app, next time you open the ReceiveSharingIntent class then debug those line:

Screenshot 2023-06-29 at 15 39 56

From here you can check what problem happening, good luck to you

indapublic commented 1 year ago

@fukemy I'll repeat my request. If it's not difficult - could you share the project where everything works for you?

Globewyze1 commented 1 year ago

ReceiveSharingIntent

In the handleUrl(url: fileUrl) function, I have observed that the UserDefaults value is nil. I have previously confirmed that the value is successfully saved and retrieved in ShareViewController. However, when dealing with the ReceiveSharingIntent functionality, the value appears to be null. What is the issue here?

achorein commented 1 year ago

@indapublic i had the same problem since xcode 14.3 upgrade. I finally got a solution thanks to @timedtext great work on his plugin. with a little patch i got react-native-receive-sharing-intent working as before with zero manual configuration. i made a simple demo here https://github.com/achorein/expo-share-intent-demo, enjoy

indapublic commented 1 year ago

@achorein Thanks man! I'll check your demo

pavelustenko commented 9 months ago

I'm facing the same issue. Moreover, in IOS simulator in share variants the app appears, but if you sharing something, you can not get that in main app as ReceiveSharingIntent.getReceivedFiles doesn't call. Has anyone solved this issue or could help?

pavelustenko commented 9 months ago

Finally I've managed to get it work on Simulator, but when I archived release app and push it to real device (iPhone) my app still invisible in share list. I have no idea how to get it work. Please help.

pavelustenko commented 9 months ago

Well finally I've got it work! If someone struggles as I had, please don't ignore the following recommendation in IOS configuration documentation

INFO
Please Change Share Extension Target deployment version to Same as Main Project Target deployment version

Hope this help!

fukemy commented 9 months ago

@indapublic did you solve this?