johnhook: The answer to your question about using the text exactly as it appears in Xcode is an unfortunate one: Xcode's templates and sample code change regularly. So regularly, that keeping up with small syntactical changes in text is nearly impossible.
In fact, with the curly-bracket-on-same-line-or-next-line that geo3rge mentioned, Xcode itself is inconsistent. Creating a new file that contains template code usually has method/function implementations with the curly bracket on the next line, however, you'll see in later chapters that some of the code that Xcode can generate on your behalf places the curly bracket on the same line.
We are happy to help understand any discrepancies between what you see in the book and on the screen, but that such discrepancies will crop up is unfortunately inevitable. :-/