pod install from the folder containing your Podfile, then open the app’s .xcworkspace and rebuild. If the error persists, check that the referenced .xcfilelist exists and that CocoaPods build settings resolve correctly; regenerate the Pods integration while preserving Podfile.lock before trying dependency updates.Why this happens
Xcode reports Unable to load contents of file list when a build phase references an .xcfilelist that it cannot read. In a CocoaPods project, the failing paths commonly point into Pods/Target Support Files and end with frameworks-Debug-input-files.xcfilelist or frameworks-Debug-output-files.xcfilelist.
These are generated build-support files, not Swift source files. CocoaPods uses them to describe inputs and outputs for build scripts. The error can appear after an Xcode upgrade, but it can also result from missing Pods, stale integration, or build settings that resolve a file-list path incorrectly. The original report involved Xcode 10.2; the error itself does not prove that Xcode’s build system is defective.
The important distinction is missing generated files versus an incorrect path to existing files. Start by restoring the generated files without changing dependency versions, then inspect configuration if the error remains.
How to fix it
1. Regenerate CocoaPods support files with pod install
Close the project in Xcode. In Terminal, change to the folder that contains your app’s Podfile, then run:
cd /path/to/your/project
pod install
If the repository manages CocoaPods through Bundler, use its configured environment instead:
bundle exec pod install
Use the project’s existing convention rather than switching between bundled and globally installed CocoaPods versions.
Read the command output. If installation fails, fix that failure before returning to Xcode. A build cannot reliably use support files from an incomplete installation.
After installation succeeds:
- Open the app’s
.xcworkspace, not its.xcodeproj. - Select the app scheme and intended destination.
- Choose Product > Clean Build Folder.
- Build again.
Keep Podfile.lock for this first attempt. With an unchanged Podfile and an existing lockfile, pod install normally preserves the recorded dependency versions. That makes it a more controlled repair than pod update.
2. Check whether the referenced file actually exists
Copy the failing path from Xcode’s build log. Look inside the corresponding directory under:
Pods/Target Support Files/
For example, the error might name:
Pods/Target Support Files/Pods-Example/Pods-Example-frameworks-Debug-input-files.xcfilelist
You can list generated file lists from the project directory:
find Pods -name '*.xcfilelist' -print
Compare the result with the error, including the target name and configuration name.
- The file is missing: CocoaPods generation or integration needs repair. Continue with the reintegration step below.
- The file exists at a different location: Check the build phase’s reference and its variable expansion.
- The error names an old target: The app target may retain stale CocoaPods build phases from a rename or integration change.
Do not create an empty .xcfilelist just to silence the error. That can remove the immediate complaint without restoring the intended build-script inputs and outputs.
3. Check CocoaPods paths and configuration inheritance
In the app target’s Build Phases, inspect the CocoaPods script phase associated with the error. It may be an embed-frameworks or copy-resources phase. Check its input and output file-list references.
A generated reference can use a build setting such as:
${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks-${CONFIGURATION}-input-files.xcfilelist
This is an example, not a replacement to paste into every project. Your target and generated filenames may differ.
Check the following:
PODS_ROOTresolves to the project’s actual Pods directory.- The selected build configuration matches generated CocoaPods support files.
- The target’s configuration uses the appropriate CocoaPods
.xcconfig, directly or through a custom configuration file that includes it. - Relevant target-level overrides preserve
$(inherited)where needed instead of discarding configuration values.
Pay particular attention if Debug builds succeed but a custom configuration fails. Check the configuration mapping in the Podfile, then rerun pod install after correcting it. Also address any CocoaPods warning that it could not assign the target’s base configuration.
Avoid replacing generated paths with absolute paths from your Mac. That hides the configuration problem and can break builds for teammates or CI.
4. Recreate the Pods integration while preserving locked versions
If installation succeeds but stale file-list references remain, regenerate the integration more thoroughly. First commit or back up your project, including its project file and workspace changes.
From the Podfile directory, run:
pod deintegrate
Then remove the generated Pods directory and reinstall:
rm -rf Pods
pod install
Confirm your working directory before running the removal command. If the project uses Bundler, run both CocoaPods commands through bundle exec.
Reopen the .xcworkspace, clean the build folder, and build again.
A highly voted solution to the original problem removed Pods, Podfile.lock, and the app workspace, then ran pod deintegrate and pod install. That is a broader reset than most projects need. Preserve the lockfile first, because deleting it permits dependency versions to be resolved again.
Likewise, do not delete a hand-maintained workspace. If you choose to recreate a workspace, first confirm that it contains no manually added projects or other configuration you need to retain.
5. Update CocoaPods only when regeneration is not enough
The accepted solution to the Xcode 10.2 report updated CocoaPods to a prerelease, ran pod update, then cleaned and rebuilt:
# Historical workaround, not the recommended starting point
sudo gem update cocoapods --pre
pod update
That records what worked for the original reporter; it is not a general recommendation to install prerelease tools today.
A better sequence is to check your installed CocoaPods version with pod --version, then update it through the installation method your project uses if necessary. For a Bundler-managed project, that means reviewing its Gemfile constraints and updating the bundled CocoaPods dependency deliberately.
After a tooling update, try pod install again before pod update. The latter can change dependency versions within the Podfile’s constraints, adding unrelated changes to a build-system repair. Review lockfile and project diffs before committing.
How to prevent it
- Commit
Podfile.lockfor an app so developers and CI share the same dependency resolution. - Run
pod installafter checkout or dependency-configuration changes when generated Pods files are absent. - Build through the CocoaPods workspace.
- Keep the CocoaPods version consistent across development and CI, using Bundler if that is your project’s convention.
- Treat target renames and custom build configurations as integration changes: regenerate support files and inspect the resulting diff.
- Do not rely on changing build systems to repair a missing file. Switching to the legacy build system did not resolve the original report.
FAQ
Should I delete Podfile.lock to fix this error?
Not initially. Preserve it while regenerating Pods and repairing integration so the fix does not unnecessarily change dependency versions. Remove it only when you intentionally want a fresh dependency resolution and can review and test the resulting changes.
Will cleaning the build folder fix missing xcfilelist files?
Cleaning does not generate CocoaPods support files. Run pod install first, verify that it succeeds, then clean and rebuild to check the repaired integration.
Why does the error remain even though the file exists?
Xcode may be resolving a different path because of PODS_ROOT, the selected configuration, or stale build-phase references. Compare the exact path in the build log with the actual file rather than checking only that some .xcfilelist files exist.
Parts of this guide are adapted from content licensed under CC BY-SA 4.0; this article is shared under the same license.
