Beginning iOS Programming For Dummies
Published by: John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030-5774, www.wiley.com
Copyright 2014 by John Wiley & Sons, Inc., Hoboken, New Jersey
Media and software compilation copyright 2014 by John Wiley & Sons, Inc. All rights reserved.
Published simultaneously in Canada
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the Publisher. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions .
Trademarks: Wiley, For Dummies, the Dummies Man logo, Dummies.com, Making Everything Easier, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and may not be used without written permission. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.
LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.
For general information on our other products and services, please contact our Customer Care Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002. For technical support, please visit www.wiley.com/techsupport .
Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com . For more information about Wiley products, visit www.wiley.com .
Library of Congress Control Number: 2013954213
ISBN 978-1-118-79927--7 (pbk); ISBN 978-1-118-79931-4 (ebk); ISBN 978-1-118-79932-1 (ebk)
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
Chapter 1
Entering Mobile Application Development
In This Chapter
Identifying the market
Following the design process
Entering the world of object-oriented development
Mobile devices are everywhere. These smartphones and tablets run powerful applications and are making a difference in how people live, work, and play.
Many folks already use these devices as they do computers: to create and edit documents; to interact with others via e-mail, telephone, and chat; to play highly entertaining games; and to shop and manage money. Even schools, which used to ban cellphones in the classroom, are considering delivering educational materials to students via smartphones. Because they're common and robust, tablets and smartphones are now the primary computing and communication devices for many people.
A mobile device, in particular a smartphone, is more than a computing and communication device, however. Because it goes everywhere with you, you can be constantly connected to work and with other users. Also, because a smartphone can retain information about people you talk to, where youve been, and how much you spend, it in a sense "knows" you intimately. Mobile applications can take advantage of this device-user relationship to provide personalized and targeted services that users will depend upon and love.
Apps for a Mobile Platform
This book assumes that youve written applications for other platforms, such as desktop or laptop computers or the web. You can transfer a lot of this experience to writing applications for mobile devices like cellphones and tablets, including iOS devices.
However, when writing applications for iOS, you need to consider these differences:
- Tiny keyboards: iOS device keyboards make data entry very difficult. Data entry is no easy task to begin with, and touchscreen virtual keyboards, which you press with your thumbs, are prone to data-entry errors (for example, your app should provide smart spell-checking or allow the user to simply select from a set of options rather than making him type text).
Some applications are created primarily to enter data (think Twitter or e-mail apps). However, try to limit data entry by doing things such as prefilling commonly used default values and providing drop-down lists that users can select from.
- Small display area: Displays on iOS devices come in these three shapes and sizes (see Figure ):
- 4-inch iPhone and iPod Touch
- 7.9-inch iPad mini
- 9.7-inch iPad
Figure 1-1: Here are the three iOS device sizes.
Compare these sizes to laptop screens, which are usually 15 inches or larger, and youll see what I mean by limited screen space.
In order to be usable on small screens, an application must be designed so as to allow users to
- Move intuitively in the program (without getting confused by a maze of screens).
- Use controls (buttons, for example) that are large enough to press easily and place them in a way that helps to prevent click errors.
- Universal applications needed: In order for an iOS application to be popular, it must run on a range of devices with varied capabilities that is, the iPhone, the iPad mini, and the 9.7-inch iPad (refer to Figure ).
Applications need to function well on the smallest and largest iOS displays.
Note that previous generations of iOS devices had even smaller screens (iPhones prior to iOS 5 and iPod Touches prior to the 5th generation all had 3.5-inch displays). Also, Apple TV runs iOS. If Apple opens these platforms for app development with the latest iOS versions, the problem of creating universal apps will become even more complicated.
Next page