The issue is that "clearTmpDirectory" method is getting called before you have sent it across via AirDrop as the completion handler is called the moment the activity view controller presents an Airdrop device selection view. Avoid clearing the temp directory immediately to fix the issue.