• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: proprocessing info.plist files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proprocessing info.plist files


  • Subject: Re: proprocessing info.plist files
  • From: Steve Mills <email@hidden>
  • Date: Mon, 5 Dec 2005 16:15:56 -0600

On Dec 5, 2005, at 12:09, David Ewing wrote:

I have gotten this to work with some contortion of preprocessor magic, but there's a much easier way. Just add "-traditional" to INFOPLIST_OTHER_PREPROCESSOR_FLAGS. Then you should be able to just do:

<key>CFBundleVersion</key>
<string>kMajor.kMinor.kBugFix</string>

That doesn't quite do it either. I have a prefix file being included that defines:


#if BETA_OR_DEBUG_BUILD == 1
	#define kAppVersion kMajor.kMinor.kBugFix#b##kBuild
#else
	#define kAppVersion kMajor.kMinor.kBugFix
#endif

kAppVersion is then used in multiple places. What gets generated is this:

#define kAppVersion 8.0.0#b##50
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http:// www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
//<string>MY_PRODUCT_NAME</string>
<string>MultiAd Creator Pro DB</string>
<key>CFBundleName</key>
<string>Creator</string>
<key>CFBundleIconFile</key>
<string>AppIcon</string>
<key>CFBundleIdentifier</key>
<string>com.multiad.creator</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>Crtr</string>
<key>CFBundleVersion</key>
//<string>8.0b50</string>
<string>kAppVersion</string>
snip


Notice that the definition gets written to the file and it doesn't replace kAppVersion at the end of the pasted portion. But also notice that the version number 8.0b50 in the *commented out* line is defined in the prefix file as:

#define kCreatorWholeVersion 8.0b50

And the Info.plist source file has that line as:

	//<string>kCreatorWholeVersion</string>

So something is very much whacked with this whole Info.plist compiler/ preprocessor. This part was added recently to work around all the problems with preprocessing this stuff, as was the commented out MY_PRODUCT_NAME line. I'll just have to keep using my workaround until Apple makes this right.

Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: 
 >proprocessing info.plist files (From: Steve Mills <email@hidden>)
 >Re: proprocessing info.plist files (From: David Ewing <email@hidden>)

  • Prev by Date: Re: Mysterious error... to a newbie
  • Next by Date: invalid code compiling in Xcode 2.2, but only in one project
  • Previous by thread: Re: proprocessing info.plist files
  • Next by thread: Re: proprocessing info.plist files
  • Index(es):
    • Date
    • Thread