I'm using the UIDocumentInteractionController
with a temporary file that resides in my cache after having downloaded it. I'm using a quite simple class that delivers md5-cache
file names (ext = cache) to my app and the downloaded file is in this format. The reason is to have files locally and to only download them once (a session). Since the cache names are in a uniform format I can easily clean them up.
Now with UIDocumentInteractionController
I need to rename these files back to their original name or they will not get recognized correctly.
When the UIDocumentInteractionController
finishes handing off the file I thought to move the file back to its cache file name. The problem is, the method: - documentInteractionController:didEndSendingToApplication:
never gets called - though the delegate is set correctly.
How I basically set up the controller:
interactionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:temporaryFile]];
interactionController.delegate = self;
interactionController.annotation = [cacheURLString lastPathComponent]; // original name to move back to
Any suggestions on how to correctly find out that a file has been handed over to another application / or the UIDocumentInteractionController
has been dismissed?