• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to set Xcode defaults
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to set Xcode defaults


  • Subject: Re: How to set Xcode defaults
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 18 Sep 2011 11:19:47 -0700

On Sep 18, 2011, at 1:53 AM, Gerriet M. Denkmann wrote:

> Whenever I create a new project, I always have to set quite a few build options or stuff in Info.plist (like _my_company_name).
> Is there a way to make these changes once and tell Xcode to use these settings in all new projects?

Make an xcconfig file containing your shared settings, and tell each project to use it. You can still set per-project settings in the GUI that will override the xcconfig. You can also have xcconfig files #include each other.

For some reason there’s virtually no documentation on these — the @*$& inane “Xcode For Teh Dummiez” help in Xcode 4* just patronizingly shows you how to base a configuration on an xcconfig file (with a video!) ... without any indication of what you’re supposed to put in such a file.

What I learned on the street from the big kids: xcconfig files are basically just lists of key-value pairs, one per line, like this:
	GCC_C_LANGUAGE_STANDARD = gnu99
The keys are the same as the internal names of build settings, that you can see in the contextual help for each build setting.
The file is processed using the C preprocessor, so C99 comments and #include statements work. (Not sure about #define, never tried it.)

The thing I can’t figure out is how to convert an existing set of target build settings into an xcconfig file. There used to be a menu item for it in Xcode 3 but it’s missing in Xcode 4.

—Jens

* WTF is wrong with Apple’s developer documentation? It used to be pretty good, and a lot of it still is, but overall it’s getting patchier and less useful all the time. Don’t EVEN get me started about the iOS [and now Lion] Keychain APIs, GRRRR.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to set Xcode defaults
      • From: Christian Unger <email@hidden>
References: 
 >How to set Xcode defaults (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: Xcode always compiles all files
  • Next by Date: Re: Xcode always compiles all files
  • Previous by thread: How to set Xcode defaults
  • Next by thread: Re: How to set Xcode defaults
  • Index(es):
    • Date
    • Thread