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

IosIphoneXcodeBuildTarget

Ios Problem Overview


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?

Ios Solutions


Solution 1 - Ios

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.

Solution 2 - Ios

To fix in xcode 4:

  1. Remove the reference to your info.plist file by selecting it and hitting delete.

  2. Add the info.plist file again but choose no destination and uncheck the "add to targets" option.

Solution 3 - Ios

In case anyone runs into this with Xcode 3, to fix it click on the .plist file in the left column under "Groups and Files", and in the upper right area, uncheck the box next to the .plist file's name in the column under the bullseye icon. You'll need the editor zoomed out (View -> Zoom Editor Out) to show the checkboxes.

Solution 4 - Ios

Another solution is:

You might have accidentally removed a project file from the "target membership" core data.

  1. Select your Main.storyboard from the project navigator on the left

  2. Go to the "file inspector" (first tab) on the right

  3. Find the "Target Membership" list

  4. Enable the check box

  5. Give it a little time to process, but while your at it, also check the LaunchScreen.storyboard, .xcdatamodelid, Assets.xcassets, and all .swift files in your project. They should all have been enabled for target membership.

  6. Note: the Info.plist should not have the target membership checked enabled.

Hope this helps.

Solution 5 - Ios

For me, this was related to this ionic framework post

The only difference was that I changed the

CODE_SIGN_IDENTITY = iPhone Distribution
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution

to

CODE_SIGN_IDENTITY = Apple Development
CODE_SIGN_IDENTITY[sdk=iphoneos*] = Apple Development

instead of "iPhone Developer" as described in the post, as per Xcode's own suggestion. Also, I am using cordova not ionic. If you are too, this file is located in platforms/ios/cordova/build-release.xconfig

ps: remember to have your project's signing settings as automatic (even unckecking/checking it again helps)

Solution 6 - Ios

Just as a note... I'm gonna try to write a nice Radar about it, but it's really weird the way Localization is handled in Storyboards in Xcode. If you ask "Show in Finder", you won't see your .storyboard file selected but instead its containing folder. I think it has to do with Localisation of the Storyboard. As soon as I changed that from English to German (and thus not having the file anymore in either root or en.lproj), I started to have trouble.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionnevan kingView Question on Stackoverflow
Solution 1 - IosJWWalkerView Answer on Stackoverflow
Solution 2 - IosBuchannonView Answer on Stackoverflow
Solution 3 - IosMarcView Answer on Stackoverflow
Solution 4 - IosCrazyOneView Answer on Stackoverflow
Solution 5 - Iosce-locoView Answer on Stackoverflow
Solution 6 - IosStuFF mcView Answer on Stackoverflow