ios - 为什么应用程序包并不总是一个包?

标签 ios swift uikit uidocument

我有一个 swift 应用程序,它是包文档类型的查看器。该应用程序导出此类型的 UTI(我更愿意导入它,但这也有同样的问题)。如果文档存储在 iCloud 中,则应用程序可以打开文件包,但如果文档存储在 Dropbox、oneDrive 或 Google Drive 中,则不能打开文件包。

文档类型和导出的 UTI 声明中是否有任何内容因缺失而跳出,从而可能导致此问题?

文档类型是:

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeIconFiles</key>
        <array/>
        <key>CFBundleTypeName</key>
        <string>JMRI Configuration Profile</string>
        <key>CFBundleTypeRole</key>
        <string>Viewer</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>org.jmri.profile</string>
        </array>
        <key>LSTypeIsPackage</key>
        <true/>
    </dict>
</array>

导出的 UTI 是:

<key>UTExportedTypeDeclarations</key>
<array>
    <dict>
        <key>UTTypeConformsTo</key>
        <array>
            <string>com.apple.package</string>
            <string>public.composite-content</string>
        </array>
        <key>UTTypeDescription</key>
        <string>JMRI Configuration Profile</string>
        <key>UTTypeIconFiles</key>
        <array>
            <string></string>
        </array>
        <key>UTTypeIdentifier</key>
        <string>org.jmri.profile</string>
        <key>UTTypeTagSpecification</key>
        <dict>
            <key>public.filename-extension</key>
            <array>
                <string>JMRI</string>
                <string>jmri</string>
            </array>
        </dict>
    </dict>
</array>

最佳答案

我遇到的问题是底层应用程序(Dropbox、Google Drive 和 oneDrive)如何实现对 FileProvider 的支持的影响。 API。

自从我最初提出这个问题以来,Dropbox 已经添加了对软件包的支持,Microsoft 已声明不支持软件包,而且我还没有找到(或弄清楚如何询问)Google 是否会支持软件包。

关于ios - 为什么应用程序包并不总是一个包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54084102/

相关文章:

ios - UIActionSheet 事件未触发

swift - 如何使用 Alamofire SDK 进行 SSL 链接?

ios - 如何检查用户 JID 是否已在 XMPPFrameWork 中使用

iphone - UIPickerView关于选择第一个值的问题

ios - 在 iOS 8 上自定义 UISegmentedControl

ios - 如何在 Swift 中初始化生成的核心数据 NSManagedObject

ios - 使用 UIWebview 向 Node.js 函数发送消息

iphone - 确定客户的 iOS 版本

ios - SceneKit 使用两个向量设置旋转

iphone - 打印应用程序当前堆栈跟踪的简单方法?