しめ鯖日記

swift, iPhoneアプリ開発, ruby on rails等のTipsや入門記事書いてます

Invalid Document Configuration. という警告が出たときの対処法

Xcodeで下のような警告が出たので調べてみました。

WARNING ITMS-90737: "Invalid Document Configuration. Document Based Apps should support either the Document Browser (UISupportsDocumentBrowser = YES) or implement Open In Place (LSSupportsOpeningDocumentsInPlace = YES/NO). Visit https://developer.apple.com/document-based-apps/ for more information."

対処法

警告に書いてあるとおり、Info.plistにUISupportsDocumentBrowserかLSSupportsOpeningDocumentsInPlaceをセットすれば解決します。

f:id:llcc:20181011184521p:plain

UISupportsDocumentBrowserは他アプリがこのアプリのファイルを操作するためのものです。
LSSupportsOpeningDocumentsInPlaceは他アプリから渡されるファイルに関するキーで、コピーではなく元ファイルを取得できるようになります。

警告が出る原因

Info.plistにDocument typesをセットすると発生します。
Document typesは他アプリからこのアプリを呼び出すときに使うキーです。

f:id:llcc:20181011184604p:plain