Skip to content

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

@skruegs

Description

@skruegs

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions