How to handle NSExtensionActivationRule is true?

I got a warning: NSExtensionActivationRule's built-in binary is TRUEPREDICATE. Before sending your application to the App Store, be sure to replace all uses of TRUEPREDICATE with specific predicate instructions or NSExtensionActivationRule keys. If any extensions in your application contain TRUEPREDICATE, the application will be rejected

What can I do? I am trying to change NSExtension, but I really don't understand how to solve it.

+9
source share
2 answers

You must specify each data type that you want to use in the Info.plist of your application extension.

. NSExtensionActivationRule.

Here is a example:

//:

<key>NSExtensionActivationRule</key>
            <dict>
                <key>NSExtensionActivationSupportsImageWithMaxCount</key>
                <integer>1</integer>
                <key>NSExtensionActivationSupportsMovieWithMaxCount</key>
                <integer>1</integer>
                <key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
                <integer>1</integer>
            </dict>
+17

, . :

...
<key>NSExtensionAttributes</key>
    <dict>
        <key>NSExtensionActivationUsesStrictMatching</key>
        <integer>2</integer>
        <key>NSExtensionActivationRule</key>
        <dict>
            <key>NSExtensionActivationDictionaryVersion</key>
            <integer>2</integer>
            <key>NSExtensionActivationSupportsText</key>
            <true/>
        </dict>
    </dict>
...
0

Source: https://habr.com/ru/post/1609822/


All Articles