How can I configure Xcode to put '{' where I want it in generated files

Take a look at:

Xcode: Adjusting indentation of auto-generated braces?

Apple Xcode User Defaults

XCCodeSenseFormattingOptions = {
  BlockSeparator = "\\n";
  PreMethodDeclSpacing = "";
};

This should at least solve your problem after if, for, or while statements.


After digesting the helpful information from WhirlWind above (thanks), the resulting snippet (just cut and paste into terminal) is:

defaults write com.apple.Xcode XCCodeSenseFormattingOptions -dict BlockSeparator "\\n" PreMethodDeclSpacing ""

Stupid backslash quoting. When typed at the terminal, there should be TWO exactly TWO backslashes in the block separator.