xcodebuild "Unable to load contents of file list" in CI
A build phase references an .xcfilelist that does not exist on the runner. These lists are generated by pod install, so a build without it fails.
What this error means
The build fails with Unable to load contents of file list: ...Pods-MyApp-frameworks-Release-input-files.xcfilelist. It happens when Pods were not installed.
xcodebuild
error: Unable to load contents of file list: '/Target Support Files/Pods-MyApp/Pods-MyApp-frameworks-Debug-input-files.xcfilelist' (in target 'MyApp')Common causes
pod install not run
The xcfilelist files are generated by CocoaPods. Without pod install, the referenced files are absent.
Pods directory not restored from cache
A cache miss or partial restore can leave the Target Support Files directory incomplete.
How to fix it
Run pod install before building
- Install Pods so the xcfilelist files are generated.
- Build the workspace afterward.
shell
pod install
xcodebuild -workspace MyApp.xcworkspace -scheme MyApp buildInvalidate a stale Pods cache
If you cache the Pods directory, key the cache on Podfile.lock so a lockfile change forces a fresh install.
How to prevent it
- Always run pod install in CI and cache keyed on Podfile.lock. On Latchkey managed runners, transient pod fetch failures are auto-retried.
Related guides
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…
CocoaPods "could not find compatible versions for pod" in CIFix the CocoaPods "could not find compatible versions for pod" error in CI by relaxing version constraints or…
xcodebuild "Command PhaseScriptExecution failed" in CIFix xcodebuild "Command PhaseScriptExecution failed with a nonzero exit code" in CI by reading the run-script…