Getting current working directory from a Sandboxed command-line app
问题 I'm now trying to sandbox my command-line app which is written in Objective-C. Issue When the app was not sandboxed, I could get the directory where the user invoked the app using [[NSFileManager defaultManager] currentDirectoryPath] . However, after sandboxing, the app always returns for current directory /Users/{MY_ACCOUNT}/Library/Containers/{BUNDLE_IDENTIFIER}/Data no matter from where the command-line app was invoked. Example Code Actually, I wanna know the absolute path to the files