Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
338 views
in Technique[技术] by (71.8m points)

xcode - 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

question from:https://stackoverflow.com/questions/65835648/macos-share-extension-cant-get-activation-types-working

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Started working after a system reboot


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...