Info.plist Utility Error: “Info.plist couldn't be opened because there is no such file”

前端 未结 25 826
庸人自扰
庸人自扰 2020-12-08 06:15

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 ques

相关标签:
25条回答
  • 2020-12-08 06:47

    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.

    0 讨论(0)
  • 2020-12-08 06:48

    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.

    0 讨论(0)
  • 2020-12-08 06:48

    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

    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:

    0 讨论(0)
  • 2020-12-08 06:49

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

    0 讨论(0)
  • 2020-12-08 06:50

    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.

    0 讨论(0)
  • 2020-12-08 06:50

    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
    
    0 讨论(0)
提交回复
热议问题