Hi!
We sell books as IAPs in our app 'Little Stories.' Very few users can't download them after making a purchase. They get this error:
“CFNetworkDownload_vHWw1E.tmp” couldn’t be moved because you don’t have permission to access “LittleStoriesDownloads”.
This happens at the moment when the app tries to move downloaded files in the directory:
file:///private/var/mobile/Containers/Data/Application/35C34F6A-EC7F-4787-BFE3-14C90A661249/tmp/LittleStoriesDownloads
Affected iOS: 10.2 - 11.2
Who knows why this is happening?
Hi, I met such issue when used 'NSTemporaryDirectory' on iOS. Was unable to reproduce on my devices in bebug, but saw it in logs from users.
1. Recomended method of NSFileManager was not sutable for me. Even if it was ok to lost file between starts, I would like to save path between starts, to not download again, since it file from background session and big one.
2. '
func url(for directory: Bool) throws -> URL
' recreate folder again and again on every run. Which means that I can't delete it manually. 3. At the same time file temporal, after processing archive I need delete it.
After all of these, I decided to use cache folder, even while file really tmp and for one processing. After these changes issue disappears, recomend you to do the same!