【问题标题】:iOS8 crash when try to use UIDocumentMenuViewController尝试使用 UIDocumentMenuViewController 时 iOS8 崩溃
【发布时间】:2017-05-24 15:24:27
【问题描述】:

我使用 Xamarin.Forms 创建 iOS 应用程序并使用 UIDocumentMenuViewController 访问 iCloud 文件。

当我在 iOS9+ 上运行程序时,程序运行正常,但是当我用 iOS8 模拟器尝试我的程序时,程序崩溃了

new UIDocumentMenuViewController(allowedUTIs, UIDocumentPickerMode.Import);

消息在说

'Application initializing document picker is missing the iCloud entitlement. Is com.apple.developer.icloud-container-identifiers set?'

我的应用出了什么问题,我该如何解决?

提前谢谢你。

【问题讨论】:

    标签: xamarin ios8 xamarin.forms icloud


    【解决方案1】:

    您需要确保已按照here 所述启用 iCloud 权利。

    official iOS documentation中甚至提到了这一点:

    在您的应用可以使用文档选择器之前,您必须打开 iCloud 文档功能

    如果您还没有这样做,只需在项目的根目录中创建一个新的Entitlements.plist 文件。然后只需启用iCloud 选项。

    【讨论】:

    • 我已经在 entitlements.plist 中启用了 iCloud,并且已经将 iCloud 容器添加到了应用 ID。还有什么我可能错过的吗?
    【解决方案2】:

    检查您是否已将 Entitlements.plist 链接到您的项目...

    我不知道为什么,但默认情况下 Entitlements.plist 没有链接,您可以通过转到项目选项并像这样分配自定义权利来做同样的事情!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-02-20
      • 1970-01-01
      • 1970-01-01
      • 2011-12-30
      • 1970-01-01
      • 2021-11-23
      • 1970-01-01
      相关资源
      最近更新 更多