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
325 stars 372 forks source link

When sharing image from gallery, it redirect to wrong app #225

Open johnyang90 opened 2 years ago

johnyang90 commented 2 years ago

Hi all, I created an app with 2 version with different bundle identifier, one is for testing app (com.company.uatapp), another is for production app (com.company.app). But when I have both app installed in the same device, when I share an image from gallery, it will always redirect to the testing app. I have updated the ShareViewController.swift hostAppBundleIdentifier to be different in both app, but it still doesn't work?

Anyone can help?

johnyang90 commented 2 years ago

For testing App, inside /Share Extension/info.plist, i have the following:

<key>com.apple.security.application-groups</key>
<array>
    <string>group.com.company.uatapp</string>
</array>

For live App, inside /Share Extension/info.plist, i have the following:

<key>com.apple.security.application-groups</key>
<array>
    <string>group.com.company.app</string>
</array>
beriaanirudh commented 1 year ago

Update The instructions on pub seem outdated. I followed instructions again from Github Readme and it works. @johnyang90 Please check if it works for you, we can then close this issue.

bhagat-techind commented 1 year ago

You can use my plugin flutter_sharing_intent