I want to use instrument to install the .app on my iOS simulator through my cocoa app.
This is my first time developing a cocoa app and also NSTask. NSTask requires a launch path which in my case is irrelevant as this command can be run from anywhere. This is the command i want to run:
instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -w "iPad Retina (7.1 Simulator)" ""
Currently i have this :
NSTask *task = [[NSTask alloc] init];
[task setLaunchPath:@"/"];
NSString * commandTorun = @"instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -w \"iPad Retina (7.1 Simulator)\" \"<path to .app>" ";
NSArray *arguments = [NSArray arrayWithObjects:
@"-t" ,
[NSString stringWithFormat:@"%@", commandTorun],
nil];
NSLog(@"Run command:%@",commandTorun);
[task setArguments:arguments];
[task launch];
Any help will be appreciated.
Thanks,