cocoaPod 执行 pod install 时出现警告:The `XX [Release]` target overrides the `CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES` build setting defined in `xcconfig'.

发布时间 2023-12-28 13:53:36作者: ZachRobin

  最近执行 Pod install 安装命令时,控制台输出警告信息:

[!] The `XXX [Debug]` target overrides the `CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES` build setting defined in `Pods/Target Support Files/Pods-XXX/Pods-XXX.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `XXX [Release]` target overrides the `CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES` build setting defined in `Pods/Target Support Files/Pods-XXX/Pods-XXX.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] AFNetworking has been deprecated in favor of Alamofirey 

  产生警告的原因是:项目 Target 中的一些设置,CocoaPods 也做了默认的设置,如果两个设置结果不一致,就会造成问题。

  解决办法是,修改 Target Setting 中的配置为 $(inherited)