81

I'm running into what seems to be common error, in that Xcode can't seem to find my 'Info.plist' file.

I've checked the answers to these two StackOverflow questions (Could not read from Info.plist and Objective C/Xcode error: The file “Info.plist” couldn’t be opened because there is no such file)...I am using a relative path, and the plist file is in the correct absolute location. The type and location are correct as shown in the image below:

plist path

My biggest concern is that this is now happening on multiple projects, including one I ran successfully just a few hours ago! Does anyone know how to solve this???

EDIT I've also tried reinstalling XCODE and replacing the plist file. Xcode still can't find 'info.plist'.

NOTE I wanted to add that this was for Xcode 6.2.X (I can't remember which version number exactly, but it was pre-Xcode 6.3.X).

narner
  • 2,908
  • 3
  • 26
  • 63
  • see the answer here http://stackoverflow.com/questions/6145916/xcode-cant-open-info-plist-error-says-there-is-no-such-file hopefully this helps for you – Steve Rosenberg Oct 04 '14 at 03:48
  • Hey @MinnesotaSteve, I did try that, but still keep getting the error..it looks to me as if my path is set correctly in the build settings :/ – narner Oct 04 '14 at 03:57
  • crap - I'll think of something else. How annoying. – Steve Rosenberg Oct 04 '14 at 04:01
  • Thanks @MinnesotaSteve! The weirdest part is that it's happening on a project that I didn't rename at all... – narner Oct 04 '14 at 04:03
  • i tried few things buccaneer create something as annoying as you have. All I can think of is what you already know. Reinstall XCODE. – Steve Rosenberg Oct 04 '14 at 04:41
  • @MinnesotaSteve, I reinstalled XCODE, and still got the same error when I opened the project again :/ – narner Oct 04 '14 at 14:14
  • I think you fixed XCODE but not the project. You will likely have to recreate the project and drag all your files from the old one to the new one. – Steve Rosenberg Oct 04 '14 at 14:15
  • @MinnesotaSteve it looks that way...the only projects that aren't working are Swift ones, but I haven't been able to figure out if that has anything to do with the issue or not – narner Oct 04 '14 at 15:07

27 Answers27

132

I also face the similar issue in xcode 7.0 but none of the above Solutions Worked for me, at last I get a chance to solved this issue

  1. Go to: App Target
  2. See the Identify and choose the Plist

See the screenshot also

enter image description here

Enjoy

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
nivritgupta
  • 1,966
  • 2
  • 20
  • 38
  • 2
    Have the same problem, and not this button ! – w3spi Oct 05 '15 at 09:07
  • 2
    @Zl3n will you please share some more info – nivritgupta Oct 05 '15 at 09:11
  • When removing everything in `App > Build Settings > Packaging > Info.plist File`, I now get this message in `General` tab ; Xcode failed to parse the contents of the Info.plist – w3spi Oct 05 '15 at 09:14
  • 1
    @Zl3n i am facing this issue using Xcode 7 and none of the above answer help me to solve this issue , after that i am self able to solve this issue ,maybe choose info.plist Button is available on xcode 7 only – nivritgupta Oct 05 '15 at 09:21
  • 1
    @Zl3n this answer will help you http://stackoverflow.com/questions/19642102/xcode-cannot-parse-contents-of-info-plist – nivritgupta Oct 05 '15 at 09:23
  • I am using 7.0.1 too. Thanks for the link – w3spi Oct 05 '15 at 09:26
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/91369/discussion-between-nivritgupta-and-zl3n). – nivritgupta Oct 05 '15 at 09:26
  • I tried that and it says "No Filter Results" when I click the button. – Donald Duck Jun 27 '17 at 15:46
  • If you move the plist file out of the head folder of the program Xcode can't find it. Highlight your project in the project manager screen, select your project under target, have basic selected then in the search bar just type plist. You'll see info.plist file under packaging just add the correct folder structure there. I really think Xcode should be smart enough to overwrite that value for you. Honestly. its 2017 Apple come on now. This is probably a bug though, I sure I have moved the plist before and never had to set this value explicitly. @DonaldDuck – Esko918 Nov 28 '17 at 04:15
  • 1
    this fixed it for me! Thank you! – lizziepika Jan 28 '19 at 20:54
  • it's showing `xcode failed to parse the contents of the info.plist` – Wahab Khan Jadon Mar 19 '20 at 11:44
  • @WahabKhanJadon check this link https://stackoverflow.com/questions/19642102/xcode-cannot-parse-contents-of-info-plist – nivritgupta Mar 23 '20 at 02:05
50

The solution for this particular instance of the error was “Info.plist couldn't be opened because there is no such file” was that I had deleted all of the files in the "Project Tests" folder, but was still had "Project Tests" listed under my targets. After deleting the "tests" target, the project built successfully.

narner
  • 2,908
  • 3
  • 26
  • 63
  • 1
    It worked when I deleted the missing Test framework from the Frameworks folder group. – David Douglas Mar 14 '15 at 17:33
  • 3
    This didn't work in XCode 6.3. Finally I had to manually create an empty plist file under the directory shown in the error message. The empty plist file will have: – Prabu Arumugam Apr 21 '15 at 02:35
30

I faced similar kind of situation when I updated my XCode to 6.1. My project contained Info.plist but I got this error: "The file “Info.plist” couldn’t be opened because there is no such file." Therefore, I looked up to the targets of my application which were: "App" & "AppTests". I checked for the 'Packaging' field in 'Build Settings' tab.

Target: 'App' -> 'Build Settings' -> 'Packaging' -> 'Info.plist file(field)' - the location should be correct

Target: 'AppTests' -> 'Build Settings' -> 'Packaging' -> 'Info.plist file(field)' - the location must be something like this: 'AppTests/Info.plist'.Keep this field empty.Delete the location.

It seems that Apple is checking this location by default for finding Info.plist. Clean & Build your project. It will work. Worked for me.

neha_sinha19
  • 514
  • 4
  • 9
25

XCode 10 and 11

I know it's been a while, but I faced the same issue today, and the answers I've found weren't very clear for me, so I decided to make an instruction with screenshots.

1) First, open the right-hand panel in xcode and click on your .plist file:

enter image description here

2) Second, choose Relative to project location on the right-hand panel and copy the link just below it:

enter image description here

3) Third, go to the main project settings, choose your target and click on the Build settings tab:

enter image description here

4) And finally, type Info.plist in the search field, double-click on the existing path and paste the link you have copied earlier:

enter image description here

In the end, clean the project Shift + Cmd + K and re-run.

joliejuly
  • 2,127
  • 1
  • 21
  • 24
7

For me, the anwser for this issue was:

1.Turn off Xcode

2.Go to ./Users/You/Library/Developer/Xcode/DerivedData

3.Delete everything from this folder

4.Run Xcode

5.Build&Clean

Xcode version: 6.4 (6E35b)

Budyn
  • 134
  • 1
  • 4
7

In my case i was edited my xcode project folder name so that this is happened after changing folder's new name(Project -> Targets -> Build settings -> Packaging -> Info.plist name) then working fine.

Preetha
  • 753
  • 9
  • 12
4

go to targets. right click on the test target. yourProjectTests and delete it

amit gupta
  • 1,167
  • 12
  • 29
4

if you change info.plist location from project to a folder inside the app then you will get this error i was facing same error and error resolved by this way

 Select your app and from Targets yourApp > Build Settings > Packaging > 
 Info.Plist and change that path
Ali Aqdas
  • 437
  • 5
  • 9
  • Build Settings key: `INFOPLIST_FILE`. An exmple pattern would be `$(SRCROOT)/ProjectName/App/SomeFolder/Info.plist` – marc-medley Oct 05 '21 at 18:49
2

As answered by @narner (answer marked as correct), yes it can make code work. But here is something better to solve the problem.

My suggestion is that instead of delete tests targets, better if we change the path of info.plist under tests target.

Simple steps:-

In project, click on the project file -> ProjectNameTests(under targets) ->Build settings->Packaging->Info.plist Here you change the path of file.

iDevAmit
  • 1,550
  • 2
  • 21
  • 33
2

Relocate the files by double clicking on this icon:

enter image description here

I had this issue too for the past couple hours. I had downloaded my github project from an earlier version. the search paths seem to have gotten confused and needed to be explicitly told where the files were located.

Rob
  • 26,989
  • 16
  • 82
  • 98
1

One of the most weird issue that I have faced. In my case I do not have any file missing, I cleared the derived data, cleared the modular cache, cleaned the project multiple times, restarted my xcode, but nothing worked for me. At the end I restarted my computer with the only hope to resolve this issue which surprisingly worked for me!!!

Rahul Mathur
  • 872
  • 1
  • 7
  • 20
1

This is my first post, but I have been a dedicated student here for a while now.

For me the problem was a framework that I added. I know because when adding it, I got the problem and I test constantly during development on the simulator and I opened the simulator log and found the info.plist problem was solely with the framework I added. To double check, I deleted the framework and all references to it and tried building to the simulator again and everything went back to normal. So, after I tried everything that I read here and in other posts and not being able to fix the problem, I felt like throwing in the towel, but on my last attempt I did the following and it worked 24 hours after:

  1. I removed references and completely deleted the framework in question from my Xcode project.

  2. Opened Simulator, chose Simulator/Reset Content and Settings..

  3. In Xcode, I did a Product/Clean and while holding alt down, did a Product/Clean Build Folder. I think if you do the latter of the 2, Product/Clean is unnecessary, but I was grabbing at straws

  4. To add the framework back to the project, I chose the target/Build Phases and added a new Copy Files phase.

  5. Made destination "Frameworks", TICKED "Copy only when installing" before adding the framework ( this part is in bold because it is the only thing that I changed from my original attempt ) added the framework to the copy files phase.

My blood pressure is back to normal now..

KTobiasson
  • 31
  • 6
1

This Worked for me:

  • Go to the info.plist file on your Finder.
  • Drag it and Add it to the Project Folder (Without Copying)
  • Delete the Previous Reference (only the Reference, do not move to Trash)
  • Try Running it again

Hope this helps someone :)

Hernan Arber
  • 1,626
  • 3
  • 22
  • 35
1

None of above-mentioned or other solutions did work for me. I found a solution after a couple of days searching.

ionic cordova platform remove ios
ionic cordova platform add ios

The reason I removed and added platform was I accidentally deleted some files under the ios folder. So, it brought the necessary files.

1

Also you can check the target dependencies. It took me 1hr before realising that I have copied a UI test target for target A, but there was a dependency left. So the build required a file that was not mapped to target B, but only to A.

ui test for target B: dependency for target B and A

Vladimír Slavík
  • 1,727
  • 1
  • 21
  • 31
0

First you need to check in your project folder whether info.plist is there or not. If not then you need to copy info.plist from any other application into your project folder and add file in xcode. It will solve your problem.

Dhaivat Vyas
  • 2,926
  • 1
  • 16
  • 26
  • 1
    I did take a look in the project folder, and info.plist is in there – narner Oct 04 '14 at 05:10
  • Now try copying info.plist file from your any of your previous projects. I've solved my issue in similar manner and it thd worked for me and it might work for u as well. – Dhaivat Vyas Oct 04 '14 at 05:42
  • I deleted the plist and copied another one over (as well as reinstalling XCODE), and am still getting the error :/ – narner Oct 04 '14 at 14:19
  • can you please tell me which error you are getting? – Dhaivat Vyas Oct 05 '14 at 13:08
  • 1
    you can also look at the video: https://www.youtube.com/watch?v=gYh4_80jHDk&feature=youtu.be – Dhaivat Vyas Oct 05 '14 at 13:22
  • Thank you for taking the time to do that! The error I'm getting is "The file “Info.plist” couldn’t be opened because there is no such file." Unfortunately, I followed all of the steps in the video; and am still getting the same error :/ – narner Oct 05 '14 at 17:46
0

One other thing for consideration is to uncheck Localization for info.plist in utility bar,if you have checked it and then clear the project,the task is done!

0

The answers above did not apply to my case.

This is what I have discovered.

Some weeks ago I dowloaded to my Downloads folder a github objective c library for my project. I then added that librabry with "Add Files to..." and the library worked just fine.

I regularly delete old files and folders from my Downloads. It happens that I deleted the folder that contained the objective-c library! Therefore, Xcode was complaining that it could not find a "Info.plist" that was in that folder. I went to the Trash bin, restored the folder and now it's all good!

Next time I add files to my folder I will make sure the files get copied into the project.

This Apple doc was of great help: https://developer.apple.com/library/ios/qa/qa1649/_index.html

Good luck

dev4life
  • 10,785
  • 6
  • 60
  • 73
0

Search "info.plist" using ctrl+sht+f in your project.

Tap on the results and you will find it as a field under Build Settings.

Ensure that it contains the correct path to your info.plist file as in the project hierarchy.

soumil
  • 277
  • 2
  • 11
0

While creating framework with enabled test cases, please ensure project should have two info.plist, one in the main project and other in tests.now you are getting this error because there may be missing of info.plist file either in project or in tests.

0

do this only after reading all the other answers on this page

So basically the other answers are probably what you need. I've tried all of them and they didn't work. Not because they are wrong, but because I was simply looking at the wrong place.

Basically the error message simply states: The file "Info.plist" couldn't be opened etc etc. And I noticed all the answers on this page spoke about the plist file pertaining to the actual project (or it's test files, anyway). I double checked 1000 times and they were definitely in the right place.

That's when I realized the error message simply wasn't giving enough information, I have many info.plist files on my project!

So I simply compiled the code outside of xcode using command line like so:

xcodebuild -project project.xcodeproj -alltargets -configuration Debug

It gave me a much more detailed error message:

...

builtin-copyPlist --convert binary1 --outdir /Users/Shared/dev/ios/customer-ios/build/Debug-iphoneos/theApp.app -- theApp/Libs/STPopup/Info.plist /Users/Shared/dev/ios/customer-ios/theApp/Libs/STPopup/Info.plist:0: error: reading data: The file “Info.plist” couldn’t be opened because there is no such file.

** BUILD FAILED **

The following build commands failed: CopyPlistFile build/Debug-iphoneos/theApp.app/Info.plist theApp/Libs/STPopup/Info.plist

enter image description here

so it told me which plist file was problematic: Libs/STPopup/Info.plist.. I searched for that file and indeed it turns out I was given a project that had missing libs:

enter image description here

abbood
  • 23,101
  • 16
  • 132
  • 246
0

Possible XCode 9 Update - I ran into this problem after I moved a bunch of files, including Info.plist, into a "Supporting Files" group. I've never had this error occur before XCode 9, so either it's something I did differently when moving/adding files to a group or it's something new w/ XCode 9 update.

When creating a group/folder based on selected files in XCode 9, it actually moves the files into a new folder in the Finder. Thus, my Info.plist file was moved and XCode/build/compile couldn't find it. I followed nivritgupta's idea above and it worked perfectly (select "Choose Info.plist File..." from Identity category in General build settings). I then selected the Info.plist file from its new location (that had been) "relocated" by XCode 9, and then my project built without an issue.

Side note: this also fixed the weird "Missing default-568h@2x" warning I started receiving at that same time. Two birds...

Eric
  • 291
  • 2
  • 7
0

Not for info.plist but for another plist file I encountered the same problem. the reason for the error is I inadvertently copied the file to a folder, so it created a symlink. and When I remove the original file, this error is thrown. Deleting the symlinking file resolved the problem.

Özgür
  • 8,077
  • 2
  • 68
  • 66
0

Real Project Example with screenshots showing another way to solve this issue.

Using Swift 4 and Xcode 9.

1-look at the Xcode build error problem as shown in the picture in the 'Step 1 Visual Description' and it will tell you which Sub Folder in your Xcode Project the file belongs in. In my case it is the NVActivityIndicatorViewExample/Info.plist. Step 1 Visual Description

2-But you can also see where the Info.plist file is supposed to be by going to the 'Build Settings' section in your Xcode projects 'Target' area as shown in the picture in the 'Step 2 Visual Description'. When you're there look in the 'Packaging section' and click on the 'Info.plist file' row to have a pop up view show you which folder the file is supposed to be in. Step 2 Visual Description

3-Find your Info.plist file, open it up as a source code file by right clicking on it. Look at the Step 3 Visual Description for help.

4-Copy the code and delete the Info.plist file. Look at the Step 4 Visual Description for help.

5-The find the folder inside your project where the Info.plist file is supposed to go according to your build setting then right click on that folder and click on 'New File'. Look at the Step 5 Visual Description for help.

6-Make sure you're in the section for the kind of App (iOS in this case) you're building, go to resources and select 'Property List'. Look at the Step 6 Visual Description for help.

7-Type in "Info" as the file name with no extension, make sure the Group and Target are selected for your application and click "Create". Look at the Step 7 Visual Description for help.

8-Open the newly created Info.plist file as "Source Code", paste the previous XML code you copied from the deleted Info.plist file, save, and the run your app. (You can also build and clean the project if you want.)

PierreG
  • 1
  • 2
0

This is what works for me:

  • close xcode
  • delete dervivedData folder content
  • open xcode
  • product clean
  • run again
Giulio Caccin
  • 2,962
  • 6
  • 36
  • 57
0

Project -> Targets -> Info -> Custom iOS Target Properties enter image description here

0

My problem was a tiny error in my Info.plist file

To make sure it's not your case,

  1. On the left panel in xCode, find the folder with your project name

  2. Click on it, you should see the Info.plist file

  3. Click on the Info.plist file, if it opens with no problem, the other answers in this thread should solve your issue, if it has an error, the file will not open and a prompt will appear to tell you where the error is

Mahdieh Shavandi
  • 4,906
  • 32
  • 41