UIDocumentPicker无法在iOS 11上显示“浏览”

时间:2017-09-06 03:00:50

标签: ios swift swift3 ios11 uidocumentpickervc

我写了一个UIDocumentPicker程序 但是,如果我点击iOS 11模拟器上的“浏览”,则继续显示加载并且无法显示 需要什么样的回应?

开发环境

  • Xcode:版本9.0 beta 5
  • 模拟器:iPhone 7 Plus(iOS 11.0)

错误图像

enter image description here

代码

https://github.com/amarron1/SampleDocumentPicker

class ViewController: UIViewController, UIDocumentPickerDelegate {
    let UTIs:[String] = ["public.data"]
    // Save to this application from iCloud
    @IBAction func importDocumentPicker(_ sender: Any) {
        let importPicker = UIDocumentPickerViewController(documentTypes: self.UTIs, in: .import)
        importPicker.delegate = self
        present(importPicker, animated: true, completion: nil)
    }
}

日志

2017-09-06 11:37:54.790680+0900 SampleDocumentPicker[40282:5448334] Unbalanced calls to begin/end appearance transitions for <_UIWaitingForRemoteViewContainerViewController: 0x7fb54c6153b0>.
2017-09-06 11:38:04.101520+0900 SampleDocumentPicker[40282:5448334] [DocumentManager] The view service did terminate with error: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}

1 个答案:

答案 0 :(得分:1)

从外观上看,这只是一个模拟器问题。 (iOS 11.0模拟器) UIDocumentPicker在设备上正常工作。

如果有人遇到此问题,只需在真实设备上进行测试。