Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Different Resources For Different Targets

I am developing an iPhone app and there will be a Full as well as a Lite version of that app. In order get both bundles from the same source code and Xcode project I added another target to the Xcode project.

Now, I want to have the Lite target copy only a subset of the resource files to the bundle. But, Xcode won't simply let me delete individual files from the "Copy Files to Bundle" build step, since I imported all my resources as folder references. I need this in order to maintain a directory structure in the resources directory.

How do I solve this problem? Any suggestions or ideas are greatly appreciated!

like image 330
FlorianZ Avatar asked Jun 21 '09 07:06

FlorianZ


People also ask

How do I create a specific target in Xcode?

Choosing Build from the Build menu or clicking the Build button in the toolbar builds the target specified in the Active Target drop-down menu in the toolbar and not the target or source file currently selected in the Groups & Files list. You can change the compilation order of the Xcode target.

What is difference between target and scheme in Xcode?

A Target specifies a product to build and contains the instructions for building the product from a set of files in a project or workspace. An Xcode scheme defines a collection of targets to build, a configuration to use when building, and a collection of tests to execute.


1 Answers

In the left-hand panel of Xcode, right-click on the "Groups & Files" bar at the top. Check "Target Membership".

Now you'll see a tick against every file that should be included in your current build target. Untick the ones you don't want, switch to your other target, and repeat.

like image 191
Kris Jenkins Avatar answered Sep 28 '22 12:09

Kris Jenkins