15
votes

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 '/Users/iamme/Documents/XCode/myapp/myapp/myapp-Info.plist': The file “myapp-Info.plist” couldn’t be opened because there is no such file.

As advised in Xcode can't open Info.plist -- error says "there is no such file" I went to build settings and put the right path - which I copied and pasted from file path shown in Xcode.

Unfortunately when compiling I got exactly the same message. So where else is Info.plist path stored?

Update: I have put relative path as advised but still get the error (give full message in activity log):

Process myapp/myapp-Info.plist
ProcessInfoPlistFile /Users/username/Library/Developer/Xcode/DerivedData/myapp-ancooijwpdbuzbbggnsalnhvckyr/Build/Products/Debug-iphonesimulator/myapp.app/Info.plist myapp/myapp-Info.plist
    cd /Users/username/Documents/XCode/myapp
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    builtin-infoPlistUtility myapp/myapp-Info.plist -genpkginfo /Users/username/Library/Developer/Xcode/DerivedData/myapp-ancooijwpdbuzbbggnsalnhvckyr/Build/Products/Debug-iphonesimulator/myapp.app/PkgInfo -expandbuildsettings -format binary -platform iphonesimulator -o /Users/username/Library/Developer/Xcode/DerivedData/myapp-ancooijwpdbuzbbggnsalnhvckyr/Build/Products/Debug-iphonesimulator/myapp.app/Info.plist
5

5 Answers

33
votes

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

10
votes

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.

2
votes

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.

enter image description here

2
votes

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

screenshot of Xcode Target Project settings

-1
votes

Here

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