Ios – Warning: The Copy Bundle Resources build phase contains this target’s Info.plist file

buildiosiphonetargetxcode

I've separated a project into two builds and given each of them a plist file. Everything works fine, but I keep getting this build warning:

Warning: The Copy Bundle Resources build phase contains this target's
Info.plist file 'MyApp-Info.plist'

I get this when I try to build MyApp. Building for the second target gives the same error (with SecondTarget-Info.plist in the warning). I'm not sure why it's a warning, since I want the build to contain that .plist file. Each of the .plist files have one target membership (for their own build).

What does this warning mean? Is there any way to make it go away?

Best Answer

https://developer.apple.com/library/content/qa/qa1649/_index.html

Excerpt:

You are getting this warning because you probably added your Info.plist file to your Copy Bundle Resources build phase as shown in Figure

enter image description here

The INFOPLIST_FILE build setting specifies the name of the Info.plist associated with your target. When building a target, Xcode reads this build setting and copies the referenced Info.plist into your application bundle. Because Xcode automatically processes the Info.plist, you should not add it to your Copy Bundle Resources build phase or make it a target member.

To resolve this warning, select your Info.plist from the Copy Bundle Resource build phase as shown in Figure 1, then click the Remove (–) button to delete it from the phase.