AirDropでDocumentフォルダにファイルを保存する
アプリ内でDocumentフォルダを公開していればAirDropでファイルを受け取ることができます。
アプリ側の設定
アプリ側の設定は簡単でinfo.plistに2つkeyを追加してYESに設定してあげるだけです。
Key | Value |
Application supports iTunes file sharing | YES |
Supports opening documents in place | YES |

AirDrop



ファイルアプリから保存したデータをみることができます!
Documentsの共有をしていればiTunes、Finder(Catalina)からもファイルの追加ができるはずです。
ドキュメントフォルダへのパスは以下のコードから取得することができます。
let documentsPath = NSHomeDirectory() + "/Documents"