我想使用终端在 Instrument for Memory Leak 和 object Allocation 中运行我的 iPad 应用程序。
我也做过护目镜。我知道如何使用以下命令打开终端:
open /Developer/Applications/Instruments.app
我也尝试过以下命令。
instruments -t "/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Leaks.tracetemplate" -/Users/iOSRider/Downloads/samplecode/build/Release-iphoneos/sample.app
但我收到以下错误:
`-[NSAlert alertWithError:] called with `nil NSError.
将显示一般错误消息,但用户应该得到更好的。
然后我试过了
instruments -w "cd73f2aadff0726a923b22bc69fdca4420f08ffb" -t "/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Leaks.tracetemplate" -/Users/iOSRider/Downloads/samplecode/build/Release-iphoneos sample.app
但我收到以下错误:
Instruments Trace Error : Failed to start trace.
我也尝试过以下命令
instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate /Users/iOSRider/Library/Developer/Xcode/DerivedData/sample-ejuawqyrosinegcnvzhyrjhxkyue/Build/Products/Debug-iphonesimulator/sample.app
但我现在收到新错误
Instruments Trace Error : Failed to start trace.
iOSTeam:~ iOSRider$
iOSTeam:~ iOSRider$ instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate /Users/iOSRider/Library/Developer/Xcode/DerivedData/sample-ejuawqyrosinegcnvzhyrjhxkyue/Build/Products/Debug-iphonesimulator/sample.app
2013-06-27 17:02:44.103 instruments[15986:1603] -[NSAlert alertWithError:] called with nil NSError. A generic error message will be displayed, but the user deserves better.
2013-06-27 17:09:03.530 instruments[15986:7877] Connection peer refused channel request for "com.apple.instruments.server.services.processcontrol"; channel canceled <DTXChannel: 0x7fde6dbc2390>
2013-06-27 17:09:03.530 instruments[15986:7877] Connection peer refused channel request for "com.apple.instruments.server.services.capabilities"; channel canceled <DTXChannel: 0x7fde6db89130>
2013-06-27 17:09:03.530 instruments[15986:7877] Connection peer refused channel request for "com.apple.instruments.server.services.processcontrol.posixspawn"; channel canceled <DTXChannel: 0x7fde6dbc2a50>
2013-06-27 17:09:03.531 instruments[15986:7877] Connection peer refused channel request for "com.apple.instruments.server.services.filebrowser"; channel canceled <DTXChannel: 0x7fde6dbb8da0>
2013-06-27 17:09:03.531 instruments[15986:7877] Connection peer refused channel request for "com.apple.instruments.server.services.deviceinfo"; channel canceled <DTXChannel: 0x7fde6db8ead0>
2013-06-27 17:09:03.531 instruments[15986:7877] Connection peer refused channel request for "com.apple.instruments.server.services.launchdaemon"; channel canceled <DTXChannel: 0x7fde6dbc3740>
2013-06-27 17:09:03.532 instruments[15986:7877] Connection peer refused channel request for "com.apple.instruments.server.services.wireless"; channel canceled <DTXChannel: 0x7fde6dbbcfb0>
2013-06-27 17:09:03.532 instruments[15986:7877] Connection peer refused channel request for "com.apple.instruments.server.services.mobilenotifications"; channel canceled <DTXChannel: 0x7fde6dbbe050>
我想从 Jenkins 运行 Instruments,这就是我在终端测试的原因。
我正在使用带有 iOS 6.1.3 的 iPad 2。如果它也适用于模拟器,我没问题。
如果我犯了任何错误,请指导我。