Home and Document directory

How to get User home directory and Document directory?

Home

NSString *home = NSHomeDirectory();  

You can get home directory ~/ path

Documents

NSString *doc = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];

stringByAppendingPathComponent is to add path separator for Mac OS.

Document code works for iOS too.