Removing CocoaPods warnings during integration
When you are integrating the Connect SDK into your iOS app using CocoaPods, you may get a warning after running pod install.
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Backyard Birds to
Target Support Files/Pods-Backyard Birds/Pods-Backyard Birds.debug.xcconfigor include theTarget Support Files/Pods-Backyard Birds/Pods-Backyard Birds.debug.xcconfigin your build configuration (Configuration/SampleCode.xcconfig).
Here is another example from the same open-source iOS app we have tested.
[!] The Backyard Birds [Debug] target overrides the
LD_RUNPATH_SEARCH_PATHSbuild setting defined inPods/Target Support Files/Pods-Backyard Birds/Pods-Backyard Birds.debug.xcconfig. This can lead to problems with the CocoaPods installation.
Use the$(inherited)flag, or
Remove the build settings from the target.
Review the target settings
The first thing to do is to check your target settings for the $(inherited) flag as instructed in the warning message.
- Select the target and go to Build Settings > Linking - General.
- Check if Other Linker Flags has the
$(inherited)flag assigned.
- Check if Runpath Search Paths has the same flag.
Resetting build settings
If setting the $(inherited) flag didn't help, try the following:
- In the project navigator, select the root project directory.
- On the right, select the project (not a target) and remove all configurations.
- In the menu bar, select Product > Clean Build Folder.
- Remove podfile.lock from the root project directory.
- Run
pod installfrom the main project directory.
In most cases, the Pods are linked correctly after that.
Updated over 1 year ago
