willc2
willc2

Reputation: 39671

In Xcode, how to exclude a file with a set name from being put in the app bundle

When I start an Xcode project I drag in a blank readme.txt file that I use to take notes with while I'm figuring things out. The thing is, the file gets put in the app bundle at build time. Then I have to deselect it in the Detail view so that won't happen.

Is there a way to automatically exclude a file with a known name from every build?

I know Xcode is automatable, but I don't know where to look.

Using the latest non-beta Xcode version.

Upvotes: 4

Views: 1533

Answers (1)

mikecsh
mikecsh

Reputation: 862

In the project outline view (by default this is the left hand pane when you open Xcode) locate your application under the 'Targets' section. Expand the subheadings, one of which will be 'Copy bundle resources'. You will probably find your unwanted text file has been placed here automatically. Highlight the file here and delete it - this will leave the file in your project but will prevent Xcode from copying it to your App bundle when you perform a build. To finish off, select 'Clean & Build' from the Xcode build menu to clear out your old bundle completely and recreate it with your new setting.

Upvotes: 4

Related Questions