-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A popup is shown when I try to share image but disappears before I click the Post button #13
Comments
@benedict1986 For iOS, the plugin is supposed to skip the native share popup sheet, and immediately redirect to your app. This is because the share sheet has to be swift only code/ui, so it just redirect to the app after storing the attachments, and then the app looks up the stored attachments when it launches. It may be that your phone is going a bit slow, and the default iOS share sheet is opening up with the image before it redirects to the app. Running the example, when you share a website (url), or text, or an image, does it show that url/text/ image file path in the example app when you share to it? |
Hi @JoshJuncker, I went through the instruction again and found that I missed one step. Seems like it is expected that the popup will show and disappear immediately. Now I can get the image path. I haven't tried the url or text since it's not required in my app. In terms of the example, I still get the error
|
@ben-the-developer Make sure to follow step 6 in the readme to modify <project_root>/iOS/Podfile like below and run pod install. If you clone the repository, and open share_handler/share_handler/example, that example project should have the below code in it and working. I just tested on my machine and it seems to be working fine. But there could be some issue between our environments.
|
@JoshJuncker Not related to the issue above, but since you brought it up here, I thought I'll add to the discussion here... |
@benPesso The reason is because the Share Extension is a different target. Flutter projects have the main target of 'Runner', and the share_handler_ios pod is automatically added to that. But Share Extensions don't include the main project dependencies by default. It's almost like a completely separate project. If there is a way to somehow remove that manual step, I would be more than happy to implement it. I just don't know how as of yet... |
Oh, yeah. Right. Totally glossed over the fact that it's on a separate target, unlike Firebase. |
Hi, @JoshJuncker ,
Thank you for building such great plugin.
I am trying to use the plugin but having an issue. I can build my application successfully and when I select an image and click the Share button, I can also select my application. When I click the Share button, a popup is shown with the image I selected.
However, before I click the Post button on the popup, my application is opened and I cannot click the Post button in the popup anymore. At a result, my application does not receive any image.
Can you please help to give some advice what could be wrong?
I also try to run your example, but get an error saying
To run the example, I made a bit change to release the restriction of dart version since I am using
Thank you
The text was updated successfully, but these errors were encountered: