I got several warnings like these:
Swift compiler warning:
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
/Myfolder/Pods/Headers/CocoaLumberjack/DDLog.h:176:9: 'LOG_INFO' macro redefined
/Myfolder/Pods/Headers/CocoaLumberjack/DDLog.h:177:9: 'LOG_DEBUG' macro redefined
The warning complains about DDLog.h in the Projet-Bridging-Header.h
#import "DDLog.h"
#import "DDASLLogger.h"
#import "DDTTYLogger.h"
How can I get around this issue?
The problem is that Swift automatically imports syslog.h
, which defines constants with the same name.
If your Swift code doesn't need the syslog constants, you should be able to undefine them before importing DDLog.h
to get rid of the warning.
#undef LOG_INFO
#undef LOG_DEBUG
#import "DDlog.h"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With