I’m trying to use File::startAsProcess() to run a command line application that requires two parameters.
One of the parameters is a file path that will very likely include spaces, however passing in a String with spaces won’t be recognised as a single command line parameter and will cause errors. I’ve tried using the '\ ’ sequence as used within Terminal on OS X however this doesn’t solve anything.
How can I do this?
Also, a follow up question - when running a command line app this way it will return information into the console in Xcode. Is it possible to return this into a String variable so that I can use the data in some way, for example, display any errors to the user on my applications GUI?