3
votes

Hello fellow developers,

I'm uploading an app with share extension, extension should only accept images.

For some reason when I'm uploading app for beta testing i get an warning as below.

No values under NSExtensionActivationRule in bundle APPNAME.app/PlugIns/ShareOnAPPNAME.appex appear to trigger activation.

Also I got email saying below

Dear developer,

We have discovered one or more issues with your recent delivery for "APPNAME". Your delivery was successful, but you may wish to correct the following issues in your next delivery:

Unreachable Activation - No values under NSExtensionActivationRule in bundle APPNAME.app/PlugIns/ShareOnAPPNAME.appex appear to trigger activation.

After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.

My plist file in extension target looks like this...I tried adding all support key with value 0 except image and only image key with value 1...but warning persists...

<key>NSExtension</key>
<dict>
    <key>NSExtensionAttributes</key>
    <dict>
        <key>NSExtensionActivationRule</key>
        <dict>
            <key> NSExtensionActivationSupportsImageWithMaxCount </key>
            <integer>1</integer>
            <key>NSExtensionActivationSupportsText</key>
            <false/>
        </dict>
    </dict>
    <key>NSExtensionPointIdentifier</key>
    <string>com.apple.share-services</string>
    <key>NSExtensionPrincipalClass</key>
    <string>ShareOnAPPNAMEVC</string>
</dict>

Also App shows sharing option to each and every type i.e. movies, text, webpage etc. along with images.

2

2 Answers

2
votes

Ok so I got it working, issue was copy pasted rule NSExtensionActivationSupportsImageWithMaxCount from developer side caused blank spaces in plist :( check below.

<key> NSExtensionActivationSupportsImageWithMaxCount </key>
2
votes

I would suggest you to use this:

<key>NSExtension</key> 
<dict> 
    <key>NSExtensionAttributes</key> 
    <dict>
        <key>NSExtensionActivationRule</key> 
        <dict> 
            <key>NSExtensionActivationRule</key> 
            <string>TRUEPREDICATE</string> 
            <key>NSExtensionActivationSupportsFileWithMaxCount</key>
            <integer>1</integer>
            <key>NSExtensionActivationSupportsImageWithMaxCount</key>              
            <integer>1</integer>
            <key>NSExtensionActivationSupportsMovieWithMaxCount</key>                                              
            <integer>1</integer>
            <key>NSExtensionActivationSupportsText</key> 
            <false/> 
            <key>NSExtensionActivationSupportsWebURLWithMaxCount</key> 
            <integer>1</integer>
        </dict>
    </dict> 
    <key>NSExtensionMainStoryboard</key>
    <string>MainInterface</string>
    <key>NSExtensionPointIdentifier</key>
    <string>com.apple.share-services</string>
</dict>