Monday, October 3, 2011

Xcode and git

If you are going to build enterprise applications you really need to use a good SCM.  I intend to look at how to integrate iOS apps within a larger application.  I have used SCM systems for more than 25 years and my current favorite is git.  I was using Hg before on a Java EE project but git has more and better tool support, IMHO.  I also love GitHub.

By default git will be used for any new Xcode project you create.  You have to uncheck the option during project creation if you don't want it. If you leave it checked Xcode will be create the default files for the project and it will do the initial commit.  After that you control the commits.  In this example I have added some code to the example in chapter 2 of Conway and Hillgras's book, iOS Programming, The Big Nerd Ranch Guide, 2nd  One way to access the git commands is via the File menu.

Xcode scm menu

Since I just added some code I want to do a simple commit. This brings up window shown below.  You can not complete the commit until you have added a comment.

XCode git commit screen

Note you can see the diffs of any file being committed.  Not a bad interface for commits.  I'll be commenting on other features of git integration as I use them.

You can also view the SCM repositories and see change history from the same File>Source Control menu.

List of Xcode Repositories

Saturday, October 1, 2011

iOS Programming

Well, I have toyed around with Objective C over the years but never quite made the jump. Then last week I got an autographed copy of iOS Programming, the Big Nerd Ranch Guide, 2nd Editionby Joe Conway and Aaron Hillegrass for my birthday. How cool was that and just at a time I am thinking about enterprise applications that use iPads and iPhones. So now the juices are flowing again.

An added plus is Xcode 4.1 includes git integration.  So, over time I will be adding posts here on iOS programming and interfaces to Rails.

Stay tuned.