xcodemacosshare-extension

MacOS Share Extension: can't get activation types working


I'm working on a Share Extension, so the user can right click a file in Finder > Share > MyApp.

I'm trying to filter the items so that MyApp menu item does not appear on certain file types.

Here's what my Info.plist looks like:

<key>NSExtension</key>
    <dict>
        <key>NSExtensionAttributes</key>
        <dict>
            <key>NSExtensionActivationRule</key>
            <dict>
                <key>NSExtensionActivationSupportsMovieWithMaxCount</key>
                <integer>1</integer>
                <key>NSExtensionActivationUsesStrictMatching</key>
                <true/>
                <key>NSExtensionActivationDictionaryVersion</key>
                <integer>1</integer>
            </dict>
        </dict>
        <key>NSExtensionPointIdentifier</key>
        <string>com.apple.share-services</string>
        <key>NSExtensionPrincipalClass</key>
        <string>$(PRODUCT_MODULE_NAME).ShareViewController</string>
    </dict>

But when I run it, the context menu appears for all file types. MacOS 11.1, Xcode 12.3. Thanks


Solution

  • Started working after a system reboot