分享扩展应用商店上传问题

Share extension app store upload issue

各位开发者大家好,

我正在上传带有分享扩展的应用,扩展应该只接受图片。

出于某种原因,当我上传应用程序进行 Beta 测试时,我收到如下警告。

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

我也收到了下面的邮件

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.

我在扩展目标中的 plist 文件看起来像这样...我尝试添加所有支持键值 0 除了图像和值 1 的唯一图像键...但警告仍然存在...

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

此外,应用程序还会显示每种类型(即电影、文本、网页等)以及图像的共享选项。

好的,所以我开始工作了,问题是从开发人员端复制粘贴的规则 NSExtensionActivationSupportsImageWithMaxCount 导致 plist 中出现空白 :( 检查下面。

<key> NSExtensionActivationSupportsImageWithMaxCount </key>

我建议你使用这个:

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