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.
I don’t know what’s going on. Could someone give me some workaround?
Update
I found the solution. Just change the build scheme in Use [build scheme] for command-line builds
to your unit test build scheme test target at the project level on info tab. Then everything works fine.
3
Answers
I found the solution. Just change the build scheme in
Use [build scheme] for command-line builds
to your unit test build scheme test target at the project level on info tab. Then everything works fine.just try to clean and restart Xcode it will work properly