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

10

66

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!

Sememe answered 5/3, 2019 at 20:36 Comment(0)
P
119

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
Palingenesis answered 14/5, 2019 at 8:0 Comment(5)
I've tried on Xcode 11.3.1 and It solves the problem. Thanks.Tenace
I tried it with Xcode 12.3 & working awesome. Thanks for a awesome answer.Quantum
Worked with Xcode 13.2.1 Thanks!Additional
Worked with Xcode 14.0, many thanks!Beaty
in my case after this script had to issue pod install --repo-updateBissau
N
24

I fix this in this way:

1、Go to your project's target, -> Build Phases -> Embed Pods Frameworks

2、check the input files and input file lists, Output files, and output file lists.

3、move dir from input file lists to input files, and output file lists to output files

Screenshot

Nordrheinwestfalen answered 5/9, 2019 at 1:8 Comment(2)
And in [CP] Copy Pods ResourcesKruter
@Randall Wang Thanks a lot,But tell me one thing why this happened?Analogical
I
16

I realised after a while that my colleague has updated cocoapods to the latest version, so what I did was just

sudo gem install cocoapods

And that did the trick! :)

Iamb answered 11/6, 2019 at 10:53 Comment(2)
Yes, upgrading to 1.7.2 and then pod install again worked.Melva
I didn't know why, but I saw this and realized it. Thank you.Leyes
S
10

Finally figured this out, posting here so others googling can find it.

It was an issue with a build script that used the 'Input File Lists' option, removing and re-adding the script fixed the issue.

  • Nav to Target
  • 'Build Phases' tab
  • 'Run Script' phase
  • make notes of what's there, remove it
  • re-run to make sure things work
  • re-add the script (and content under 'Input File Lists')
Sememe answered 5/3, 2019 at 20:47 Comment(1)
In my case, I had added the output file path to the 'Input File list' while attempting to add a framework using Carthage, instead of adding it to 'Output files' where it belongs.Uxorious
B
8

The problem is that you have added path to Input File Lists instead of Input Files

Braasch answered 7/6, 2019 at 12:24 Comment(0)
L
4

In my case

pod deintegrate
pod install

was enough

Lassalle answered 30/11, 2020 at 22:13 Comment(0)
S
2

In my case, I just fixed below

1- Go to your project's target, -> Build Phases -> Delete [CP] Copy Pods Resources. 2- pod deintegrate. 3- pod install.

Separatist answered 1/2, 2020 at 9:11 Comment(0)
H
2

No need to deintegrate pods and install again. Just run

pod install

It will create necessary files for new configurations.

Horseman answered 13/1, 2022 at 16:53 Comment(0)
G
1

First, you work:

  • Delete the .xcworkspace file
  • Delete the Podfile.lock file and Pods/ directory
  • Keep the Podfile
  • Rerun pod install

If the error still occurs, you need to add include .xcconfig path for CocoaPods in your .xcconfig files by prepending an #include statement like the following: #include “Pods/[path .xccofig file in Terminal”

Example:

I have two environments Stag and Production

  • After I run the pod file in Terminal. You’ll see in Terminal that CocoaPods did not set the configuration since we already set custom configurations. CocoaPods provides a link to be included in each

message from Teminal

  • Open .xcworkspace file and select .xcconfig file

step by step stag enviroment

step by step production enviroment

Finally, Cmd + Shift + K and run project

Good luck!!!

Glaucous answered 27/7, 2021 at 5:28 Comment(0)
E
1

In my case, Xcode was using a Build Configuration that didn't exist anymore. Going to 'edit scheme...' and selecting a valid scheme fixed it for me.

Emelun answered 16/12, 2022 at 11:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.