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
- Run pod install so framework targets are present.
- Build the .xcworkspace so dependencies are produced before linking.
shell
pod install
xcodebuild -workspace MyApp.xcworkspace -scheme MyApp buildAudit 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
xcodebuild "module map file not found" in CIFix the xcodebuild "fatal error: module map file not found" error in CI by regenerating Pods or clearing deri…
CocoaPods "sandbox is not in sync with the Podfile.lock" in CIFix the CocoaPods "sandbox is not in sync with the Podfile.lock" error in CI by running pod install so the co…
xcodebuild "Module compiled with Swift X cannot be imported by Y" in CIFix the xcodebuild "Module compiled with Swift X cannot be imported by the Swift Y compiler" error in CI by a…