I'm using NSURLSession
to download a list of files in my app.I have support for background downloading and is working correctly.But some times when the WiFi connectivity is lost while the app is in background,some files remain in the temp directory(com.apple.nsnetworkd
) and is not getting removed.So when i download a new set of files these files still remains in the directory.This situation repeats on WiFi failures and the set of files keeps accumulating.Any way to solve this issue?
Will there be any problem if i try to remove these files manually?
If WiFi connection is active then everything works fine and tmp directory is cleared automatically.