UIDocumentInteractionControllerはファイルを他のアプリに共有できる機能です。
以下のように記述すればポップアップが出てきてその中のどれかのアプリにファイルを送信する事ができます。
この機能を試している時、ファイルは存在しているはずなのに表題のエラーが出ました。
let url = NSURL(fileURLWithPath: "xxx.jpg") let documentInteractionController = UIDocumentInteractionController(URL: url) documentInteractionController.presentOptionsMenuFromRect(CGRect(), inView: view, animated: true)
原因はdocumentInteractionController
がdeallocateされてた事でした。
documentInteractionController
をローカル変数からインスタンス変数に直したら無事に動いてくれました。