mac application development by example

318 685 0
mac application development by example

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

www.it-ebooks.info Mac Application Development by Example Beginner's Guide A comprehensive and praccal guide, for absolute beginners, to developing your own App for Mac OS X Robert Wiebe BIRMINGHAM - MUMBAI www.it-ebooks.info Mac Application Development by Example Beginner's Guide Copyright © 2012 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmied in any form or by any means, without the prior wrien permission of the publisher, except in the case of brief quotaons embedded in crical arcles or reviews. Every eort has been made in the preparaon of this book to ensure the accuracy of the informaon presented. However, the informaon contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark informaon about all of the companies and products menoned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this informaon. First published: December 2012 Producon Reference: 1141212 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-84969-382-0 www.packtpub.com Cover Image by J.Blaminsky (milak6@wp.pl) www.it-ebooks.info Credits Author Robert Wiebe Reviewers Luca Bernardi John Dumais Dominik Jaworek Jamie B. McHardy Acquision Editor James Keane Lead Technical Editor Ankita Shashi Technical Editor Sharvari Baet Project Coordinator Amey Sawant Proofreader Steve Maguire Indexer Monica Ajmera Mehta Producon Coordinator Nilesh R. Mohite Cover Work Nilesh R. Mohite www.it-ebooks.info About the Author Robert Wiebe was born in 1961. He has more than 30 years experience designing, implemenng, and tesng soware. He wrote his rst App in 1979, as a high school student, using 6502 assembler code on an Ohio Scienc C2-4P computer with 8k RAM. More recently, he has focused on developing games and ulies for Mac OS X. His interests include a vintage computer collecon which includes many pre-IBM PC era microcomputers; Apple Macintosh computers starng with the SE/30 running Mac OS 7 through to the Macbook Pro running Mac OS X that he uses today. He has developed many popular Mac OS X Apps including ShredIt X, NetShred X, Music Man, iVCD, and many more. He has experience developing soware in a number of industries, including mining, nance, and communicaons. He has worked for a number of employers including Motorola as a Senior Systems Architect developing two-way wireless data systems and Infowave Soware as the Soware Development Manager for their Imaging Division. Aer working for other people's companies, he founded his own companies, Mireth Technology and Burningthumb Soware, which are his primary interests today. He is also the author of Unity iOS Essenal book (ISBN 978-1-849691-82-6). I would like to thank my son, Abram, who is a beginning Mac OS X programmer himself, for always asking quesons. I would also like to thank my wife, Donna, for not only encouraging me but also for making it possible for me to pursue the things I want to do. And nally, I would like to thank my daughter, Amanda, who keeps me focused on the things that really maer in life. www.it-ebooks.info About the Reviewers Luca Bernardi is from Milan, Italy. He is 25 years old, has a degree in Computer Science and he is currently pursuing a Master's Degree in Soware Development and Design. Luca is a passion-driven iOS engineer and a mobile enthusiast, has developed applicaons that have been awarded as Apple's App of the Week and top selling app. When he's not programming he really enjoys learning new things, reading books, and sports such as basketball, snowboarding, and running. I want to thank my family, Malde, Claudio, Veronica and Adread who have always supported me, giving me everything I need to follow my passions. To my father, Giorgio, who passed away when I was a child, who gave me my rst computer, an Apple II, and taught me to always follow my passion. To my amazing girlfriend, Veronica, who always has a smile for me. John Dumais has over 25 years of experience developing system and circuit simulaon soware on a wide variety of plaorms, including Mac OS X. He has been using Objecve-C since StepStone originally introduced it. Most recently, the reviewer has been developing system monitoring and control soware for iOS devices. The other book he has reviewed is: http://books.google.com/books/about/Visual_Programming_With_HP_VEE. html?id=lJRQPgAACAAJ www.it-ebooks.info Dominik Jaworek is an experienced SW professional living in Vancouver Area, Brish Columbia, with his wife and two kids. He has been working in mobile SW area for more than 14 years experiencing all aspects of Soware Engineering, starng from development through business analysis, product management and R&D management. He has also been involved in accessibility technologies and soluons, and parcipated and presented in the CSUN 2001 conference. Dominik loves the outdoors and he tries to take every opportunity for trips and hikes with his family. Also he has always been fascinated with and interested in cars so it's no surprise that with his engineering soul he is an avid motorsports fan. Jamie B. McHardy is originally from the Isle of Man. He has worked in the mobile telecommunicaons domain for over a decade. He has developed embedded middleware used in millions of devices globally on technologies ranging from communicaon protocols to audio playback to digital security. Now based in Vancouver, Canada, he is father to one, has a passion for General Aviaon and is due to wed his beauful ancé in the summer of '13. www.it-ebooks.info www.PacktPub.com Support les, eBooks, discount offers and more You might want to visit www.PacktPub.com for support les and downloads related to your book. Did you know that Packt oers eBook versions of every book published, with PDF and ePub les available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details. At www.PacktPub.com, you can also read a collecon of free technical arcles, sign up for a range of free newsleers and receive exclusive discounts and oers on Packt books and eBooks. TM http://PacktLib.PacktPub.com Do you need instant soluons to your IT quesons? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's enre library of books. Why Subscribe?  Fully searchable across every book published by Packt  Copy and paste, print and bookmark content  On demand and accessible via web browser Free Access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine enrely free books. Simply use your login credenals for immediate access. www.it-ebooks.info www.it-ebooks.info Table of Contents Preface 1 Chapter 1: Our First Program – SimpleCalc 7 Locang developer tools 8 Time for acon - Installing the Xcode App 8 Working with projects 8 Time for acon - creang the SimpleCalc Xcode project 9 Understanding the Xcode project template 14 Time for acon – examine the items in the project navigator 15 Conguring an Xcode project 17 Time for acon - conguring the SimpleCalc Xcode project 17 Running an App 21 Time for acon – run the SimpleCalc App 21 Customizing an Xcode template's interface 23 Time for acon – creang the SimpleCalc interface 23 Customizing an Xcode template's implementaon 32 Time for acon – implement the SimpleCalc behavior 32 Building an App 34 Time for acon – building and installing the SimpleCalc App 34 Summary 37 Chapter 2: Debugger – Finding and Fixing Problems 39 The Debug area in Xcode 40 Time for acon – displaying the Debug area in Xcode 40 The Debug area appears on its own 41 Time for acon - integer division by zero 42 Examining variable values in the debugger 45 Time for acon – examining a variable value 45 Unexpected App behavior – no debugger? 46 Time for acon – index out of range 46 www.it-ebooks.info [...]... need 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... Integrated Development Environment (IDE), called Xcode The code in this book has been developed and tested with Xcode 4.3 Cocoa frameworks The Cocoa frameworks consist of libraries, Application Programming Interfaces (APIs), and runtimes that form the development layer for all of Mac OS X By developing with Cocoa, we will be creating applications the same way Mac OS X itself is created Our application. .. and appearances of Mac OS X Using Cocoa with Xcode IDE is the best way to create native Mac applications Time for action - Installing the Xcode App For Mac OS X, Apple provides the Xcode IDE for free in the Mac OS X App store We are going to install the Xcode IDE so that we can start making our first App To do this, we need to follow these steps: 1 2 3 Access the Mac App store by clicking on the Apple... software like Gatekeeper on Mac OS X 10.8 What you need for this book You need a Mac OS X computer capable of running Mac OS X 10.7 or later Some App features require Mac OS X 10.8 You also need to install Xcode Version 4 from the Mac OS X App store Xcode is a free download Who this book is for This book is for people who are programming beginners and have a great idea for a Mac OS X app and need to get... version of Mac OS X that we want the App to run which icon that we want the App to display By default, Xcode will configure our project to run only on the latest version of Mac OS X with the generic App Icon Sometimes we may want our project to run on an earlier version of Mac OS X For example, if we want to give our software to someone with an older computer or if we want to put our software in the Mac App... Creating a user interface ‹‹ Implementing a Mac OS X App behavior ‹‹ Building and running a Mac OS X program www.it-ebooks.info Our First Program – SimpleCalc Locating developer tools Before we start to develop our first Mac OS X program, we need to locate the tools needed to create programs There are several different choices for software development on Mac OS X and the tools that we will select depend... customizing the full screen animation Summary What is the Mac developer program? What are the benefits of joining the Mac developer program? Access to Development Videos, including World Wide Developer Conferences sessions [ iv ] www.it-ebooks.info 252 252 252 254 254 259 259 265 267 272 272 274 274 280 282 282 283 Table of Contents Access to the Mac OS X Developer Library Access to the Apple bug reporter... using it to write our own Mac OS X App Let's get started: 1 To create a new Xcode project, launch the Xcode App and click the button titled Create a new Xcode project on the Welcome to Xcode window as shown in the following screenshot: [9] www.it-ebooks.info Our First Program – SimpleCalc 2 When Xcode asks us to select a template, select Application under Mac OS X and Cocoa Application as the template... the Mac App store Index 284 284 284 284 284 293 [v] www.it-ebooks.info www.it-ebooks.info Preface Apple is taking the world by storm Their market share is growing faster than the industry average and has been for years So, 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. .. discover the fundamental aspects of OS X development while investigating innovative platform features to create a final product that takes advantage of some of the unique aspects of OS X You will learn how to use Xcode tools to create and share Mac OS X Apps and explore numerous OS X features including iCloud, multi-touch trackpad, and the iSight camera Using fundamental development concepts and innovative . www.it-ebooks.info Mac Application Development by Example Beginner's Guide A comprehensive and praccal guide, for absolute beginners, to developing your own App for Mac OS X Robert Wiebe BIRMINGHAM. will need a solid foundaon in app development to get the job done. Mac Applicaon Development by Example takes you through all the aspects of using the Xcode development tool to produce complete. developing your own App for Mac OS X Robert Wiebe BIRMINGHAM - MUMBAI www.it-ebooks.info Mac Application Development by Example Beginner's Guide Copyright © 2012 Packt Publishing All rights reserved.

Ngày đăng: 24/04/2014, 15:29

Từ khóa liên quan

Mục lục

  • Cover

  • Copyright

  • Credits

  • About the Author

  • About the Reviewers

  • www.PacktPub.com

  • Table of Contents

  • Preface

  • Chapter 1: Our First Program – SimpleCalc

    • Locating developer tools

    • Time for action - Installing the Xcode App

    • Working with projects

    • Time for action - creating the SimpleCalc Xcode project

    • Understanding the Xcode project template

    • Time for action – examine the items in the project navigator

    • Configuring an Xcode project

    • Time for action - configuring the SimpleCalc Xcode project

    • Running an App

    • Time for action – run the SimpleCalc App

    • Customizing an Xcode template's interface

    • Time for action – creating the SimpleCalc interface

Tài liệu cùng người dùng

Tài liệu liên quan