Global import for Swift CocoaLumberjack

I configured CocoaLumberjack properly using the swift pod.

And I can log whatever:

  • CocoaLumberjack in Swift, how to print line number and filne name
  • DDLogVervose("")

    But I have to in every class to use it:

    import CocoaLumberjack

    Isnt there a way that I can globaly import ?

    Solutions Collect From Internet About “Global import for Swift CocoaLumberjack”

    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.