我正在尝试使用深圳脚本生成 IPA:https ://github.com/nomad/shenzhen
这是我目前拥有的代码:
-(void)startBuildIPAForProject:(NSString*)path
{
task = [[NSTask alloc] init];
[task setLaunchPath:@"/bin/bash"];
[task setCurrentDirectoryPath:path];
[task setArguments:@[@"ipa build",@"-c",@"Release"]];
NSPipe *pipe;
pipe = [NSPipe pipe];
[task setStandardOutput: pipe];
NSFileHandle *file;
file = [pipe fileHandleForReading];
[task launch];
NSData *data;
data = [file readDataToEndOfFile];
NSString *string;
string = [[NSString alloc] initWithData: data
encoding: NSUTF8StringEncoding];
NSLog(@"task output: %@",string);
[task waitUntilExit];
}
执行 [task launch] 时,我从控制台获得以下输出:
/bin/bash: ipa build: No such file or directory
当我使用常规终端时,ipa build 正在工作(也就是说,它告诉我当前目录中不存在 Xcode 项目)
我有点迷茫,所以非常感谢任何帮助。