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

后端 未结 30 1465
春和景丽
春和景丽 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

    I tried all the answers here but the red flag would not go away. But I got it to work by just "running" an empty test regardless and it cleared up.

    Things I would like make sure are done:

    • Host Application
    • @testable import "Module_name" (make sure the module name is correct)
    • Make sure you deployment target for the test is the same as the project
    • XCTest does not need to have Target membership

提交回复
热议问题