I am trying to create an app extension that i can use in a shortcut using the "share with apps" action. I have the extension created AND it shows up in the regular share sheet for just sharing anything. However, when i go into the shortcut app to create an automation that use the "Share with apps" action and try to select my app, i only see health, linkedin, slack, reminders, and a few other apps. What is different about this share functionality vs regular share functionality?
Does anyone know how to make their app show up in the list of apps you can select when you are in shortcuts using "Share with apps" action?
To be more specific. here is example.
One image attached shows the shortcut of taking screenshot and opening pinterest which still in the original app (in this example it was the Notes app).
The other screenshot shows my shortcut setup.
The goal here is for me to select my app instead of pinterest. I dont see my app listed in the list of apps to select. I have tried app intents, intents, share extensions but clearly doing something wrong. Thanks!
Update
OK so i have my ActionExtension working BUT only in simulator. When i go to try on my device i do not see it. Attached shows simulator. 
Also, when i try to run the shortcut i get this error
Does anyone know why this would be the case? My updated rule is SUBQUERY ( extensionItems, $extensionItem, SUBQUERY ( $extensionItem.attachments, $attachment, ( ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.image" ) ).@count == $extensionItem.attachments.@count ).@count == 1
A share extension is indeed the way to go to achieve that. Based on your screenshots, it appears that you already implemented the extension.
I re-created the same shortcut as yours in an iOS simulator and actuall managed to get a share extension working using the same
NSActivationRuleyou used in your question. That being said, there is a simpler way to do the same with the following configuration:In the
Info.plistof your share extension target, you should have something like this:NSExtensionPointIdentifierdefines the type of extension, here a share extension,NSExtensionMainStoryboardpoints to the storyboard containing your share extension UI,NSExtensionActivationRuledefines when the share sheet should show your extension based on the UTI type of the data being shared.Here the activation rule is set to
NSExtensionActivationSupportsImageWithMaxCountwith a count of one. This means that the extension only shows up when a single image is being shared, which is what the shortcut is doing. Please note that this is simply a shorthand doing the same thing as the activation rule from your question.Testing on simulator
Another thing to take into account is that Xcode sometimes have issues deploying the latest version of an extension on a simulator or device. The most reliable way to test I found to test this is to run the extension target and then select the Shortcut app as the host application.
Testing on a device
Finally, on a device, it looks like the "Share with apps" step only list applications signed with a distribution certificate. Using a TestFlight build is probably the way to go to test it on your device once it works in your simulator.