2

I have developed a share extension that accepts URLs and the share extension shows up in mobile Safari share menu and it works. But when I open the app Flipboard, which allows users to share articles to other apps, my share extension does not show up, while other share extensions do. I noticed that flipboard ends up sharing a URL too. My question is, why would mine do not show up? Any way of finding out what file format is the flipboard using to share? Thanks.

dickyj
  • 1,830
  • 1
  • 24
  • 41

1 Answers1

3

Found my own answer, here it is:

    <key>NSExtensionActivationRule</key>
    <string>
        SUBQUERY (
            extensionItems,
            $extensionItem,
            SUBQUERY (
                $extensionItem.attachments,
                $attachment,
                ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url" ||
                ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.text" ||
                ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.data" 
            ).@count == $extensionItem.attachments.@count
        ).@count &gt; 0             
    </string>
dickyj
  • 1,830
  • 1
  • 24
  • 41
  • Please help me if you know about how to implement this feature in Xamarin Ios. – Kushal Vora Jul 05 '16 at 08:53
  • I have never worked with Xamarin before, but this is a configuration in info.plist file, which I am sure you will need that too in Xamarin. – dickyj Jul 05 '16 at 13:45
  • it's little weird. i just print out the support types when execute extension debugging on Clipboard and doesn't show "public.data" type. but i pretty sure that after added the type "public.data", it works magically!!!!! The types of my config are public.url, public.plain-text, public.jpeg, public.png, public.data. for both iOS 9 & 10. – Jerry Chen Dec 22 '16 at 07:13
  • @dickyj is your app accepted on App Store? because when we use `public.data` in predicate, our share extension accepts almost everything; same like `TRUEPREDICATE` which is not acceptable at App Store. – D4ttatraya Dec 24 '18 at 15:01
  • Yes it's accepted in the app store, though I cannot say that my current method is the correct one as things may have changed with Apple. – dickyj Jan 01 '19 at 05:57