I think this is just an iOS9 bug. I have the same problem, so I created a very simple project and tested w / iOS9 (iphone6 ββ+) and iOS10 (iphone7 +). In my case, the error message appeared in the UIDocumentInteractionController AND when I selected Apple apps (like email). The error message only appeared w / iOS9. So, I think this is just an iOS9 bug, and I'm just ignoring it. Here is the code.
import UIKit class ViewController: UIViewController { var documentInteractionController: UIDocumentInteractionController! = nil @IBAction func openDocInteraction(_ sender: Any) { if (documentInteractionController == nil) { documentInteractionController = UIDocumentInteractionController() } let pngfile = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0] + "/testfile.png" documentInteractionController.url = URL(fileURLWithPath: pngfile) documentInteractionController.presentOptionsMenu(from: view.frame, in: view, animated: true) } override func viewDidLoad() { super.viewDidLoad() } }
source share