Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode : module name "" is not a valid identifier while running XC unit test

Trying to run XCTest with my CocoaPods set up using SDWebImage, and I can only see this error as below. Any suggestions?

:0: error: module name "" is not a valid identifier Command /Applications/Xcode8.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

But as soon as I edit the scheme and uncheck the test inside the builds, I am able to run the app on simulator but can't run the tests.

like image 802
Max Avatar asked Jul 24 '17 20:07

Max


1 Answers

Always make sure all your test targets has the PRODUCT_MODULE_NAME set to $(PRODUCT_NAME)

like image 157
Max Avatar answered Sep 24 '22 17:09

Max