【问题标题】:UIDocumentPickerViewController & iCloud entitlement in IOS 8IOS 8 中的 UIDocumentPickerViewController 和 iCloud 权利
【发布时间】:2014-09-01 21:50:50
【问题描述】:

我在 App Store 中有一个基于文档的应用程序。现在我尝试在我的应用程序中使用UIDocumentPickerViewController 来共享来自我的应用程序UIDocumentProviderExtension 支持的应用程序的文件。

以前我使用UIDocumentInteractionController 在应用程序之间传输文件。问题是当我使用UIDocumentPickerViewController 时,我在应用程序中收到错误“iCloud entitlement missing”。

根据 Apple 文档,如果我的应用支持 iCloud 存储,我需要添加 iCloud 授权,但这不是我的应用的要求。那么,我想了解 iCloud 授权需要什么来呈现UIDocumentPickerViewController

【问题讨论】:

标签: ios8 xcode6


【解决方案1】:

UIDocumentPickerViewController 允许您的应用访问共享的 iCloud 文档,即使您的应用本身不支持 iCloud 文档存储。这是UIDocumentPickerViewController 的默认行为。

因此,如果您想使用UIDocumentPickerViewController,您必须将 iCloud 授权添加到您的 App ID。

如果没有,您可能希望在您的应用中创建一个DocumentProviderExtension。然后,您无需将 iCloud 授权添加到您的应用程序 ID,您的用户可以从他们首选的应用程序(具有 UIDocumentPickerViewController)中访问您的文档。

【讨论】:

    猜你喜欢
    • 2015-04-17
    • 2011-12-28
    • 2014-11-17
    • 1970-01-01
    • 1970-01-01
    • 2019-09-02
    • 2014-11-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多