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 User170208-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 !

Can you answer this question?


Answer

1 Answers

Liked By