Re: Proprocessing Info.plist files for iPhone Apps
Re: Proprocessing Info.plist files for iPhone Apps
- Subject: Re: Proprocessing Info.plist files for iPhone Apps
- From: Dave Carrigan <email@hidden>
- Date: Tue, 12 Oct 2010 11:29:13 -0700
On Oct 11, 2010, at 7:36 AM, Jeff Kelley wrote:
> We have an app for which we need to change some settings in the Info.plist file based on the currently-selected build configuration. I’ve tried going into the build settings (for both the target and the project) to get it preprocessed, but to no avail. I’m selecting “Preprocess Info.plist” and providing a definition in “Info.plist Preprocessor Definitions,” but the definition is never expanded in my Info.plist file. Is this supported and, if so, how does one go about actually getting the preprocessor definition expanded in the Info.plist file?
>
> If it matters, I’m trying to define separate code signing paths: different build configurations have different bundle identifiers. I tried defining APPDOMAIN, then in my Info.plist:
>
>> <key>CFBundleIdentifier</key>
>> <string>APPDOMAIN.${PRODUCT_NAME:rfc1034identifier}</string>
>
> Thanks in advance for any help.
You should be using $APPDOMAIN, not just APPDOMAIN.
You can also do post-processing as a run script step. It needs to happen fairly early on, before the code signing happens, but fortunately the Info.plist is copied to the build directory quite early.
The Info.plist is in $BUILT_PRODUCTS_DIR/$INFOPLIST_PATH and there is a nice little program called /usr/libexec/PlistBuddy that can get and set keys in the plist.
--
Dave Carrigan
email@hidden
Seattle, WA, USA
_______________________________________________
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