KasemJaffer / receive_sharing_intent

A Flutter plugin that enables flutter apps to receive sharing photos, text and url from other apps.
Apache License 2.0
321 stars 369 forks source link

Cannot find type 'RSIShareViewController' in scope #271

Closed martinogarrizzo5 closed 5 months ago

martinogarrizzo5 commented 5 months ago

Hi, I tried in these days to use the plugin. I followed the documentation to setup the iOS implementation but it seems that there is something missing. The RSIShareViewController class is not found by the compiler. I added the following lines to the podfile and ran pod install and also pod update but nothing changed: target 'Share Extension' do inherit! :search_paths end

I also configured the info.plist as shown in the documentation. I attach some images about the errors.

Screenshot 2024-01-26 alle 18 20 00 Screenshot 2024-01-26 alle 19 31 54 Screenshot 2024-01-26 alle 19 32 56

Hope it helps, Best regards

KasemJaffer commented 5 months ago

To fix this error. Go to Build Phases of your Runner target and move Embed Foundation Extension to the top of Thin Binary.

I just added it as a step in readme.

Also, please use the latest v1.6.3 that I just published.

martinogarrizzo5 commented 5 months ago

Thanks for the help. It worked! Now I have some more questions to ask you:

Besides these questions there was one more thing I noticed using the plugin on Android: it seems that the reset method of the library doesn't really resets the state of ReceiveSharingIntent.getInitialMedia(). So each time I navigate to the loading screen I re-execute this action obtaining an old recycled value. Can you also check the implementation of this methods?

Thank you in advance, Martin

KasemJaffer commented 5 months ago

Thanks for verifying the fix worked for you. As for the other questions you mentioned. Could you please create an issue for each of these questions? This will help me track and address them more efficiently.

I'm closing this issue because it has been solved.

martinogarrizzo5 commented 5 months ago

Sure, thanks

coder-with-a-bushido commented 3 months ago

@KasemJaffer I'm getting the same issue even after following all the steps.

Launching lib/main.dart on iPhone 15 in debug mode...
Xcode build done.                                           29.5s
Failed to build iOS app
Swift Compiler Error (Xcode): No such module 'receive_sharing_intent'
/Users/mymac/Projects/app/ios/Share%20Extension/ShareViewController.swift:3:7

Could not build the application for the simulator.
Error launching application on iPhone 15.

Exited (1).