skip to Main Content

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?

2

Answers


  1. A share extension is only meant to appear in the regular share sheet. If you want to expose some features of your app to the shortcut app or to Spotlight, you will need to create an App Shortcut using the App Intent framework.

    Basically, it relies on the AppIntent protocol. Any feature from your app that you wish to expose to the shortcut app needs to implement this protocol.

    Once you have a custom app intent implementation, you can use it to create an app shortcut:

    struct YourFeature: AppIntent {
     // Implement required methods for your app's logic
    }
    
    AppShortcut(intent: YourFeature(), phrases: [
                "Run YourFeature",
                "Start YourFeature"
            ])
    

    I advise looking at Apple’s documentation to understand everything possible with App Intents.

    Login or Signup to reply.
  2. Have you included the corresponding UTI types in your info.plist?

    For example, if your extension supports:

    • text > public.text
    • or, images > public.image

    info.plist

    <key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeName</key>
            <string>Public Text</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>public.text</string>
            </array>
        </dict>
        <dict>
            <key>CFBundleTypeName</key>
            <string>Public Image</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>public.image</string>
            </array>
        </dict>
    </array>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search