Users Pricing

forum

Home Forums Best way to find the user's Documents directory on an iPhone – MindStick

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

Anonymous User 2094 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?


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md