Returns the path to either the user’s or application’s home directory, depending on the platform.
- iOS 2.0+
- macOS 10.0+
- tvOS 9.0+
- watchOS 2.0+
The path to the current home directory..
In iOS, the home directory is the application’s sandbox directory. In macOS, it is the application’s sandbox directory or the current user’s home directory (if the application is not in a sandbox)
For more information on file-system utilities, see Low-Level File Management Programming Topics.