You are previewing Mac Application Development by Example Beginner's Guide.
O'Reilly logo
Mac Application Development by Example Beginner's Guide

Book Description

"

A comprehensive and practical guide, for absolute beginners, to developing your own App for Mac OS X with this book and ebook.

  • Start developing applications for Mac OS X

  • Learn how to take advantage of Mac features such as the iSight camera and the multi-touch trackpad

  • Use Xcode to its full potential to make tasks simpler

In Detail

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

  1. Mac Application Development by Example Beginner's Guide
    1. Table of Contents
    2. Mac Application Development by Example Beginner's Guide
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Our First Program – SimpleCalc
      1. Locating developer tools
      2. Time for action - Installing the Xcode App
        1. What just happened?
      3. Working with projects
      4. Time for action - creating the SimpleCalc Xcode project
        1. What just happened?
      5. Understanding the Xcode project template
      6. Time for action – examine the items in the project navigator
        1. What just happened?
      7. Configuring an Xcode project
      8. Time for action - configuring the SimpleCalc Xcode project
        1. What just happened?
        2. Have a go hero – make your own icon
      9. Running an App
      10. Time for action – run the SimpleCalc App
        1. What just happened?
      11. Customizing an Xcode template's interface
      12. Time for action – creating the SimpleCalc interface
        1. What just happened?
      13. Customizing an Xcode template's implementation
      14. Time for action – implement the SimpleCalc behavior
        1. What just happened?
      15. Building an App
      16. Time for action – building and installing the SimpleCalc App
        1. What just happened?
      17. Summary
    9. 2. Debugger – Finding and Fixing Problems
      1. The Debug area in Xcode
      2. Time for action – displaying the Debug area in Xcode
        1. What just happened?
      3. The Debug area appears on its own
      4. Time for action - integer division by zero
        1. What just happened?
      5. Examining variable values in the debugger
      6. Time for action – examining a variable value
        1. What just happened?
      7. Unexpected App behavior – no debugger?
      8. Time for action – index out of range
        1. What just happened?
      9. Using breakpoints to get more information from Xcode
      10. Time for action – set a breakpoint
        1. What just happened?
      11. Summary
    10. 3. System Preferences – NewDefaults
      1. Understanding preference panes
      2. The transition to 64 bit from 32 bit
      3. Creating an Xcode preference pane project
      4. Time for action – creating the NewDefaults Xcode project
        1. What just happened?
      5. Configuring an Xcode preference pane project
      6. Time for action – customizing the icon and copyright
        1. What just happened?
        2. Have a go hero – making our own icon
      7. Customizing the preference pane template interface
      8. Time for action – creating the NewDefaults interface
        1. What just happened?
      9. Customizing the preference pane Xcode template's .h implementation
      10. Time for action – completing the NewDefaults.h interface definition
        1. What just happened?
      11. Customizing the preference pane Xcode template's .m implementation
      12. Time for action – completing the NewDefaults.m implementation
        1. What just happened?
        2. Implementing the readDefaults:forKey: method
      13. Time for action – writing the readDefaults:forKey: program code
        1. What just happened?
        2. Implementing the didSelect: method
      14. Time for action – writing the didSelect: program code
        1. What just happened?
        2. Implementing themyButtonAction: method
      15. Time for action – writing the myButtonAction: program code
        1. What just happened?
        2. Have a go hero – adding some warning text
      16. Summary
    11. 4. Business Application – Global Currency Converter
      1. Designing the GUI for global currency converter
      2. Time for action – creating our project and GUI
        1. What just happened?
        2. Have a go hero – configuring the Xcode project and icon
      3. Connecting the GUI to program elements
      4. Time for action – connecting the App Delegate to the GUI
        1. What just happened?
      5. What is an XML file?
      6. Format of the XML file we will download
      7. Time for action – downloading an XML file
        1. What just happened?
      8. Parsing an XML document
      9. Time for action – parsing the XML Document
        1. What just happened?
      10. How to invoke a background thread
      11. Time for action – invoking a background thread
        1. What just happened?
      12. Managing a pop-up menu
      13. Time for action – implementing the program code for the pop-up menu
        1. What just happened?
      14. Creating the Table View Interface
      15. Time for action – configuring the table view in Interface Builder
        1. What just happened?
      16. Creating the table view implementation
      17. Time for action – implementing the dataSource and delegate
        1. What just happened?
        2. Have a go hero – adding a rate column
      18. Summary
    12. 5. Personal Information – Numbers in the iCloud
      1. What is iCloud?
      2. Installing an iCloud enabled development profile
      3. Time for action – creating and installing an iCloud enabled development profile
        1. What just happened?
      4. Designing the GUI for numbers in the cloud
      5. Time for action – creating our project and GUI
        1. What just happened?
      6. Connecting the GUI to program elements
      7. Time for action – connecting the App Delegate to the GUI
        1. What just happened?
      8. Using two tables in one window
      9. Time for action – implementing the TableView delegate
        1. What just happened?
        2. Have a go hero – using two dataSource and delegate objects
      10. Implementing the toolbar
      11. Time for action – implementing the Toolbar delegate
        1. What just happened?
        2. Have a go hero – using four different target actions
      12. Accessing iCloud
      13. Time for action – accessing iCloud for key-value storage
        1. What just happened?
      14. Summary
    13. 6. Painting – Multi-finger Paint
      1. What is multi-touch?
      2. Implementing a custom view
      3. Time for action – creating a GUI with a custom view
        1. What just happened?
      4. How to receive multi-touch events
      5. Time for action – drawing our fingers
        1. What just happened?
      6. How to manage the mouse cursor
      7. Time for action – detaching the mouse cursor from the mouse hardware
        1. What just happened?
      8. Performing 2D drawing in a custom view
      9. Time for action – drawing the active strokes
        1. What just happened?
      10. Saving strokes
      11. Time for action – saving the strokes
        1. What just happened?
        2. Have a go hero – implementing a Pen Down checkbox
      12. How to receive gesture events
      13. Time for action – handling rotate gestures
        1. What just happened?
        2. Have a go hero – implementing swipe to clear
      14. Summary
    14. 7. Capturing Still Images – iSight iMage cApture App
      1. What is Image Kit?
      2. Adding framework to a project
      3. Time for action – creating a project and adding the Quartz framework
        1. What just happened?
      4. Browsing images
      5. Time for action – implementing the interface for browsing our pictures folder
        1. What just happened?
      6. Time for action – implementing the methods for browsing our Pictures folder
        1. What just happened?
        2. Have a go hero – placing some images in the iSight iMage cApture folder
      7. Capturing and saving images
      8. Time for action – capturing and saving images
        1. What just happened?
      9. Modifying the behavior of the Picture Taker
      10. Time for action – drawing our fingers
        1. What just happened?
        2. Have a go hero – making more changes to the Picture Taker behavior
      11. Deleting images
      12. Time for action – deleting an image
        1. What just happened?
      13. Summary
    15. 8. Video Recording – iSight Recorder
      1. What is Quicktime Kit Capture?
      2. Previewing the video capture
      3. Time for action – creating a project and adding the program code to preview video and audio
        1. What just happened?
      4. Capturing a single frame as a still image
      5. Time for action – capturing a frame
        1. What just happened?
        2. Have a go hero – skipping the first frame(s)
      6. Previewing audio capture
      7. Time for action – capturing and saving images
        1. What just happened?
      8. Capturing a movie to disk
      9. Time for action – capturing a Quicktime movie
        1. What just happened?
        2. Have a go hero – replacing literals with symbols
      10. Capturing compressed movies to disk
      11. Time for action – saving a compressed movie
        1. What just happened?
      12. Summary
    16. 9. Video Recording – Full Screen iSight Recorder
      1. What is the full screen mode?
      2. Enabling the full screen mode
      3. Time for action – enabling full screen mode in iSight Recorder
        1. What just happened?
      4. Disabling auto layout
      5. Time for action – using the traditional layout model
        1. What just happened?
      6. Modifying our user interface to take advantage of full screen
      7. Time for action – refining how we enter and exit full screen
        1. What just happened?
      8. Time for action – refining text colors
        1. What just happened?
      9. Time for action – refining controls using fading
        1. What just happened?
        2. Have a go hero – implementing a textColor getter for NSButton
      10. Customizing the full screen window size
      11. Time for action – adding a full screen window that has depth
        1. What just happened?
        2. Have a go hero – playing with the border define
      12. Customizing the full screen animation
      13. Time for action – customizing the full screen animation
        1. What just happened?
        2. Have a go hero – creating your own custom animation
      14. Summary
    17. 10. Sharing Our App with Others – Becoming a Mac Developer
      1. What is the Mac developer program?
      2. What are the benefits of joining the Mac developer program?
        1. Access to Development Videos, including World Wide Developer Conferences sessions
        2. Access to the Mac OS X Developer Library
        3. Access to the Apple bug reporter system
        4. Access to pre-release (beta) software
      3. The opportunity to join a paid developer program
        1. Access to developer forums
        2. Code level technical support
        3. Access to iCloud services
        4. A developer ID for gatekeeper
        5. The ability to distribute our App through the Mac App store
      4. Step by step developer program sign up
      5. Time for action – joining the Mac developer program
        1. What just happened?
      6. More developer tools
      7. Time for action – accessing the online developer tools
        1. What just happened?
      8. What is code signing?
      9. What is Gatekeeper?
      10. Signing an App with a Developer ID
      11. Time for action – signing an App with our Developer ID
        1. What just happened?
      12. Summary
    18. Index