CocoaPod ‘target overrides the’ OTHER_LDFLAGS ‘… The solution of

Time:2019-10-23

Introduce AFNetworking into the project today.
The content of the Podfile

platform :ios, '7.0'
pod "AFNetworking", "~> 2.0"

A mistake has occurred

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

  • Remove the build settings from the target.

    
    [!] The `AllBlue [AutoDebug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.autodebug.xcconfig'. This can lead to problems with the CocoaPods installation
  • Use the $(inherited) flag, or

  • Remove the build settings from the target.

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

  • Remove the build settings from the target.

    
    [!] The `AllBlue [AutoRelease]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.autorelease.xcconfig'. This can lead to problems with the CocoaPods installation
  • Use the $(inherited) flag, or

  • Remove the build settings from the target.

    The coat is the target setting that overrides the pod setting.

This warning will cause an error when the code is compiled

library not found for -lPods

Solution:
Add $(inherited) to Build Settings -> Other linker flags

Run after the addition is complete

pod update

Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Using AFNetworking (2.6.3)

Warning gone!!!

Recommended Today

How to check the package according to the command in CentOS

In our work, we often encounter that we want to use a command machine that is not installed, but we don’t know which package the command is in (source compilation is not covered in this article). Here is a rather stupid method to help us solve this problem. Explain:Blue = command name Light green = […]