I'm using Watch Connectivity to transfer files from the Watch to its paired iOS device. File transfer is successful in my first tests, but obviously I need to erase the source file when it is - successfully - sent.
When should I do that?
- just after initiating the file transfer, using
transferFile(file: NSURL, metadata: [String : AnyObject])
when getting the returnedWCSessionFileTransfer
? - when getting the callback
func session(_ session: WCSession, didFinish fileTransfer: WCSessionFileTransfer
? --> but will the callback always be called, even if the transfer finishes while the app is in background? - some other time?
NB: I'd really want to avoid implementing a custom 'ack' system, thus not using any user info/application context transfer.