当我用 slather 运行我的测试项目时,我得到了这个日志 有人有解决办法吗?
2015-12-14 14:39:29.483 xctest[7880:987585] The bundle “Famima_StampTests.xctest” couldn’t be loaded. Try reinstalling the bundle. 2015-12-14 14:39:29.484 xctest[7880:987585] (dlopen(/Users/wx/Library/Developer/Xcode/DerivedData/Famima_Stamp-akiykixzlljhyegfebcgflamfzgb/Build/Intermediates/CodeCoverage/Famima_Stamp/Products/Debug-iphonesimulator/Famima_StampTests.xctest/Famima_StampTests, 265): Symbol not found: _OBJC_CLASS_$_AgreementViewController
Referenced from: /Users/wx/Library/Developer/Xcode/DerivedData/Famima_Stamp-akiykixzlljhyegfebcgflamfzgb/Build/Intermediates/CodeCoverage/Famima_Stamp/Products/Debug-iphonesimulator/Famima_StampTests.xctest/Famima_StampTests Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/xctest in /Users/wx/Library/Developer/Xcode/DerivedData/Famima_Stamp-akiykixzlljhyegfebcgflamfzgb/Build/Intermediates/CodeCoverage/Famima_Stamp/Products/Debug-iphonesimulator/Famima_StampTests.xctest/Famima_StampTests) Program ended with exit code: 83
最佳答案
我解决了这个问题,就像我解决了大部分 XCode 问题一样:
- 删除
DerivedData
中的项目文件(Xcode>Preferences>Locations>DerivedData→
在 finder 中跳转到那里) 产品>清洁
- (按住 alt 键)
Product>Clean Build Folder
- 退出 XCode
- 重启 XCode
- 从您的设备/模拟器中删除您的应用
再试一次。 如果它仍然不起作用,请使用另一个模拟器/设备运行几次。迟早它会在原来的那个上再次工作。
关于ios - 代码覆盖率数据生成失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34261133/