英文:
iOS Swift Missing Required Module LegacyCoreKit UnitTest XCTest
问题
I have issue with my UnitTest target.
When I try to run unit test I got error Missing required module 'LegacyCoreKit'
I have no idea what is this framework for. I can't find it in my project and I can't find it in Google.
Do you have any idea where to find this module or how to fix it?
I tried to find this module in Google but there is no sign of it.
英文:
I have issue with my UnitTest target.
When I try to run unit test I got error Missing required module 'LegacyCoreKit'
I have no idea what is this framework for. I can't find it in my project and I can't find it in Google.
Do you have any idea where to find this module or how to fix it?
I tried to find this module in Google but there is no sign of it
答案1
得分: 3
我能够解决这个问题。在我的情况下,这是因为SPM模块未添加到Tests
目标中,而这些模块被用于project
目标。
- 选择
Tests
目标 - 转到
Build Phases
(构建阶段) - 在“Link Binary with Libraries”(链接二进制文件与库)部分,添加在
project
目标中使用的所有模块
执行上述步骤后,使用Command + U
运行测试。它将成功。
英文:
I am able to resolve this issue. In my case, this was happening due to SPM modules were not being added in Tests
target which were being used in project
target.
- Select the
Tests
target - Go to
Build Phases
- In section
Link Binary with Libraries
, add all the modules which were used inproject
target
After performing the above mentioned steps, Run the Tests using Command + U
. It will be succeeded
答案2
得分: 0
我用"清理构建文件"解决了这个问题。
答案3
得分: 0
只需添加模块并将headers设置为true。
更新pod如下:
pod '需要添加的库', :modular_headers => true
英文:
You just need to add the modulars and set headers to true.
update pod like this,
pod 'LIBRARY WICH YOU NEED TO ADD', :modular_headers => true
答案4
得分: 0
在我的情况下,需要使用Firebase库、GoogleSignIn和FacebookSignIn来运行测试,所以我得到了'LegacyCoreKit'警告。我将这些库添加到TestTarget -> Build Phases,问题得以解决。
英文:
In my case Firebase libraries, GoogleSignIn and FacebookSignIn are required to run the tests, so I got the 'LegacyCoreKit' warning. I added these libraries to TestTarget -> Build Phases and the issue was solved.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论