2013-10-08 36 views
5

我使用以下命令(應用程序已安裝)在設備(不是模擬器)上啓動我的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

+0

我有類似的問題,讓我知道如果你得到任何地方http://stackoverflow.com/questions/19234031/launching-xcode-4-instruments-not-the-xcode-5-version-for-uiautomation – Jules

+0

我會告訴你。你的stackoverflow帖子不再公開了。 –

回答

0

你是否在與Jenkins一起使用葫蘆?

具有這樣的情況下儀器無法在設備上或啓動應用的人的更多信息>當你收到此錯誤信息無法找到CFBundleIdentifier的路徑: LPSimpleExample- CAL

我對詹金斯用葫蘆問題,什麼幫我解決這個問題是在app文件夾啓動儀器(葫蘆)(那裏是xcodeproj。)別忘了到建造應用程序複製此夾。

請原諒我,如果我不回答這個問題。

0

我試圖在連接到服務器主機的iDevice上的Xcode Server的控制下運行iOS應用程序時出現此問題。但是,該應用程序從未安裝在目標iDevice上。我只能猜測,錯誤消息

instruments ... unable to locate CFBundleIdentifier for path: ... 

其實就是指的iDevice的文件系統(如該應用程序是不存在的),儘管該事實錯誤信息報告在Xcode服務器的文件系統路徑主辦。在我使用我的開發機器手動將應用程序安裝到目標設備上之後,服務器主機上的錯誤消息就消失了,儀器又重新開始工作。

我的結論是,Xcode服務器(和/或儀器?)的錯誤信息是非常糟糕的。當你有這樣的錯誤信息時,誰需要敵人?