Re: Info.plist: ${PRODUCT_NAME} versus ${PRODUCT_NAME:identifier}
Re: Info.plist: ${PRODUCT_NAME} versus ${PRODUCT_NAME:identifier}
- Subject: Re: Info.plist: ${PRODUCT_NAME} versus ${PRODUCT_NAME:identifier}
- From: Chris Espinosa <email@hidden>
- Date: Tue, 3 Feb 2009 21:15:14 -0800
On Feb 3, 2009, at 4:39 PM, Stuart Malin wrote:
I am trying to discern the difference between
${PRODUCT_NAME}
and
${PRODUCT_NAME:identifier}
as used in the Info.plist file.
I have done a reasonable amount of searching online and through the
docs, but have found nothing (except for a lot of iPhone related
confusion in regard to setting these for provisioning).
I know that PRODUCT_NAME is a Build Setting for a Target. And so see
how ${PRODUCT_NAME} would initialize the Bundle name Key of the
Info.plist file. Why is the Bundle identifier Key not set similarly,
as:
com.myCompanyName.${PRODUCT_NAME}
but rather uses the :identifier addendum? What refinement or
distinction is being made by the inclusion of the latter?
The latter is a newer idiom supported by later versions of Xcode (I
forget where we added it, somewhere around 3.1).
People were creating PRODUCT_NAMEs that were not valid for XML, and
they were causing the loading of the Info.plist to break due to
invalid XML. The project templates now use :identifier to make sure
that the bundle identifier is correctly formed.
I have to note two things:
- You're using braces. You want parentheses.
- :identifier is technically wrong; it may give characters that are
valid XML but not technically valid reverse-DNS-form entries (like
com.myCompanyName.Mah-Jongg). In the DNS system, the only legal non-
alpha character is the underscore. While most systems are lenient
about this, the Apple iPhone App Store portal is in fact not lenient,
and will reject bundle identifiers that are not legal reverse-domain
syntax.
Chris
_______________________________________________
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