我使用以下命令(應用程序已安裝)在設備(不是模擬器)上啓動我的iOS應用程序。使用iOS儀器啓動應用程序不可靠
instruments \
-w c717fa22472d7b691ae5763af90e1e44244ad85a \
-t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate \
-D "/Users/mj/Desktop/apps/trace" \
LPSimpleExample-cal \
-e UIARESULTSPATH /Users/mj/Desktop/apps \
-e UIASCRIPT /Users/mj/Desktop/apps/_run_loop.js
6的10倍,它工作。在一個錯誤的情況下,我得到以下信息:
2013-10-07 16:45:51.553 instruments[9891:1207] unable to locate CFBundleIdentifier for path: LPSimpleExample-cal
2013-10-07 16:45:51.555 instruments[9891:1207] Recording cancelled : At least one target failed to launch; aborting run
Instruments Trace Error : Error Domain=com.apple.instruments Code=1 "Error Starting Recording" UserInfo=0x7faccbef8fa0 {NSLocalizedDescription=Error Starting Recording, NSLocalizedRecoverySuggestion=At least one target failed to launch; aborting run}
Instruments Trace Error : Failed to start trace.
對於我來說,它看起來是儀器有一個錯誤在這裏。我嘗試在不同情況下啓動應用100多次,並且我無法分析錯誤模式。設備crashlog說:
Process: DTMobileIS [34956]
Path: /Developer/Library/Daemons/DTMobileIS
Identifier: DTMobileIS
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: lockbot [34938]
Date/Time: 2013-10-07 15:29:05.474 -0700
OS Version: iOS 6.1.3 (10B329)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000
異常類型EXC_BAD_ACCESS (SIGSEGV)
表示正在訪問的對象已被釋放。 A SIGSEGV
是分段錯誤,意思是你正試圖訪問無效的內存地址。參考:Exception Types in iOS crash logs
除了使用bundleIdentifier的我也試圖指定完整的應用程序路徑或完整bundleIdentifier:
# with full app path
instruments \
-w c717fa22472d7b691ae5763af90e1e44244ad85a \
-t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate \
-D "/Users/mj/Desktop/apps/trace" \
/Users/mj/Desktop/apps/LPSimpleExample-cal.app \
-e UIARESULTSPATH /Users/mj/Desktop/apps \
-e UIASCRIPT /Users/mj/Desktop/apps/_run_loop.js
# with full bundleIdentifier
instruments \
-w c717fa22472d7b691ae5763af90e1e44244ad85a \
-t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate \
-D "/Users/mj/Desktop/apps/trace" \
/Users/mj/Desktop/apps/LPSimpleExample-cal.app \
-e UIARESULTSPATH /Users/mj/Desktop/apps \
-e UIASCRIPT /Users/mj/Desktop/apps/_run_loop.js
配置詳細
- 儀器版本:5.0(51166)
- XCode版本:5.0(5A1413)
- 設備類型:iPhon E(5) - 6.1.3,iPhone 5C - 7.02,iPhone 5S - 7.0.2
有沒有人在這情況下,儀器無法在設備上啓動應用或做當您收到錯誤消息的詳細信息unable to locate CFBundleIdentifier for path: LPSimpleExample-cal
?
我有類似的問題,讓我知道如果你得到任何地方http://stackoverflow.com/questions/19234031/launching-xcode-4-instruments-not-the-xcode-5-version-for-uiautomation – Jules
我會告訴你。你的stackoverflow帖子不再公開了。 –