Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // SAURIKS VERSION (not working, but works of I setLaunchPath as "/usr/bin/curl" and its respective args)
- function parse1() {
- var task = [new NSTask init];
- [task setLaunchPath:"/usr/bin/symbolicate"];
- [task setArguments:["/var/root/LatestCrash.plist"]];
- var pipe = [NSPipe pipe];
- [task setStandardOutput:pipe];
- [task launch];
- return [new NSString initWithData:[pipe.fileHandleForReading readDataToEndOfFile] encoding:1];
- }
- // MY VERSION (not working, but works of I setLaunchPath as "/usr/bin/curl" and its respective args)
- function parse2() {
- var task = [[[NSTask alloc] init] autorelease];
- var pipe = [NSPipe pipe];
- task.launchPath = "/usr/bin/symbolicate";
- task.arguments = Array("/var/root/LatestCrash.plist");
- [task setStandardOutput:pipe];
- [task launch];
- [task waitUntilExit];
- return [new NSString initWithData:[pipe.fileHandleForReading readDataToEndOfFile] encoding:1];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement