This book aims to provide beginners with an introduction to the programming of Mac OS X Apps using Cocoa, and XCode, the free developer tools provided by Apple, Inc. Examples of Mac apps are: iTunes, Safari, Mail, iCal, Address Book, Microsoft Word, Microsoft Excel, etc. Using Objective-C, Cocoa and XCode as taught in this wikibook will start your education in how to develop Mac apps.

Many of the skills that you learn in this wikibook can be used to build apps for iOS but there are some differences between Mac OS X apps and iOS apps. This book focuses on Mac OS X apps.

Some knowledge of another programming language, preferably Objective-C. The following link is a link to a wikibook that covers Objective C Programming.

Apple has a Mac App Store where it can sell your Mac apps for you and they will pay you 70% of the proceeds. The Mac App Store is available for users of Mac OS X, 10.6 and later by choosing from the Apple menu "App Store...".

In general, this text is written to be followed in order from start to finish except that if you have experience in C, C++, Java or Python, you are encouraged to look at the relevant section of the Appendix to orient you to developing for Mac OS X and Cocoa.

As each topic develops, it builds on the code written previously to add complexity and functionality, so you are advised to read this wikibook from start to finish in the order that it was written.

Contents

What Is Cocoa?

Building a Simple Mac App

Building Blocks of Mac OS X Apps

  • The Objective C, the Language and Its Advantages
  • Frameworks
      • The Foundation Framework
      • The Cocoa Framework
      • The Appkit Framework
      • Other Frameworks

Building More Complex Mac Apps

More About the Cocoa Framework

  • Some Cocoa Essential Principles

Model-View-Controller (MVC) Design Pattern

  • What MVC Is For
  • The Model
  • The View
    • Windows
    • Menus
    • Other Standard Views
    • Custom Views
      • Nib Files for Custom Views
      • Objective-C Code for Custom Views
  • The Controller

More Cocoa Classes

  • Containers: Arrays, and Dictionaries

Other Application Types

  • Document-based applications
  • Core Data Applications

Managing Source Code

  • Using Git

The Wikidraw App

  • A Simple Drawing App
  • Implementing Wikidraw
    • Wikidraw's View Class
    • More Shapes
    • Inspector Calls
    • Archiving
    • Adding Finesse

Where to Go Next

  • Selling a Mac App on Apple's Mac App Store
  • Porting a Mac App to iOS

Appendix

  • Orientation For C Programmers
  • Orientation For C++ Programmers
  • Orientation For Java Programmers
  • Orientation For Python Programmers
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.