Could not read from Info.plist

前端 未结 5 1580
迷失自我
迷失自我 2020-12-14 10:50

I copied a project between 2 macs. I got the error message about Info.plist not found in Xcode 4 ProcessInfoPlistFile:

could not read data from \'/U

相关标签:
5条回答
  • 2020-12-14 11:00

    Select your project Target go to Build Phase, then select "Copy Bundle Resources", you would see red highlighted file references just remove those references, again add all those files. Now perform clean and build.

    For a safety check just verify the Info.plist file path in "Build Settings"> Packaging section.

    Warning : Never add Info.plist in "Copy Bundle Resources" build phase in your iOS project.

    0 讨论(0)
  • 2020-12-14 11:09

    You can specify the Info.plist file in Xcode inside the project's settings, under your target in the "General" tab:

    0 讨论(0)
  • 2020-12-14 11:09

    Here

    Choose new file from here manually, a new path will be added automatically

    0 讨论(0)
  • 2020-12-14 11:10

    If you change your folder name then must need to be updated on Build Settings. Under Packaging set your Info.plist File path. And make sure that the file is in your project.

    0 讨论(0)
  • 2020-12-14 11:13

    Don't use an absolute path here, use a path relative to your project file.

    The default layout for Xcode projects is this:

    CodeName.xcodeproj
    CodeName/
        CodeName-Info.plist
        CodeName-Prefix.pch
    

    Graphically, that looks like this in Finder: Project Layout in Finder

    In this case, you'd want Info.plist File to be CodeName/CodeName-Info.plist.

    Here, I've selected the Xcode project, target, and used the search bar to limit the settings being shown:

    Info.plist setting

    Finally, check that your project is including the info.plist file from the right location.

    Info.plist location

    0 讨论(0)
提交回复
热议问题