繁体   English   中英

为什么我的iCloud Drive AppFolder在MacOS上可见,但在iOS上的iCloud Drive App中被禁用?

[英]Why is my iCloud Drive AppFolder visible on MacOS, but disabled in iCloud Drive App on iOS?

我为我的iOS应用程序开发了一个iCloud Drive Export功能,它可以工作。 我可以在Mac OS X 10.11上的iCloud Drive文件夹中的公共AppContainerFolder中看到导出的文档。

但在iOS上,我只能在iCloud Drive应用程序中看到AppContainerFolder。 它被禁用,我无法打开该文件夹,或看到里面的文件。

iOS iCloud Drive App中禁用文件夹的图像

从iCloud Drive设置中,我可以看到我导出的文件位于iCloud Drive中的AppContainerFolder中。

iCloud设置中的AppContainerFolder图像

iCloud Drive有没有人遇到过这样的问题?

我在我的应用程序中使用了两个app容器,一个用于导出的“iCloud.com ...”标识符,另一个用于Ensembles-CoreData同步的“TeamIdentifier.com ...”标识符。 我使用以下方法明确使用容器的URL:

[[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:@"iCloud.com..."]

我已经尝试过只使用TeamIdentifier-Container,但AppContainerFolder的可见性没有变化。

我试图碰到BundleVersion,我玩了Info.plist NSUbiquitousContainers设置。 我还通过TestFlight向外部测试人员提供Build,以查看它是否与开发设备有关。

我还没有做过唯一的事情,就是用一个新的BundleVersion向AppStore发布一个新版本,看它是否与高效的应用程序和开发中的应用程序有关。

任何提示和提示欢迎。

在与Apple Developer Technical Support澄清之后,我现在能够解决这个问题。

我的应用程序声明了两个导出的UTI(自己的备份文件),因此当这些UTI以外的其他文件保存到该文件夹​​时,iCloud容器将默认为不启用(或显示为灰色)。 我们的应用程序能够创建PDF和CSV,但这些文件类型未在info.plist中声明为“文档类型”,因为我们的应用程序无法显示它们。

将PDF和CSV文档类型添加到info.plist时,iCloud容器会立即显示在iCloud Drive应用程序中。

供您参考,以下是info.plist的摘录:

...
<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeIconFiles</key>
        <array/>
        <key>CFBundleTypeName</key>
        <string>Adobe PDF</string>
        <key>CFBundleTypeRole</key>
        <string>Viewer</string>
        <key>LSHandlerRank</key>
        <string>Alternative</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.adobe.pdf</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeIconFiles</key>
        <array/>
        <key>CFBundleTypeName</key>
        <string>CSV</string>
        <key>CFBundleTypeRole</key>
        <string>Viewer</string>
        <key>LSHandlerRank</key>
        <string>Alternative</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.comma-separated-values-text</string>
        </array>
    </dict>
</array>
...

帖子为什么我的应用程序未显示在iCloud Drive Folder中似乎表明您的应用程序需要在公共iCloud文件夹完全运行之前获得批准和发布。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM