使用Pods IOS发布PubNub DDFileLogger和DDLog

Gui*_*uce 2 pubnub swift

安装PubNub与POD后,开始收到警告.在我将PubNub直接复制到项目并且没有得到警告之前.

有关如何摆脱这种警告的任何想法?

在此输入图像描述

Ser*_*tov 7

这是因为CocoaLumberjack没有遵循NS_DESIGNATED_INITIALIZER的要求,而最新的Xcode将其显示为警告(关于超类的-init).您可以修改Podfile并使用post install hooks来更新某些分析器标志以使此警告无声:

post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
        if target.name == "CocoaLumberjack"
          config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = 'YES'
        end
    end
end
Run Code Online (Sandbox Code Playgroud)

结束