''tmp' directory is too big in iOS
I made an app which is 40 MB (very big for me).
But the real surprise is that I found the tmp directory is 300 MB!
And I haven't saved any files in the document yet!
All the files' names in tmp are like:
stack-logs.80127.MyAppName.index
stack-logs.80163.MyAppName.vwnxgi.link
...
What are these things? They occupied an unbelievably 300 MB size!
Is there a way I can clear them periodically? Or is this because I'm debugging my app on my iPhone?
Solution 1:[1]
Edit you target scheme, and close Logging ? Malloc Stack. Uncheck it.
Solution 2:[2]
The NSTemporaryDirectory() function returns a path to the temporary directory for the current user (not just the application's), so these 300 MB are probably files from other applications using the temporary storage.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Peter Mortensen |
| Solution 2 | Peter Mortensen |
