17

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.

Yunfei Lu
  • 389
  • 1
  • 5
  • 18

2 Answers2

32

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>
byJeevan
  • 3,728
  • 3
  • 37
  • 60
mangerlahn
  • 4,746
  • 2
  • 26
  • 50
  • The link above appears to be broken: Here is the working [documentation link](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Artaicles/AppExtensionKeys.html#//apple_ref/doc/uid/TP40014212-SW1) – Jeffrey Bergier Dec 04 '16 at 19:23
  • 2
    Thanks for the hint! Your link is broken as well, it was only a temporary link ;) But I corrected it! – mangerlahn Dec 04 '16 at 19:43
  • 1
    For detail query refer: https://stackoverflow.com/questions/29546283/ios-share-extension-how-to-support-wav-files – iCoder86 May 06 '19 at 09:13
  • Also use this one for sharing File and Audio <>> <>> – Prabakaran Muthusamy Jun 23 '23 at 13:31
3

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>
...
lenooh
  • 10,364
  • 5
  • 58
  • 49