私はcycriptコマンドを実行しようとしていますが、私のツールからcycriptによって返された結果を取得しようとしています(これはtheosによってジェイルブレイクされたiPhoneで実行されています)? しかし、ここでの問題は、cycript がメイン スレッドを使用していて、ツールがそこにハングアップしているように見えることです。とにかくこれを達成することはありますか?これは私がそれをテストするために使用している私のコードです:
-(NSString*)getTestCycript:(NSString*)appname {
@try {
NSLog(@"Executing command...");
NSString *command = [[[NSString alloc] init] autorelease];
NSString *result = [[[NSString alloc] init] autorelease];
command = [NSString stringWithFormat:@"cycript -p %@", appname];
result = [self runCommand:command];
command = [NSString stringWithFormat:@"UIApp.keyWindow.recursiveDescription().toString()"];
result = [self runCommand:command];
return result;
}
@catch (NSException * e) {
}
}