Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to handle NSExtensionActivationRule is truepredicate?

Tags:

ios

swift

I got warning: Embedded binary's NSExtensionActivationRule is TRUEPREDICATE. Before you submit your containing app to the App Store, be sure to replace all uses of TRUEPREDICATE with specific predicate statements or NSExtensionActivationRule keys. If any extensions in your containing app include TRUEPREDICATE, the app will be rejected

what can I do? I try to modify NSExtension, but I really don't figure out how to solve it.

like image 585
Yunfei Lu Avatar asked Oct 01 '15 16:10

Yunfei Lu


2 Answers

You have to specify every data type you want to use in Info.plist of your App Extension.

See the documentation for the available keys. Look for NSExtensionActivationRule.

Here is a example:

//UPDATE:

<key>NSExtensionActivationRule</key>
            <dict>
                <key>NSExtensionActivationSupportsImageWithMaxCount</key>
                <integer>1</integer>
                <key>NSExtensionActivationSupportsMovieWithMaxCount</key>
                <integer>1</integer>
                <key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
                <integer>1</integer>
            </dict>
like image 158
mangerlahn Avatar answered Nov 22 '22 06:11

mangerlahn


I wanted my app to accept text only. This is what works:

...
<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>
...
like image 27
lenooh Avatar answered Nov 22 '22 06:11

lenooh