Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

iPhone: Multi-Target build with Settings.bundle

I'm not really used to XCode as an IDE yet, so I'm not sure how to do this: I have an application that has several targets, each of which builds the application differently, as different clients require different sections of the code.

As each target allows me to specify a distinct info.plist type file, I have no problems there. The issue arises when I try to make a custom Settings.bundle file, since Settings.bundle MUST be named correctly, and MUST be in the root directory, therefore not allowing me to make a custom settings bundle for each. This is important, as I wish to remove the settings for certain segments of the software when those segments are removed from the build.

How can this be done?

iPhone 3G, Other OS, 2.0+

Posted on Sep 25, 2008 1:41 AM

Reply
4 replies

Sep 26, 2008 1:39 PM in response to MattSchultz

I have a project with two targets and have a separate Settings.bundle for each project. Here's what you do (if I remember correctly): I am assuming you already have one settings bundle, if not create it in the usual way through "New File". Now, first, make sure the Settings.bundle is only associated with one of your targets, by clicking the settings.bundle and then opening the info button for it (command-I) and unchecking the box for the other target.

Now create another copy of the Settings.bundle in Finder. You need to put the second copy in another folder so that you can rename it back to Settings.bundle, so create a folder in your Xcode project folder to put the new settings.bundle in. Then rename it to Settings.bundle. Then drag the new bundle to your Xcode project. An action sheet will drop to ask you whether to add it to the project (yes), whether to copy it (you don't need to since it's already in a subfolder of the project folder), and which targets to add it to (check the box for the second target). Voila, now you have two Settings.bundle. It's a bit confusing since they have the same name so when you modify one of them you need to press command-I to make sure you're modifying the one you want, but it works.

The same instructions are valid for the Default.png file, by the way. Kind of a pain, I wish Apple added an option to specify the Default.png and Settings.bundle file names through the Info.plist.

iPhone: Multi-Target build with Settings.bundle

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.