“No such module” when using @testable in Xcode Unit tests

后端 未结 30 1483
春和景丽
春和景丽 2020-12-02 05:33

I recently updated to Xcode 7 beta 5. I tried adding a unit test to an earlier project, but I am getting the error message \"No such module [myModuleName]\" on the @te

30条回答
  •  感情败类
    2020-12-02 05:47

    Environment: Xcode Version 9.0 (9A235)
    Scenario: Testing an open-source framework.

    I had the same problem: 'No such module'.

    Solution:

    1. Select the Test target.
    2. Select Build Phases
    3. Add the framework to be tested via Link Binary...

    Here's the test file:

提交回复
热议问题