I get duplicate symbols error after I updated my Xcode
. (find the code down) Does anybody get this too? And how could be solved?
I tried to remove
for my case, Xcode 9 , we were declaring constants in some header file
Constants.h
static NSString *const kSomeString = @"SomeString";
so importing Constants.h in multiple .m files causes the duplicated symbols
Solution:
Constants.h
extern NSString * const kSomeString;
Constants.m
NSString *const kSomeString = @"SomeString";