tags:

views:

311

answers:

1

I have a settings bundle in an iPhone app which has several subtle variant targets.

The problem is I need to customise some strings in each settings bundle to make them appropriate for each target. It appears that if the Settings bundle is named anything other than Settings.bundle it won't pick up the bundle (understandable, can I specify in a plist somewhere the alternate name?).

If I try and put them in different folders and call them the same thing Xcode gets horribly confused and lets you edit "2 files" that are actually the same single source.

+1  A: 

I see no problem. For every target, create a specific folder with files for this target. Now create a group in Xcode for every of those folders and drag each of the new Settings.bundle directories to the corresponding group. When adding the bundles to the project, make sure that every bundle is only built (included) for its target by checking the appropriate box.

MrMage
This is what I tried but it seems within the file system all the files are contained at the root of project folder so the 2 "seperate" Settings.bundle files are actually a single file. Do I need to manage the filespace manually first before importing them in to Xcode?
andybee
I told you to create a *folder*. For me, that's a filesystem entity. Of course you have to have every bundle on a different, target-specific location.
MrMage
Sorry, my bad. As a n00b I'm used to just doing grouping in Xcode and using the 'copy to destination' option a lot. It would actually help my tidy filesystem OCD problem to manage the files nicely in Finder and just drop the references in the project. I got it working now though, many thanks.
andybee
Thank you! Really helped me (:
Emil