How to run a command in terminal from my Cocoa app?
问题 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)" ""