Home > Mobile >  Xcode unit test shows 'No such module <project name>' but it can run?
Xcode unit test shows 'No such module <project name>' but it can run?

Time:12-09

I create an application with multiple build config, bundle id, and product name. I can run the unit test but in the unit test code, there is an error shows No such module 'ProjectName' like in the picture below. Still, it can run the unit test and the test is passed as well. It can't use the auto complete, though.

I have cleaned the build folder and restart the Xcode but it's not work.

It shows No such module 'ProjectName' but it still can run

I don't know what's going on. Could someone give me some workaround?

CodePudding user response:

just try to clean and restart Xcode it will work properly

CodePudding user response:

  1. Delete derived data https://programmingwithswift.com/delete-derived-data-xcode/
  2. Clean the project with cmd k
  3. Build and re-run the unit tests with cmd u
  • Related