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
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:
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:
Finally, check that your project is including the info.plist file from the right location.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With