奇怪的是,我在2个应用程序中拥有相同的代码。在一个应用程序UIDocumentMenuViewController
打开,每个时间都没有应用程序,而我的其他应用程序中没有这样的问题。我查看了日志。每次我的第一个应用程序无法显示其他文档提供程序应用程
这是错误:
显示UIDocumentMenuViewController时出现远程视图控制器错误:错误域= NSCocoaErrorDomain代码= 4097“连接到名为com.apple.UIKit.fileprovider.default.viewservice的服务”UserInfo = {NSDebugDescription =连接到名为com.apple.UIKit的服务。 fileprovider.default.viewservice}
我试着查看尽可能多的尝试以延迟运行所有内容,在主队列中,没有任何作用。任何帮助将不胜感激
显示DocumentMenuViewController
的原始代码非常简单,正如人们所期望的那样:
let menu = UIDocumentMenuViewController(documentTypes: [kUTTypeContent as String], inMode: UIDocumentPickerMode.Import)
menu.delegate = self
self.presentViewController(menu, animated: true, completion: nil)
当我调试我的代码时,我注意到当我呈现视图控制器时出现此错误,而不是在我创建它时。
完成日志
<_UIAlertControllerCollectionViewFlowLayout: 0x14e405430>.
2015-12-08 13:48:22.125 IBM Navigator[2930:919990] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
2015-12-08 13:48:23.874 IBM Navigator[2930:920496] plugin com.apple.UIKit.fileprovider.default interrupted
2015-12-08 13:48:23.875 IBM Navigator[2930:920486] plugin com.apple.UIKit.fileprovider.default invalidated
2015-12-08 13:48:23.909 IBM Navigator[2930:919990] Remote view controller error while displaying UIDocumentMenuViewController: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.UIKit.fileprovider.default.viewservice" UserInfo={NSDebugDescription=connection to service named com.apple.UIKit.fileprovider.default.viewservice}
2015-12-08 13:48:23.938 IBM Navigator[2930:919990] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x14cf37930 UILabel:0x14e413280.width == UIView:0x14cfdaa30.width - 32>",
"<NSLayoutConstraint:0x14cfdd920 UIView:0x14cfdaa30.width == UIView:0x14cfb8210.width>",
"<NSLayoutConstraint:0x14e0e0c90 H:[UIView:0x14cfb8210(30)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x14cf37930 UILabel:0x14e413280.width == UIView:0x14cfdaa30.width - 32>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
非常感谢任何帮助/建议