2017-04-21 10 views
0

なぜレポートFBSnapshotTestCase image not found while running Xcode testが発生しないのですか?Xcodeテストの実行中にFBSnapshotTestCaseイメージが見つかりません

FBSnapshotTestCaseをリンクしようとしましたが、同じエラーが表示されました。

私はこれに精通していません、誰でも助けることができますか?少し早いですがお礼を。

を、プロジェクトのルートに依存関係をインストールするための

  1. (オプション)実行carthage bootstrapをナビゲートhttps://github.com/danielgindi/Charts

    からプロジェクトをダウンロードしてください:再現する

    。プロジェクトには依存関係チェックがあるので、これを実行しないと、テストを起動するときにプロジェクトが実行されます。

  2. は 'Charts.xcodeproj' -scheme 'ChartsTests' - 配置 'デバッグ' -sdk iphonesimulator -destination ID = 'E40B5365-EF82-430D-A767-2A37995CCEE1' クリーンビルド-Project

    xcodebuildを入力します。試験

宛先IDは、マシン上のシミュレータのUUIDとすることができます。

そして、それが報告されます。

2017-04-20 13:47:57.611 xctest[90924:13099756] The bundle “ChartsTests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle. 
2017-04-20 13:47:57.611 xctest[90924:13099756] (dlopen_preflight(/Users/user/Library/Developer/Xcode/DerivedData/Charts-ambsdrskvocwekcmoobyhanaiixm/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/ChartsTests.xctest/ChartsTests): Library not loaded: @rpath/FBSnapshotTestCase.framework/FBSnapshotTestCase 
    Referenced from: /Users/user/Library/Developer/Xcode/DerivedData/Charts-ambsdrskvocwekcmoobyhanaiixm/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/ChartsTests.xctest/ChartsTests 
    Reason: image not found) 
2017-04-20 13:47:57.625 xcodebuild[90311:13086990] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted} 

Testing failed: 
    Test target ChartsTests encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted) 
** TEST FAILED ** 

答えて

0

それは私がフレームワークをコピーするビルドフェーズで実行スクリプトを追加し、カルタゴを聞かせする必要が判明:

コピーhttps://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchosから:

アプリケーションでターゲット "ビルドフェーズ"設定タブで、 "+"アイコンをクリックし、 "新しい実行スクリプトフェーズ"を選択します。あなたのシェル(例:/ binに/ SH)を指定したスクリプトの実行を作成し、シェル以下のスクリプトエリアに以下の内容を追加します。

/usr/local/bin/carthage copy-frameworks 

、あなたが下に使用するフレームワークにパスを追加「入力ファイル」:

$(SRCROOT)/Carthage/Build/iOS/FBSnapshotTestCase.framework 
関連する問題