Xcode can't open Info.plist -- error says "there is no such file"

XcodeXcode4info.plist

Xcode Problem Overview


I switched to Xcode 4 and loaded my project, which worked perfectly in Xcode 3. When I run it, I get an error that says:

>The file “Info.plist” couldn’t be opened because there is no such file.

I have looked at the file in Xcode and it is there. So why can't it be opened?

Xcode Solutions


Solution 1 - Xcode

That the file exists in your Xcode project folder isn't enough. Have you verified the file is properly referenced in your application target's build settings so it's properly copied into the app bundle? It's not quite the same as a standard resource (ie, it's not made a member of the target in the set of target membership check boxes) but rather a build setting because of its importance in a properly-formatted bundle.

Navigate to the project (select it in the Project navigator), select the application target in the list of targets, then click the Build Settings tab. Under the Packaging section, make sure the "Info.plist File" is properly set to the location/file name.

Solution 2 - Xcode

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

Solution 3 - Xcode

Xcode 8

Select the project file in the left pane. Then open the general tab and they have added a nice button that lets you select the file. (You may have to add it into your project structure as well)

enter image description here

Solution 4 - Xcode

For me the problem was that some of the .storyboard files had different deployment targets after a merge. Fixed it by setting all the storyboard files to use "Project Deployment Target". enter image description here

Solution 5 - Xcode

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

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

enter image description here

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

enter image description here

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

enter image description here

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

Solution 6 - Xcode

For me this happened as a result of enabling localization of the plist file (to give language specific identifier of the app on springboard).

In targets>build settings>packaging>info.plist file key i changed the path from AppName/AppName-info.plist to AppName/Base.lproj/AppName-info.plist and everything worked as expected.

Remember, its lproj as in a small L and not a capital I.

Hope this helps.

Solution 7 - Xcode

under Xcode 4.6 if the appname-Info.plist is not visible under project -> target/info, go to summary tab and it will ask for the appname-Info.plist file. Select the correct file from the suggestion(s).

Solution 8 - Xcode

Under Targets>Packaging>Info.plist file, make sure that the file path is correct.

Solution 9 - Xcode

In my case, the file was there, but malformed. If you recently edited your Info.plist in a text editor, undo that change, and retry without breaking the markup validity.

Solution 10 - Xcode

For me the issue was that the error was referring to the Info.plist from a library I was using, not the actual .plist file from the project.

Maybe this will help someone in the future.

Solution 11 - Xcode

In my case one of the key was missed out while adding ATS compliance flag

<key>NSAppTransportSecurity</key>

Instead of the correct one as below

<true/>
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoadsInWebContent</key>
    <true/>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSExceptionDomains</key>
    <dict>
        <key>some-service1.com</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <false/>
        </dict>
        <key>some-service2.com</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <false/>
        </dict>
    </dict>
</dict>

I was having this

<dict>
    <key>NSAllowsArbitraryLoadsInWebContent</key>
    <true/>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSExceptionDomains</key>
    <dict>
        <key>some-service1.com</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <false/>
        </dict>
        <key>some-service2.com</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <false/>
        </dict>
    </dict>
</dict>

Although some of the online XML Validators did say the XMLs are correct, (which was not), I used

plutil filename.plist

going to the directory where plist file is present (from terminal) and got to know the exact line number that had issues Reference :(https://stackoverflow.com/a/32494850/5438240)

Solution 12 - Xcode

This problem happened the same to me,this happened when I merge the project from other project,some project setting was difference in above two, open the info.plist file in Text Edite,solve the conflcted then save it,everything goes well!

Solution 13 - Xcode

for react native, go to ios/{project name}/Info.plist open it in vs code or any other and check that all the key and strings must be inside the in most cases! You must have changed it for installing the lib and done some mistakes in it.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionOctavia TogamiView Question on Stackoverflow
Solution 1 - XcodeJoshua NozziView Answer on Stackoverflow
Solution 2 - Xcodeamit guptaView Answer on Stackoverflow
Solution 3 - XcodequemefulView Answer on Stackoverflow
Solution 4 - XcodeGenkiView Answer on Stackoverflow
Solution 5 - XcodejoliejulyView Answer on Stackoverflow
Solution 6 - XcodeAceNView Answer on Stackoverflow
Solution 7 - XcodeDirk AckermannView Answer on Stackoverflow
Solution 8 - XcodePWigginView Answer on Stackoverflow
Solution 9 - XcodejoriswView Answer on Stackoverflow
Solution 10 - XcodeAdrianView Answer on Stackoverflow
Solution 11 - XcodeNaishtaView Answer on Stackoverflow
Solution 12 - Xcodeuser8005634View Answer on Stackoverflow
Solution 13 - XcodeAnkitView Answer on Stackoverflow