Expensify / react-native-share-menu

A module for React Native that adds your app to the share menu of the device
MIT License
664 stars 240 forks source link

Sharing contact cards (.vcf/vcard) not working in iOS #235

Open skruegs opened 1 year ago

skruegs commented 1 year ago

I want to be able to share URLs, plain text, and contact cards. I got URLs & plain text working, but every time I go to share a contact card, the extension quits and never continues to the app.

Info.plist for my Share Extension (correctly matches urls, text, and vcards because I see my extension show up when sharing a contact card):

<key>NSExtensionActivationRule</key>
<string>
    SUBQUERY (
        extensionItems, $extensionItem,
        SUBQUERY (
            $extensionItem.attachments, $attachment,
            ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.vcard" || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.plain-text" || ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url"
        ).@count >= 1
    ).@count > 0
</string>

My index.share.js:

const Share = () => {
  useEffect(() => {
    ShareMenuReactView.data().then(() => {
      ShareMenuReactView.continueInApp();
    });
  }, []);
  return <View />;
};
AppRegistry.registerComponent('ShareMenuModuleComponent', () => Share);

Can anyone offer some help? @Gustash

suman379 commented 1 year ago

+1

dilarasager commented 1 year ago

+1

I use following configuration:

resim

Application appears in the sharing list, but does not open when clicked.

arkahood commented 11 months ago

Hey! I have solved this issue, let me know if the repo is active or not, I can create pull request for it or I have the patch file.

roshangm1 commented 9 months ago

@arkahood Can you please open a PR or push a branch with that patch? Thank you!

arkahood commented 9 months ago

@roshangm1 I have created the PR take a look - https://github.com/Expensify/react-native-share-menu/pull/309