ios中在写framework 需要测试 但是运行测试提示test failed,并且报下面的错误
2016-07-06 20:46:12.977 xctest[32953:2574013] The bundle “XXXsdkTests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
2016-07-06 20:46:12.978 xctest[32953:2574013] (dlopen_preflight(/Users/lsq/Library/Developer/Xcode/DerivedData/XXXsdk-flllbifcyllkdmbebspheywtslcv/Build/Products/Debug-iphonesimulator/XXXsdkTests.xctest/XXXsdkTests): Library not loaded: @rpath/ploarsslFramwork.framework/ploarsslFramwork
Referenced from: /Users/lsq/Library/Developer/Xcode/DerivedData/XXXsdk-flllbifcyllkdmbebspheywtslcv/Build/Products/Debug-iphonesimulator/XXXsdk.framework/XXXsdk
Reason: image not found)
Program ended with exit code: 82
最终解决方法:
选择项目-》xxxTests-》Build Phases-》点+ -》添加 copy files-》选择Destination为Frameworks-》选择自己需要添加的framews
然后再测试就可以通过了
参考:http://blog.csdn.net/u010696783/article/details/47778881

本文解决了iOS开发中测试Framework时出现的加载失败问题。错误提示表明测试Bundle损坏或缺失必要资源,及引用的Framework未找到。解决方案是在Build Phases中添加Copy Files步骤,并将所需Framework复制到Frameworks目录。

6165

被折叠的 条评论
为什么被折叠?



