Friday, 15 May 2015

cocoa - Easiest way to run shell script objective-c -


I'm an Objective-C Newboy and I am thinking that the purpose-how easy it is to run a shell script. I do not care about any output I have tried system (), exec () and execl () and a nastask they do not work for some reasons ... it is i trying to run the shell script I:

  "mount_webdav http://idisk.mac.com/idisk_username/ / version / Idisk_username"  

(Basically my iDisk mounting ) In addition, no password shows any sign of the box or its work. It will work in applescript, and I have created a mount point directory. None of the above methods do anything, or crashes the application for some strange reasons.

Whatever you need. This should work:

  NSArray * args = [NSArray arrayWithObjects: @ "http://idisk.mac.com/idisk_username/", @ "/ version / IDIsk_username", zero]; NSTask * Mountcash = [[Nstek Allok] Init]; [Mount Task Set Launchpath: @ "/ SBI / Mount Vaidad"]; [Mount task launch];  

Test all full command paths and arguments from the command line. I have not used mount_webdav but I think it requires more logic than you supplied.


No comments:

Post a Comment