CocoaPods
Swift3
build settings
pod update error
inherited flag

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.

Practice system design

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:

text
$(inherited)

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:

bash
pod install

If the project state is messy after upgrades, a more complete reset can help:

bash
pod deintegrate
pod install

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 .xcworkspace afterward.
  • The real issue is configuration inheritance, not just the Swift version mentioned in the error.

Related reading
Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
Track 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.

Practice system design