Xcode Buildtime Error: 'Unable to load contents of file list: '.../Info.plist' (in target 'xxxx')

stephenspann picture stephenspann · Mar 5, 2019 · Viewed 27.9k times · Source

Xcode started throwing this error in a project today, and I'm having trouble figuring out what it means and how to troubleshoot it, and it's not coming up in any searches. It happens immediately after trying to build to a device (no scripts compile, etc):

error: Unable to load contents of file list: '/Users/.../Products/Debug-appletvos/myapp.app/Info.plist' (in target 'myapp')

Full log below, (note I've replaced build folder with ... for brevity)

Showing Recent Messages

Prepare build
note: Using new build systemnote: Planning buildnote: Constructing build description

Build system information
error: Unable to load contents of file list: '/Users/.../Products/Debug-appletvos/myapp.app/Info.plist' (in target 'myapp')


Build failed    3/5/19, 3:09 PM    0.2 seconds

Things I've tried so far:

  • Restarting Xcode
  • Restarting Computer
  • 'Product' > 'Clean Build Folder'
  • Manually deleting everything in Build folder
  • Re-download repository on the same computer (same issue)
  • Re-download repository on a different computer (same issue)
  • reverting to a previous commit that was working (same issue)
  • plutil Info.plist responds with Info.plist: OK

Other items of note:

  • Project uses Cocoapods
  • Project utilizes custom C++ code
  • The only file list in the Info.plist file is a list of 2 custom fonts, but those are showing up ok in the Xcode project browser (not red).

If anyone has encountered this before and has a fix, or has any other suggestions for troubleshooting I would greatly appreciate it, thanks!

Answer

Trần Trung Hiếu picture Trần Trung Hiếu · May 14, 2019

In my case, I just fixed below

  1. Open terminal under project folder
  2. pod deintegrate
  3. sudo gem install cocoapods-clean
  4. pod clean
  5. Open the project and delete (if it's still there) the “Pods” folder that should be red
  6. pod setup (This may take some time)
  7. pod install