MATLAB: Matlab standalone application default directory is cache directory

current working directorystandalone application; cache

I have developed an application on Mac OSX 10.9.5 which requires reading and writing files to directory relative to current directory. When i built a standalone application i find that the current directory is some cache directory. so all read and writes are relative to that directly. How do i set working directory? Can I have an interface to define the directories.

Best Answer

OS-X graphics apps do not really have a "current" directory at start time, in useful sense. They are started from the desktop or one of the explorer windows, and so are independent of any "current" directory that user might have -- the user might have a number of different "current" directories in different windows the user has open.
OS-X non-graphics apps that are started from the command line might have a meaningful "current" directory, since they would have to be started from a shell: is that a situation relevant to you?
Related Question