Xcode 10 Migration Error: Module name is not a valid identifier

Viewed 1104

After migrating to XCode 10, I am unable to build. I tweaked with Module name in Target build settings to fix something else but then changed it back to $(PRODUCT_NAME). But now this error:

 <unknown>:0: error: module name "MyApp-Swift" is not a valid identifier
 Command CompileSwiftSources failed with a nonzero exit code
1 Answers

Just ensure that no spaces or dashes and any other invalid characters appear in the product module name or product name under build settings. My name looked like this in Xcode when I migrated to Xcode 10 => "trans3 ". I changed it to "trans3" and it works.

Related