1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

transferFile()で転送したファイルは溜まっていくのか?

Last updated at Posted at 2016-11-22

はじめに

WCSessionのtransferFile()を通じてiOS-watchOS間でファイル転送を繰り返した場合、そのファイルは溜まっていくのでしょうか?

結論

溜まりません。

何度か実行した上で、実際にフォルダを確認してみましょう。

screenshot.png

溜まっていませんね。

An Introduction to Watch Connectivity in watchOS 2の説明によれば、転送されたファイルは転送先アプリのDocument/Inboxフォルダに入ります。次いで、デリゲートメソッドが返った時に自動的に削除されます。

逆にいえば、転送先でファイルを保持したい場合は、意図的に保存する必要があります。

ディレクトリの確認を素早く

SimPholders 3.0(執筆時β版)を使うと、シミュレータのフォルダに素早くアクセスできます。watchOS、Sierra/Xcode 8にも対応しています。

Contribution

RealmデータをwatchOSとiOSとの間でやりとりする(3)への@n440さんの質問から生まれた記事です。ご質問ありがとうございます。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?