alinz / react-native-share-extension

react-native as an engine to drive share extension
MIT License
762 stars 396 forks source link

Not working on Android #163

Closed djorkaeffalexandre closed 5 years ago

djorkaeffalexandre commented 5 years ago

In android if I put a console.log on ComponentDidMount this show but not show the view of render.

OmarBasem commented 5 years ago

Same for me, and also app crashes! Not working on ios either

djorkaeffalexandre commented 5 years ago

Hi @ramon90 , I resolved the problem on Android, is on Share.Theme... If you want to use this library, I have a fork and maintain it to use on Rocket.Chat.ReactNative, you can find examples on Rocket.Chat Share Extension (iOS) and Rocket.Chat Share Extension (Android).. My fork of this library is: rn-extensions-share

OmarBasem commented 4 years ago

@djorkaeffalexandre Thanks for your reply, and sorry for my late reply. I will check it " rn-extensions-share" out. Does it also work using firebase?

djorkaeffalexandre commented 4 years ago

@ramon90 yeah! In Rocket.Chat.ReactNative we use Firebase :)

OmarBasem commented 4 years ago

@djorkaeffalexandre so I tried it on ios, but I am still facing the same issue I had before, the share extension appears in the share menu, but when I press it nothing happens. I have followed the installation guide exactly. Is there any further steps that you have done to get it working on ios?

djorkaeffalexandre commented 4 years ago

@ramon90 can you give me your repository url to help you?

OmarBasem commented 4 years ago

@djorkaeffalexandre Thank you I fixed the issue. Just one question, on iOS I am using a modal to show the share extension, but it appears without animation, I have the animation module included, also I can run animations within the modal normally. Any clue on that?

djorkaeffalexandre commented 4 years ago

Which is your animation module?

OmarBasem commented 4 years ago

@djorkaeffalexandre libRCTAnimation.a

djorkaeffalexandre commented 4 years ago

Probably that: https://github.com/alinz/react-native-share-extension/issues/99 Which is your react-native version?

OmarBasem commented 4 years ago

"react": "16.8.3", "react-native": "^0.59.9",

djorkaeffalexandre commented 4 years ago

Here animation works fine at header: https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/1064#issue-299415237 Can you try to use react-native-modalbox instead modal from react-native?

OmarBasem commented 4 years ago

@djorkaeffalexandre I tired both

OmarBasem commented 4 years ago

@djorkaeffalexandre ok I will try it there

djorkaeffalexandre commented 4 years ago

Oh :( can you give me a gif?

OmarBasem commented 4 years ago

@djorkaeffalexandre I am getting a warning "Module MyShareEx requires main queue setup since it overrides 'init' but doesn't implement 'requiresMainQueueSetup'. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.' Could it be related to that warning? Are you getting this same warning?

OmarBasem commented 4 years ago

@djorkaeffalexandre I tried the native Modal component and it is working. Thanks for your help. But do you have any clue on this warning?

djorkaeffalexandre commented 4 years ago

yes, i get the same warning, it is not related to it, to fix this i will soon release a new release of rn-extensions-share with this:

- (BOOL)requiresMainQueueSetup
 {
     return YES;
 }

some of the React-Native libraries don't work on iOS because Share Extension doesn't have access to sharedApplication in objective-c

OmarBasem commented 4 years ago

@djorkaeffalexandre Aha okay, Thanks a lot for your time, I appreciate it :)

OmarBasem commented 4 years ago

Hello @djorkaeffalexandre, the library does not support sharing of multiple images, I was able to add support for that on android, but I could not do it on iOS. Where you able to add support for multiple images on iOS?