NSHomeDirectory()
Returns the path to either the user’s or application’s home directory, depending on the platform.
Declaration
func NSHomeDirectory() -> StringReturn Value
The path to the current home directory.
Discussion
In iOS, the home directory is the application’s sandbox directory. In macOS, it’s the application’s sandbox directory, or the current user’s home directory if the application isn’t in a sandbox.