5

Something weird seems to start happening after upgrade to Xcode 12 and iOS 14.

App use to show fine in share menu option before, but suddenly it is acting weirdly and only showing on second attempt onwards.

My aim is to get web page url. Here's my share activation rule.

enter image description here

I have even tried on new project and added share extension with activation rule above. It also does the same, and app only show in share option from second time onwards. This issue mainly happening in Safari.

It used to work fine before iOS 14, i also didn't find anything in iOS 14 change log regarding share extension that can cause the issue. Can anyone help me pointing out where it could be wrong or some possible reason.

Thanks in advance!!!

Milan Mendpara
  • 3,091
  • 4
  • 40
  • 60
  • Happening to me too. Our share extension is not shown. – gngrwzrd Oct 21 '20 at 22:11
  • found more information on a similar issue and collected it here https://stackoverflow.com/questions/67147589/ios-share-extension-not-showing-for-urls-and-text a phone restart seems to be fixing the issue happening since iOS 14.4.1 – Epiczzor Apr 18 '21 at 11:10

2 Answers2

1

We also ran into this issue and had a configuration that looked very similar to yours. Ended up switching to this configuration to get it consistently showing:

<dict>
    <key>NSExtensionAttributes</key>
    <dict>
        <key>NSExtensionActivationRule</key>
        <string>  SUBQUERY (
         extensionItems,
         $extensionItem,
         SUBQUERY (
            $extensionItem.attachments,
            $attachment,
            ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO &quot;public.url&quot;
           ).@count &gt; 0
         ).@count &gt; 0</string>
    </dict>
    <key>NSExtensionMainStoryboard</key>
    <string>MainInterface</string>
    <key>NSExtensionPointIdentifier</key>
    <string>com.apple.share-services</string>
</dict>

Note we'd originally tried @count == 1 for the count comparisons but this also didn't work on iOS 14.

jmif
  • 1,192
  • 2
  • 14
  • 22
  • Is this still working for you? I received some feedback that in some cases the share extension does not show up even with the ‘@count > 0’ – mixable Dec 17 '20 at 23:25
0

I had the same issue with my project, and found out the value type of NSExtensionActivationSupportsText should be a Integer Number, and also check the key for MainInterface should be NSExtensionMainStoryboard, which was wrong for my project to set it as NSExtensionPrincipalClass.

screenshot of info.plist

  • I tried this and while it seemed to work. You cannot submit to the App Store with NSExtensionActivationSupportsText as an Int. – gngrwzrd Jan 05 '21 at 17:53