Global import for Swift CocoaLumberjack
问题 I configured CocoaLumberjack properly using the swift pod. And I can log whatever: DDLogVervose("") DDLogInfo("") But I have to in every class to use it: import CocoaLumberjack Isnt there a way that I can globaly import ? 回答1: The only "trick" to have it available in all your classes is to use a pch (precompiled header) and import CocoaLumberjack there. It's a header that gets imported in all your files. 来源: https://stackoverflow.com/questions/40568997/global-import-for-swift-cocoalumberjack