Snow Leopard and Static Code Analysis in Xcode

Posted on: by: skumancer

I’ve been enjoying Snow Leopard for a while. While developing my current application for the iPhone, I’ve been taking full advantage of Clang/LLVM’s static analysis. I’ve found it to be and indispensable tool now. I’ve been able to identify at least 20 memory leaks and other random bugs just by doing a “Build and Analyze”.

As John Siracusa puts it in his review of Snow Leopard:

I’m sure Apple is going hog-wild running the static analyzer on all of its applications and the operating system itself. The prospect of an automated way to discover bugs that may have existed for years in the depths of a huge codebase is almost pornographic to developers—platform owners in particular. To the degree that Mac OS X 10.6.0 is more bug-free than the previous 10.x.0 releases, LLVM surely deserves some significant part of the credit.

These were my exact thoughts when I first witnessed the power of the mighty tool.
For further info, check Ars Technica’s review of Snow Leopard.

Categories: Apple
Tags: , , , ,

iPhone Development

Posted on: by: skumancer

Over the last few weeks, I’ve been delving deeply into the iPhone SDK and Mac OS X development. Although Mac OS has been my platform of choice and everyday usage for a long time, I hadn’t had the time to develop for it. I worked on Objective-C a little bit a few years ago, but I didn’t really commit to it.

I’m now done with the first version of my 2D engine for the iPhone. I’ll start coding and design for my game project in this week, now that I have a solid, stable framework to work on.

Here are some development screenshots:

Version Control in Xcode

Posted on: by: skumancer

 

 

Xcode Version Control
Version control is a beautiful thing. I started using SVN last semester and I’m in love with it. TortoiseSVN is a great client in Windows, but, what about Mac OS X?
There are a few alternatives, SCPlugin comes to mind and its very similar to TortoiseSVN, although not as mature. Xcode, Apple’s IDE for Mac OS X includes a Subversion Control Management feature that lets you add repositories and control them, all from the same development interface you are using.
The big problem is that I didn’t read any instructions on how to do it. I found out the hard way (trial and error) how it works. I’m going to make someone’s life easier by outlining some basic steps.
1. Click on SCM menu, then choose Repositories.
2. Click on the Configure icon on the far right.
3. Click on the + icon on the lower left corner.
4. Configure your repository depending on the type you use (SVN, CVS or Perforce), then apply your settings.
5. Back on the Repositories window, choose your repository.
6a. If you are checking out a project, just select a directory from the browser and click on “Checkout”.
6b. If you are adding a project, select or create a directory to put the project in and then click on “Import”.
7. If you are checking out an existing project, Xcode will ask you if you want to open the project, do so.

I hope this helps someone.

Categories: Apple, Game Dev., General
Tags: , ,