Change a localized InfoPlist.strings using an Xcode target

Posted by nevan on Stack Overflow See other posts from Stack Overflow or by nevan
Published on 2010-06-11T23:26:04Z Indexed on 2010/06/11 23:32 UTC
Read the original article Hit count: 332

Here's an obscure problem. I'm using an InfoPlist.strings to localize my app name. It's only got one value: CFBundleDisplayName = "Mon App". The strings file is localized (putting it in a directory for that localization).

I've just made an extra target, where I change things like the non-localized app name (different Info.plists), and the icon. I'm also changing the Default.png using a run script build phase (copying different files depending on the app type I'm building).

I've tried using the script to copy different versions of my InfoPlist.strings, but I couldn't make it work. Here's what I used:

if($TARGET_NAME == "MonApp")then
cp fr.lproj/MonApp_InfoPlist.strings fr.lproj/InfoPlist.strings
endif

I've seen a post suggesting wincent strings util for processing strings, but wanted to see if there's an easy way to do this. Any help greatly appreciated.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about xcode