Reputation: 3131
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.
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!!!
Upvotes: 6
Views: 3360
Reputation: 1212
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 "public.url"
).@count > 0
).@count > 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.
Upvotes: 1
Reputation: 1
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.
Upvotes: 0