Skip to content
Latchkey

xcodebuild "ld: framework not found" in CI

The linker could not find a framework the target links against. It is usually missing because Pods or a build dependency were not produced on the runner.

What this error means

Linking fails with ld: framework not found X. The framework exists locally but not on the fresh runner, or a build phase that produces it was skipped.

xcodebuild
ld: framework not found Alamofire
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Common causes

Pods or dependency frameworks not built

CocoaPods frameworks are produced by pod install plus a build; if Pods are missing, the framework is not on disk.

Wrong framework search paths

A stale or machine-specific FRAMEWORK_SEARCH_PATHS entry points at a directory that does not exist on CI.

How to fix it

Install Pods and build the workspace

  1. Run pod install so framework targets are present.
  2. Build the .xcworkspace so dependencies are produced before linking.
shell
pod install
xcodebuild -workspace MyApp.xcworkspace -scheme MyApp build

Audit framework search paths

Remove absolute machine paths; rely on the generated Pods xcconfig so paths resolve on any runner.

How to prevent it

  • Build the workspace, not the project, and avoid hardcoded search paths. Run pod install in CI every time.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →