Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
641 views
in Technique[技术] by (71.8m points)

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

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...