Book Image

Mac Application Development by Example: Beginner's Guide

By : Robert Wiebe
Book Image

Mac Application Development by Example: Beginner's Guide

By: Robert Wiebe

Overview of this book

It's never been more important to have the ability to develop an App for Mac OS X. Whether it's a System Preference, a business app that accesses information in the Cloud, or an application that uses multi-touch or uses a camera, you will have a solid foundation in app development to get the job done.Mac Application Development by Example takes you through all the aspects of using the Xcode development tool to produce complete working apps that cover a broad range of topics. This comprehensive book on developing applications covers everything a beginner needs to know and demonstrates the concepts using examples that take advantage of some of the most interesting hardware and software features available.You will discover the fundamental aspects of OS X development while investigating innovative platform features to create a final product which take advantage of the unique aspects of OS X.Learn how to use Xcode tools to create and share Mac OS X apps. Explore numerous OS X features including iCloud, multi-touch trackpad, and the iSight camera.This book provides you with an illustrated and annotated guide to bring your idea to life using fundamental concepts that work on Mac.
Table of Contents (17 chapters)
Mac Application Development by Example Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – examine the items in the project navigator


  1. In Xcode, open the SimpleCalc project.

  2. Click on the disclosure triangles beside each folder icon in the project navigator to reveal all of the items that Xcode created as shown in the following screenshot:

  3. We don't, yet, need to understand everything that the Xcode template has done for us, but it is important to understand each of the main types of files in these folders. The file type is determined by the file extension (.h, .m, .app, and so on).

What just happened?

We examined the contents of the Xcode project template and gained a better understanding of the different types of files that are needed to create a Mac OS X App. While it is not important, yet, to understand each of the different file types in detail, it is important to have an overview of all of the different components that are needed to create a Mac OS X App. As we develop our own Apps, we will acquire a much better understanding of these files and their contents.

Each file type is explained in the following table:

Extension

Description

.h

A program header file is used to separate the interface from the implementation. It defines what can be done but not how it is done.

.m

A program implementation file. It defines how things are done..

.xib

An Interface Builder file. It defines what the program interface, including windows, buttons, text fields, and so on will look like.

.plist

A property list. It contains a list of keys and corresponding values. The Info.plist includes important App information (like App name, App version, App copyright, and so on.)

.strings

A list of strings that are localizable ( translated into other languages). The InfoPlist.strings file contains localized versions of some of the strings found in the Info.plist file.

.pch

A precompiled header file. When we build our program the files are compiled into a single runnable file. Because compiling takes time, the compiler will precompile the .h files and save them in the .pch file. This is used to make building the App faster.

.rtf

A rich text formatted file. Rich text, differs from standard text, in that it can contain things like bold, italics, and embedded images. The Credits.rtf file is automatically displayed by the standard About window for our App.

.framework

A framework is a bundle (and a bundle is just a folder that looks like a file) that contains .h, .xib, and library files. Frameworks are provided by Apple to perform common functions (like displaying windows) so that we don't need to write that program code ourselves.

.app

An app is a bundle that contains everything our App needs to run.