react-native-receive-sharing-intent icon indicating copy to clipboard operation
react-native-receive-sharing-intent copied to clipboard

DEAD PACKAGE (!?)

Open DaneHoward opened this issue 2 years ago • 18 comments

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?

DaneHoward avatar Apr 17 '23 14:04 DaneHoward

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

spyglee avatar Jun 12 '23 08:06 spyglee

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

indapublic avatar Jun 21 '23 11:06 indapublic

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

fukemy avatar Jun 27 '23 04:06 fukemy

@fukemy But app is visible in share list?

indapublic avatar Jun 27 '23 05:06 indapublic

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

fukemy avatar Jun 27 '23 05:06 fukemy

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

fukemy avatar Jun 27 '23 07:06 fukemy

@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.

indapublic avatar Jun 29 '23 05:06 indapublic

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)
    );

fukemy avatar Jun 29 '23 06:06 fukemy

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

indapublic avatar Jun 29 '23 08:06 indapublic

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

fukemy avatar Jun 29 '23 08:06 fukemy

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

indapublic avatar Jun 30 '23 11:06 indapublic

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?

Globewyze1 avatar Jul 13 '23 08:07 Globewyze1

@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

achorein avatar Aug 24 '23 08:08 achorein

@achorein Thanks man! I'll check your demo

indapublic avatar Aug 24 '23 08:08 indapublic

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 avatar Nov 17 '23 15:11 pavelustenko

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 avatar Nov 17 '23 16:11 pavelustenko

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!

pavelustenko avatar Nov 17 '23 16:11 pavelustenko

@indapublic did you solve this?

fukemy avatar Nov 22 '23 03:11 fukemy