Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Info.plist Warning?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Info.plist Warning?



On Aug 24, 2008, at 7:01 PM, Andrew Merenbach wrote:

On Aug 24, 2008, at 4:10 PM, J. Todd Slack wrote:

I am getting a warning of:

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

I guess I dont understand why this is bad..can anyone explain?

My guess would be this: the Copy Bundle Resources phase appears to copy files to your bundle's "Resources" subdirectory; the Info.plist file, however, belongs directly inside of the bundles Contents folder -- that is to say, one level up from the Resources subdirectory. Thus copying Info.plist to that would serve little purpose, and might even be evidence of programmer oversight on something (as Xcode might think), hence the warning. Hope this helps!

Indeed, that's correct. The Info.plist should not actually be a member of any target. The checkboxes in the Get Info window should be unchecked.


Instead, the target should have the INFOPLIST_FILE build setting set to the name (or relative path) of the Info.plist file.

In addition to it not going into the Resources directory, this is because an Info.plist should generally be processed specially. There are usually build setting references in an input Info.plist that need to be substituted. Or, you can specify that the file be processed with the C preprocessor. Also, the INFOPLIST_FILE setting need not name a file called "Info.plist". It can be important if there are multiple targets for there to be files like "Info-myFirstTarget.plist" and "Info-myOtherTarget.plist" or whatever. So, that's another reason why a direct copy isn't appropriate.

Cheers,
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Info.plist Warning? (From: "J. Todd Slack" <email@hidden>)
 >Re: Info.plist Warning? (From: Andrew Merenbach <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.