DaveWoodCom / XCGLogger

A debug log framework for use in Swift projects. Allows you to log details to the console (and optionally a file), just like you would have with NSLog() or print(), but with additional information, such as the date, function name, filename and line number.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[fixed]static libraries support

AddIcechan opened this issue · comments

hope to support static libraries.
I use cocoapods v1.4, and my podfile support static libraries. when I install , it show like this.

The Swift podXCGLoggerdepends uponObjcExceptionBridging, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers!globally in your Podfile, or specify:modular_headers => truefor particular dependencies.

did you try pod 'XCGLogger', :modular_headers => true or pod 'XCGLogger', :modular_headers => false
or try
use_modular_headers!

I fixed it by add pod 'ObjcExceptionBridging', '~> 1.0.1', :modular_headers => true

Excellent, thanks for the update!

Yes, this issue can be fixed by using use_modular_headers! flag. But the CocoaPods docs suggest that the pod authors can add 'DEFINES_MODULE' => 'YES' to pod_target_xcconfig so that the pod consumers won't need to add any configuration settings.
It seems you just need to change this line to make everyone happy:
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '5.0','DEFINES_MODULE' => 'YES' }

what about if I don't want to migrate to swift 5.0 yet?