Fix: Target Overrides FRAMEWORK_SEARCH_PATHS Build Setting in CocoaPods

Fix: Target Overrides FRAMEWORK_SEARCH_PATHS Build Setting in CocoaPods

Written by

in

Quick answer: This error occurs when your Xcode target defines FRAMEWORK_SEARCH_PATHS without inheriting CocoaPods values. Fix it by setting ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to $(inherited) or adding $(inherited) to Runpath Search Paths in Build Settings, then run pod update.

Why this happens

When you migrate a project from Swift 2 to Swift 3 (or update CocoaPods), Xcode may write explicit FRAMEWORK_SEARCH_PATHS values into your target’s build settings. CocoaPods manages its own FRAMEWORK_SEARCH_PATHS via the generated Pods-<Target>.debug.xcconfig and Pods-<Target>.release.xcconfig files. If your target overrides this setting without including $(inherited), CocoaPods cannot inject the paths it needs for pod frameworks, so it emits the warning:

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

The same message appears for the Release configuration. The root cause is a missing $(inherited) token in one of the search-path build settings that CocoaPods depends on.

How to fix it

1. Set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to $(inherited) (accepted answer)

This setting controls whether the Swift standard libraries are embedded in the app bundle. When set explicitly to YES or NO, it can cause Xcode to write a concrete FRAMEWORK_SEARCH_PATHS value. Switching it to $(inherited) lets the CocoaPods xcconfig drive the value.

  1. Open your project in Xcode and select the target (not the project) that appears in the error — e.g., MyShowGuide.
  2. Choose the Build Settings tab.
  3. In the search bar, type ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES.
  4. Double-click the value cell for Debug and Release (or the combined row) and replace the current value with $(inherited).
  5. Run pod update in Terminal.
pod update

The warning should disappear because the target now inherits the framework search paths from the CocoaPods configuration files.

2. Add $(inherited) to Runpath Search Paths (alternative fix)

If the first method doesn’t clear the warning, the override may be coming from LD_RUNPATH_SEARCH_PATHS (shown as Runpath Search Paths in the UI). CocoaPods also manages this setting.

  1. In the same Build Settings tab, search for Runpath Search Paths (LD_RUNPATH_SEARCH_PATHS).
  2. Double-click the value field for each configuration (Debug, Release).
  3. Click the + button and add $(inherited) as a new line.
  4. Choose Product → Clean Build Folder (⇧⌘K).
  5. Run pod update again.
pod update

This ensures the linker search paths include the CocoaPods-supplied entries.

3. Remove the explicit FRAMEWORK_SEARCH_PATHS entry (last resort)

If neither of the above works, inspect the Framework Search Paths (FRAMEWORK_SEARCH_PATHS) setting directly:

  1. Search for Framework Search Paths in Build Settings.
  2. If you see explicit paths (not $(inherited)), select each one and press Delete to remove them, leaving only $(inherited) or an empty list.
  3. Clean the build folder and run pod update.

Note: Deleting explicit paths is safe only if you don’t have custom framework locations outside CocoaPods. Most projects should rely entirely on $(inherited).

How to prevent it

  • Always use $(inherited) for search-path settings (Framework Search Paths, Header Search Paths, Library Search Paths, Runpath Search Paths) in targets that use CocoaPods.
  • Avoid manually editing FRAMEWORK_SEARCH_PATHS or LD_RUNPATH_SEARCH_PATHS in the target; let the Pods xcconfig files manage them.
  • After major Swift/Xcode migrations, run pod deintegrate && pod install to regenerate clean integration files.
  • Keep CocoaPods updated (sudo gem install cocoapods) so its xcconfig templates match the current Xcode version.

FAQ

Why does the error mention both Debug and Release configurations?

CocoaPods generates separate xcconfig files for each configuration (Pods-<Target>.debug.xcconfig and .release.xcconfig). If your target overrides the setting in either configuration, you get a warning for that configuration. Apply the fix to both.

Can I just ignore the warning?

Ignoring it risks missing frameworks at runtime because CocoaPods cannot guarantee its frameworks are in the search path. The app may crash on launch with dyld: Library not loaded for pod frameworks.

Does this happen with Swift Package Manager too?

No. Swift Package Manager integrates via Xcode’s native package graph and does not use xcconfig files for search paths. This issue is specific to CocoaPods integration.

Sources & credits

Parts of this guide are adapted from content licensed under CC BY-SA 3.0; this article is shared under the same license.