Xcode 9.1では、ユニットテストターゲットを古いプロジェクトに追加しました。テストを実行できません。全出力、それは現在のアーキテクチャのバージョンが含まれていないため、バンドル「XXXTestsは」ロードできませんでしたXCTest、テストバンドルのロードに失敗しました。テスト起動時にクラッシュする
*
:
コンソールで次のエラーで起動時にターゲットがクラッシュ2017-11-15 11:52:40.973 XXX[54962:16511010] Failed to load test bundle from file:///Users/XXX/Library/Developer/Xcode/DerivedData/XXX-gaxtmzjadfkxzsdciqnpmyczgntj/Build/Products/DEV-iphonesimulator/XXX.app/PlugIns/XXXTests.xctest/: Error Domain=NSCocoaErrorDomain Code=3585 "dlopen_preflight(/Users/XXX/Library/Developer/Xcode/DerivedData/XXX-gaxtmzjadfkxzsdciqnpmyczgntj/Build/Products/DEV-iphonesimulator/XXX.app/PlugIns/XXXTests.xctest/XXXTests): no suitable image found. Did find: /Users/XXX/Library/Developer/Xcode/DerivedData/XXX-gaxtmzjadfkxzsdciqnpmyczgntj/Build/Products/DEV-iphonesimulator/XXX.app/PlugIns/XXXTests.xctest/XXXTests: mach-o, but wrong architecture" UserInfo={NSLocalizedRecoverySuggestion=Try installing a universal version of the bundle., NSFilePath=/Users/XXX/Library/Developer/Xcode/DerivedData/XXX-gaxtmzjadfkxzsdciqnpmyczgntj/Build/Products/DEV-iphonesimulator/XXX.app/PlugIns/XXXTests.xctest/XXXTests, NSLocalizedFailureReason=The bundle doesn’t contain a version for the current architecture., NSLocalizedDescription=The bundle “XXXTests” couldn’t be loaded because it doesn’t contain a version for the current architecture., NSDebugDescription=dlopen_preflight(/Users/XXX/Library/Developer/Xcode/DerivedData/XXX-gaxtmzjadfkxzsdciqnpmyczgntj/Build/Products/DEV-iphonesimulator/XXX.app/PlugIns/XXXTests.xctest/XXXTests): no suitable image found. Did find: /Users/XXX/Library/Developer/Xcode/DerivedData/XXX-gaxtmzjadfkxzsdciqnpmyczgntj/Build/Products/DEV-iphonesimulator/XXX.app/PlugIns/XXXTests.xctest/XXXTests: mach-o, but wrong architecture, NSBundlePath=/Users/XXX/Library/Developer/Xcode/DerivedData/XXX-gaxtmzjadfkxzsdciqnpmyczgntj/Build/Products/DEV-iphonesimulator/XXX.app/PlugIns/XXXTests.xctest}
(そして、私は含まれていませんでしたし、いくつかの診断出力)私は広範囲にグーグルで後にチェックした
スタッフ:
アクティブアーキテクチャのみ設定はアプリとテストターゲット間で一貫性のある- ビルド(はいの値付)
- は、テスト容易を有効にするメインターゲット
- のためにYesに設定されている私は、ターゲットを削除しました以上、運が始まった
どうすれば修正できますか?
テストバンドルの「有効なアーキテクチャ」とは何ですか?私はそれと "Build Active Architecture Only"の共通点が空であるかどうか疑問に思います。 –