Use the inherited flag, or Remove the build settings from the target. CocoaPod Swift3 pod update error
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
This CocoaPods error usually means your Xcode target is overriding build settings that CocoaPods expects to manage through the generated .xcconfig files. The two standard fixes, adding $(inherited) or removing the manual override, are really the same fix from different angles: let the target inherit the settings supplied by CocoaPods instead of replacing them.
What the Error Is Actually Telling You
CocoaPods modifies build settings such as:
- '
OTHER_LDFLAGS' - '
FRAMEWORK_SEARCH_PATHS' - '
LIBRARY_SEARCH_PATHS' - sometimes Swift-related settings depending on pod integration
If your target defines one of those settings explicitly without $(inherited), Xcode treats the target value as an override. That can block the pod-generated configuration from reaching the final build.
So when CocoaPods says to use the inherited flag or remove the build settings from the target, it is warning that your target has taken ownership of a setting CocoaPods still needs to contribute to.
Why $(inherited) Fixes It
$(inherited) tells Xcode to keep values coming from higher-level configuration sources, including project settings and the CocoaPods-generated .xcconfig files, and then combine them with the target's value.
For example, if OTHER_LDFLAGS has been manually customized, make sure it still includes:
Without that token, the pod-generated linker flags may disappear, and the build can fail with missing libraries, unresolved symbols, or framework path errors.
Removing the Override Is Often Better
If the setting does not truly need a manual custom value, the cleanest fix is often to remove it from the target so Xcode falls back to the inherited configuration automatically.
This is usually better than adding more and more manual text to target settings, because CocoaPods is already trying to manage the integration layer.
The practical decision is:
- if you need a custom value, keep it and add
$(inherited) - if you do not need a custom value, delete the override entirely
Both approaches restore the same inheritance chain.
Typical Places to Check in Xcode
In the target's Build Settings, inspect entries such as:
- '
Other Linker Flags' - '
Framework Search Paths' - '
Library Search Paths' - '
Header Search Paths'
If the values are bold or explicitly set at the target level, that is a sign they may be overriding pod-managed configuration. Resetting them to inherited or default is often the right move.
A Pod Integration Workflow That Usually Works
After fixing the target build settings, reinstall pod integration cleanly:
If the project state is messy after upgrades, a more complete reset can help:
Then reopen the .xcworkspace, not the .xcodeproj, because CocoaPods integration lives in the workspace.
Swift Version Upgrades Make These Problems More Visible
This class of error showed up often during Swift 2 to Swift 3 transitions because projects already had build-setting drift and the upgrade exposed it. But the underlying problem is not really “Swift 3.” It is configuration ownership.
Whenever the target and CocoaPods disagree about who controls linker and search-path settings, upgrades tend to surface the mismatch.
Keep Custom Build Settings Minimal
A good long-term practice is to minimize manual target-level overrides for settings CocoaPods commonly manages. The more custom values you hard-code there, the more fragile pod updates become.
If you genuinely need custom build behavior, prefer putting it in a controlled configuration layer and keeping the inheritance chain explicit. That is more maintainable than editing generated pod files or pasting long linker flag lists into the target settings by hand.
Common Pitfalls
The most common mistake is adding a manual value to OTHER_LDFLAGS and forgetting to include $(inherited). That silently discards pod-generated flags.
Another mistake is editing the Pods project or generated CocoaPods files directly. Those changes are usually overwritten the next time pods are installed or updated.
Developers also reopen the .xcodeproj instead of the .xcworkspace, which makes it look like CocoaPods integration is broken even when the install itself succeeded.
Summary
- This CocoaPods error usually means your target is overriding build settings that should still inherit pod-managed values.
- '
$(inherited)restores the configuration chain when you need a custom target value.' - If you do not need a custom value, deleting the override is often the cleaner fix.
- Reinstall pods and open the
.xcworkspaceafterward. - The real issue is configuration inheritance, not just the Swift version mentioned in the error.
Related reading
- 0/1 nodes are available 1 nodes didn't have free ports for the requested pod ports when start the promethus exporter
- 1 pg undersized health warn in rook ceph on single node clusterminikube
- 2 Helm Charts with shared Redis dependency
- 413 error with Kubernetes and Nginx ingress controller
- -didSelectRowAtIndexPath not being called
- 2D cross-platform game engine for Android and iOS?
- 502 Bad Gateway with Kubernetes Ingress
- A mountable secret and token are not automatically generated in serviceaccount

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.