Appletell | Apple, Mac, iPhone, iPod | News, Rumors, Reviews, How-Tos

Subscribe to our content for free: (?)
Get our Daily Email

iPhone Developer Intervention Week 8: File Types

by Josh Holat on May 19, 2009 at 08:09 AM

XCode IconNow that we’ve got beta testing out of the way, we can discuss the different file types found in XCode. When starting a new project, XCode allows developers to choose from a variety of different starting points for their applications. For iPhone developing, some of the options include Navigation Controller projects or Tab Bar Controller projects. These aren’t file types per se, but they do affect what files you start with.

In XCode, code files are split into a .h and a .m file. The files both have the same name, just different extensions. Typically, the .h file is the header file and contains variables and methods you are to include in the .m, or implementation file.  For example, the .h file would simply declare an IBOutlet variable (one used in Interface Builder), whereas a .m file would have the code that acts upon that variable. This separation of two files for the same code effectively can be both annoying and helpful. On one hand, it helps to keep code organized, but on another, it can be a pain to have to switch between files so often.

If you choose to use Interface Builder files in your project instead of coding the interface, you will also have .xib files.  These files are simply the drag and drop GUI views that can be altered in the IB interface and reference to in the code. As with the project types, these can also be chosen to be either Windows, Views, or Empty.  Along with these files are any image files you choose to use in your project.

Last but not least are .plist, or property list, files.  One of these files is originally included in any iPhone application project and contains the version number, icon file, and application name, among other things.  However, these can also be used to store data locally and easily, and are very useful.

See more iPhone Developer Intervention articles.

Subscribe to keep up with the latest Apple news and rumors! - Subscribe to our feed


Join the Discussion

Name: *

Email: *

Location (Links to Google Maps):

URL:

Enter Your Comment Below...

* Required fields

Remember my information?

Notify me of follow-up comments?

Submit the word you see below:


Special Features