Info.plist Utility Error: “Info.plist couldn't

2019-02-01 03:34发布

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).

23条回答
乱世女痞
2楼-- · 2019-02-01 03:46

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.

查看更多
兄弟一词,经得起流年.
3楼-- · 2019-02-01 03:46

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.

查看更多
何必那么认真
4楼-- · 2019-02-01 03:47

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 :)

查看更多
小情绪 Triste *
5楼-- · 2019-02-01 03:49

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!

查看更多
孤傲高冷的网名
6楼-- · 2019-02-01 03:52

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.

查看更多
Fickle 薄情
7楼-- · 2019-02-01 03:54

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..

查看更多
登录 后发表回答