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

前端 未结 25 896
庸人自扰
庸人自扰 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: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:

提交回复
热议问题