Execute shell script from cocoa (obj.c) with response

前端 未结 4 1176
粉色の甜心
粉色の甜心 2021-01-06 04:57

I have something like:

- (NSString *)unixSinglePathCommandWithReturn:(NSString *)command
{
NSPipe *newPipe = [NSPipe pipe];
NSFileHandle *readHandle = [newPi         


        
4条回答
  •  执念已碎
    2021-01-06 05:23

    For different approaches to run shell scripts in Cocoa have a look at AMShellWrapper, PseudoTTY.app or OpenFileKiller!

    http://www.cocoadev.com/index.pl?NSTask

提交回复
热议问题