我有同样的问题,因为我想针对 iPhone Retina 3.5 英寸模拟器进行分析。作为一种解决方法,我在命令行中使用了 Instruments:
instruments -t $InstrumentsTemplate -w "iPhone Retina (3.5-inch) - Simulator - iOS 7.1" $AppLocation
$InstrumentsTemplate
您要与 Instruments 一起使用的分析模板的路径在哪里,在我的例子中是:
Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Time Profiler.tracetemplate
并且$AppLocation
是您要分析的应用程序的路径,如下所示:
~/Library/Application Support/iPhone Simulator/7.1/Applications/658FE3GB-49B6-48F5-B6A6-0D1C8D1F6BFD/AppName.app
要查看您可以-t
使用传递的所有 Instruments 模板的列表:
instruments -s
要查看您可以使用的所有可用模拟器的列表-w
:
instruments -s devices
希望这可以帮助。