5

次のコマンドを使用して、デバイス (シミュレーターではない) で 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

10回のうち6回は機能しています。エラーの場合、次のメッセージが表示されます。

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 回以上アプリを起動しようとしましたが、エラー パターンを分析できません。デバイスのクラッシュログには次のように記載されています。

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)は、アクセスされているオブジェクトがすでに解放されていることを示します。ASIGSEGVはセグメンテーション違反です。つまり、無効なメモリ アドレスにアクセスしようとしています。参照: iOS クラッシュ ログの例外の種類

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)
  • デバイスの種類: iPhone 5 - 6.1.3、iPhone 5C - 7.02、iPhone 5S - 7.0.2

楽器がデバイスでアプリを起動できない場合や、エラーメッセージが表示される場合の詳細情報はありますunable to locate CFBundleIdentifier for path: LPSimpleExample-calか?

4

2 に答える 2

0

Jenkins で Calabash を使用していますか?

インスツルメントがデバイス上でアプリを起動できない場合や、パス: LPSimpleExample- calの CFBundleIdentifier が見つかりませんというエラー メッセージが表示されるのはいつですか?

Jenkins で Calabash を使用する際に問題が発生しましたが、それを解決するのに役立ったのは、app フォルダー (xcodeproj がある場所) でインストゥルメント (calabash) を起動することでした。ビルドされたアプリをこのフォルダーにコピーすることを忘れないでください。

質問に答えていない場合はご容赦ください。

于 2014-03-10T14:58:07.143 に答える