Details are important.
This code:
Code:
NSString *oString = @"-o ";
NSString *poolString = [oString stringByAppendingString:asicPoolView.stringValue];
NSString *uString = @"-u ";
NSString *userString = [uString stringByAppendingString:asicUserView.stringValue];
is inconsistent with this "shell script":
Code:
/Applications/MacMiner.app/Contents/Resources/asicminer/bin/bfgminer -ostratum.bitcoin.cz:3333 -uuser -ppass -S /dev/cu.usbserial-FTWILFLM
Note that the Obj-C code is putting a space between each option (e.g. -o) and its following param. Then notice that the "shell script" has no spaces between any option and its following param.
As I previously noted, some programs accepts options-with-params in the form "-Oparam" (i.e. a single concatenated string, where O is a single option-character). If the shell script is actually as posted, then somehow you've done something that removes the spaces, thus potentially making the args acceptable to the child process. Or maybe what you posted wasn't exactly what the shell got. Hard to say without seeing the actual shell script file, with no alterations that might occur from copy/paste (i.e. zip it and attach to a post).
I don't know if your 'bfgminer' actually accepts args like "-Oparam" or not. That's one reason I suggested writing a specific test program, so you can more easily inspect exactly what's happening, i.e. debug it.
If you want to find out exactly what args are being given to a program, you need to run a program that tells you those args, exactly Debugging is the process of confirming an expectation. You have an expectation, so do something to confirm it. Guessing is guessing, not confirming.
If you're wondering why the shell would split strings at spaces into separate args, that's its job. It takes a command-line with spaces, quoting, etc., performs various substitutions and parsing, then passes the parsed and split args to another program. Again, a simple command-line tool written in C would do wonders at illustrating the net result of what the shell does before running the program.