forum

home / developersection / forums / best way to find the user's documents directory on an iphone

Best way to find the user's Documents directory on an iPhone

Anonymous User 1949 08-Sep-2015

I have read an iPhone book there i find the user's Documents directory is with the code:

[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];

 

but that seems slightly brittle, and dissimiliar to the normal Mac way of doing it, which would be:

NSSearchPathForDirectoriesInDomains(NSDocumentsDirectory, NSUserDomainMask, YES);

 

Is there any particular reasons to use one over the other?


Updated on 08-Sep-2015

I am a content writter !


Message
Can you answer this question?

Answer

1 Answers

Liked By