2

It is strange the I have the same code in 2 applications. In one application UIDocumentMenuViewController opens up with no applications EVERY OTHER TIME, while there are no such issues in my other application. I looked into the logs. Every time my first application fails to show other document provider application.

Here's the error:

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}

I tried to look up as much as I could tried to run everything with delay, in main queue, nothing works. Any help will be much appreciated

My original code to show DocumentMenuViewController is pretty straight forward, as one would expect:

let menu = UIDocumentMenuViewController(documentTypes: [kUTTypeContent as String], inMode: UIDocumentPickerMode.Import)
menu.delegate = self
self.presentViewController(menu, animated: true, completion: nil)

As I debug my code, I noticed that this error shows up when I present the view controller and not when I create it.

Complete log

<_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.

Any help/advice will be much appreciated

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Krishnan Sriram
  • 5,037
  • 5
  • 21
  • 31

0 Answers0