Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone SDK Get tmp directory

How do i get the tmp directory on the iPhone or iPad?

if i use NSTemporaryDirectory() to create a file it does not save to the simulator temp directory.

like image 248
Aran Mulholland Avatar asked Jun 06 '10 04:06

Aran Mulholland


1 Answers

As drawnonward said correctly in a comment

"NSTemporaryDirectory() will do the right thing on a device."

and thats true...

EDIT: Apparently there may be a problem with this approach on later Os's (>6.1.3), maybe try the NSCachesDirectory instead of the tmp directory.

like image 104
Aran Mulholland Avatar answered Sep 21 '22 23:09

Aran Mulholland