Xcode - Test class File is part of module, ignoring import

前端 未结 3 946
鱼传尺愫
鱼传尺愫 2020-12-24 05:35

So I have an iOS project with tests and everything was working properly.

I felt the need to change the project name. I did as indicated at apple\'s docs, selected t

3条回答
  •  没有蜡笔的小新
    2020-12-24 06:00

    This is a directly parallel solution to Jean-Frederic Plante, though in my case the problem was not that my test target name matched my primary target, but rather that the module of the test target had incorrectly been set to match the module name of the main app target. To correct either of these issues:

    • Select your test target in your project.
    • Navigate to Build Settings > Packaging.
    • Ensure both the Product Module Name and Product Name are set to $(TARGET_NAME).

提交回复
热议问题