I duplicated a target and get the following build error:
Resource/Prefix.pch:16:13: '<moduleName>-Swift.h' file not found
I can't see any difference between the two targets that would cause this problem.
Any ideas why this is happening?
The problem is that the duplicate target has a different moduleName
.
I had to add a C-flag in the duplicate target and use this in Prefix.pch
. (A User-Defined Setting doesn't get seen when parsing the pch file.)
#ifdef DEVLOPMENT_SERVER
#import "<duplicateModuleName>-Swift.h"
#else
#import "<moduleName>-Swift.h"
#endif