Skip to content

xCode practices between multiple developers

by Colin on January 6th, 2010

For the past month or so I've been involved with creating 2 iPhone applications at work. I was the sole developer on the first but worked with one other developer on the latter. Seeing as this was our first experiences with xCode and Objective C, there's a few good techniques I'd like to note when it comes to organization.

First off, when organizing your classes/images/audio/etc files, it's always great to create "Groups" in your xCode's "Groups & Files" panel. When you create your project, you'll notice how the parent folders of your application's name is organized into 5 groups: Classes, Other Sources, Resources, Frameworks, and Products. It's great to keep adding groups as parents of these folders to organize those files.

Changing your files' "Path Type" is also imperative in synchronizing files between multiple developers/computers. To get to the Path Type, right-click (ctrl+click) your file(s) and hit 'Get Info'.
Under the General tab of the pop-up you'll see your Path Type. xCode defaults files to being "Relative to Enclosing Group".

If you're going to organize your files into folders in Finder and then add them into xCode without checking "Copy items into designation group's folder (if needed)", it's imperative to change the Path Type to "Relative to Project". You'll notice the Path under your files' Name will change.

Example: Adding a Default.png image to the application. The image exists in my "Application's folder/images" folder.
Name: Default.png
Path: images/Default.png

This changes the application's start up image so that it doesn't need to be in the same folder as your .xcodeproj file.

From → iPhone

No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS