You are previewing Beginning iOS 5 Application Development.
O'Reilly logo
Beginning iOS 5 Application Development

Book Description

The ideal starting point for iPhone and iPad app development with iOS 5

If you want to develop apps for Apple's iPhone and iPad, first you need to know how to use the tools--iPhone's new iOS 5 operating system and SDK, and the new xCode toolset that come with it. This full-color book is the perfect starting point. Beginning developers, you'll get a solid introduction to the new xCode 4 and Objective-C and find everything you need to quickly build your first app. The book thoroughly covers all the new iOS 5 features, including new multitasking, location-based services, notification system, cloud-based features, and much more.

  • Written by bestselling Wrox author, Wei-Meng Lee, this is an ideal book for beginning developers

  • Helps eager developers quickly start building apps for the iPhone, iPad, and iPod Touch

  • Introduces iOS 5, xCode 4, Objective-C, and the basics you need to create your first Apple device app

  • Covers a host of new iOS 5 capabilities, including new multitasking, new location-based services, and a new notification system

  • Shows you how to work with iOS 5's cloud-based features for online storage of music, photos, and video

Full-color and full of information, Beginning iOS 5 Application Development is the ultimate guide for beginning Apple developers.

Table of Contents

  1. Cover Page
  2. Title Page
  3. Copyright
  4. Dedication
  5. ABOUT THE AUTHOR
  6. ABOUT THE TECHNICAL EDITOR
  7. CREDITS
  8. Acknowledgments
  9. Beginning IOS 5 Application Development
  10. Contents
  11. INTRODUCTION
    1. WHO THIS BOOK IS FOR
    2. WHAT THIS BOOK COVERS
    3. HOW THIS BOOK IS STRUCTURED
    4. WHAT YOU NEED TO USE THIS BOOK
    5. CONVENTIONS
    6. SOURCE CODE AND ANSWERS APPENDIX
    7. ERRATA
    8. P2P.WROX.COM
  12. 1: Getting Started with iOS 5 Programming
    1. OBTAINING THE TOOLS AND SDK
    2. COMPONENTS OF XCODE
    3. ARCHITECTURE OF THE IOS
    4. SOME USEFUL INFORMATION BEFORE YOU GET STARTED
    5. SUMMARY
  13. 2: Writing Your First Hello World! Application
    1. GETTING STARTED WITH XCODE
    2. CUSTOMIZING YOUR APPLICATION ICON
    3. DISPLAYING LAUNCH IMAGES
    4. SUMMARY
  14. 3: Understanding Views, Outlets, and Actions
    1. OUTLETS AND ACTIONS
    2. USING VIEWS
    3. ADDING VIEWS DYNAMICALLY USING CODE
    4. UNDERSTANDING VIEW HIERARCHY
    5. SUMMARY
  15. 4: Exploring the Different View Controllers
    1. THE SINGLE VIEW APPLICATION TEMPLATE
    2. THE EMPTY APPLICATION TEMPLATE
    3. THE MASTER-DETAIL APPLICATION TEMPLATE
    4. THE TABBED APPLICATION TEMPLATE
    5. SUMMARY
  16. 5: Enabling Multi-Platform Support for the iPhone and iPad
    1. TECHNIQUE 1 — MODIFYING THE DEVICE TARGET SETTING
    2. TECHNIQUE 2 — CREATING UNIVERSAL APPLICATIONS
    3. CHOOSING A PORTING TECHNIQUE
    4. SUMMARY
  17. 6: Handling Keyboard Inputs
    1. USING THE KEYBOARD
    2. CUSTOMIZING THE TYPE OF INPUTS
    3. DETECTING THE PRESENCE OF THE KEYBOARD
    4. SUMMARY
  18. 7: Supporting Screen Rotations
    1. RESPONDING TO DEVICE ROTATIONS
    2. PROGRAMMATICALLY ROTATING THE SCREEN
    3. SUMMARY
  19. 8: Creating and Persisting Data Using the Table View
    1. CREATING A SIMPLE TABLE VIEW
    2. USING THE TABLE VIEW IN A MASTER-DETAIL APPLICATION
    3. DISPLAYING SECTIONS
    4. SUMMARY
  20. 9: Using Application Preferences
    1. CREATING APPLICATION PREFERENCES
    2. PROGRAMMATICALLY ACCESSING THE SETTINGS VALUES
    3. SUMMARY
  21. 10: File Handling
    1. UNDERSTANDING THE APPLICATION FOLDERS
    2. USING PROPERTY LISTS
    3. COPYING BUNDLED RESOURCES
    4. IMPORTING AND EXPORTING FILES
    5. SUMMARY
  22. 11: Database Storage Using SQLite
    1. LINKING TO THE SQLITE3 LIBRARY
    2. CREATING AND OPENING A DATABASE
    3. BUNDLING SQLITE DATABASES WITH YOUR APPLICATION
    4. SUMMARY
  23. 12: Programming iCioud
    1. STORING AND USING DOCUMENTS IN ICLOUD
    2. STORING KEY-VALUE DATA IN ICLOUD
    3. SUMMARY
  24. 13: Performing Simple Animations and Video Playback
    1. USING THE NSTIMER CLASS
    2. Animating the Visual Change
    3. TRANSFORMING VIEWS
    4. ANIMATING A SERIES OF IMAGES
    5. PLAYING VIDEO ON THE IPHONE
    6. SUMMARY
  25. 14: Accessing Built-in Applications
    1. SENDING E-MAIL
    2. ACCESSING THE CAMERA AND THE PHOTO LIBRARY
    3. SUMMARY
  26. 15: Accessing the Sensors
    1. USING THE GYROSCOPE AND ACCELEROMETER
    2. VISUALIZING THE SENSOR DATA
    3. USING THE SHAKE API TO DETECT SHAKES
    4. SUMMARY
  27. 16: Using Web Services
    1. BASICS OF CONSUMING XML WEB SERVICES
    2. CONSUMING A WEB SERVICE IN YOUR iOS APPLICATION USING SOAP
    3. PARSING THE XML RESPONSE
    4. CONSUMING JSON WEB SERVICES
    5. INTEGRATING TWITTER INTO YOUR APPLICATION
    6. SUMMARY
  28. 17: Bluetooth Programming
    1. USING THE GAME KIT FRAMEWORK
    2. IMPLEMENTING VOICE CHATTING
    3. SUMMARY
  29. 18: Bonjour Programming
    1. CREATING THE APPLICATION
    2. PUBLISHING A SERVICE
    3. BROWSING FOR SERVICES
    4. SUMMARY
  30. 19: Programming Remote Notifications Using Apple Push Notification Services
    1. USING APPLE PUSH NOTIFICATION SERVICE
    2. CREATING THE IOS APPLICATION
    3. CREATING THE PUSH NOTIFICATION PROVIDER
    4. SUMMARY
  31. 20: Displaying Maps
    1. DISPLAYING MAPS AND MONITORING CHANGES USING THE MAP KIT
    2. GETTING LOCATION DATA
    3. SUMMARY
  32. 21: Programming Background Applications
    1. UNDERSTANDING BACKGROUND EXECUTION ON THE IOS
    2. Examining the Different Application States
    3. LOCAL NOTIFICATION
    4. NOTIFYING OTHER OBJECTS USING THE NSNOTIFICATION CLASS
    5. SUMMARY
  33. A: Testing on an Actual Device
    1. SIGNING UP FOR THE IOS DEVELOPER PROGRAM
    2. OBTAINING THE UDID OF YOUR DEVICE
    3. LOGGING IN TO THE IOS PROVISIONING PORTAL
    4. GENERATING A CERTIFICATE
    5. REGISTERING YOUR DEVICES
    6. CREATING AN APPLICATION ID
    7. CREATING A PROVISIONING PROFILE
    8. UNDERSTANDING APPLICATION ID AND THE WILDCARD
    9. PREPARING FOR APP STORE SUBMISSION
    10. USING AD HOC DISTRIBUTION
  34. B: Getting Around in Xcode
    1. LAUNCHING XCODE
    2. DEBUGGING YOUR APPLICATIONS
    3. INTERFACE BUILDER
    4. .XIB WINDOW
    5. DESIGNING THE VIEW
    6. INSPECTOR WINDOW
    7. LIBRARY
    8. OUTLETS AND ACTIONS
  35. C: Crash Course in Objective-C
    1. DIRECTIVES
    2. CLASSES
    3. MEMORY MANAGEMENT
    4. PROTOCOLS
    5. SELECTORS
    6. CATEGORIES
  36. D: Answers to Exercises
    1. CHAPTER 2 EXERCISE SOLUTIONS
    2. CHAPTER 3 EXERCISE SOLUTIONS
    3. CHAPTER 4 EXERCISE SOLUTIONS
    4. CHAPTER 5 EXERCISE SOLUTIONS
    5. CHAPTER 6 EXERCISE SOLUTIONS
    6. CHAPTER 7 EXERCISE SOLUTIONS
    7. CHAPTER 8 EXERCISE SOLUTIONS
    8. CHAPTER 9 EXERCISE SOLUTIONS
    9. CHAPTER 10 EXERCISE SOLUTIONS
    10. CHAPTER 11 EXERCISE SOLUTIONS
    11. CHAPTER 12 EXERCISE SOLUTIONS
    12. CHAPTER 13 EXERCISE SOLUTIONS
    13. CHAPTER 14 EXERCISE SOLUTIONS
    14. CHAPTER 15 EXERCISE SOLUTIONS
    15. CHAPTER 16 EXERCISE SOLUTIONS
    16. CHAPTER 17 EXERCISE SOLUTIONS
    17. CHAPTER 18 EXERCISE SOLUTIONS
    18. CHAPTER 19 EXERCISE SOLUTIONS
    19. CHAPTER 20 EXERCISE SOLUTIONS
    20. CHAPTER 21 EXERCISE SOLUTIONS
  37. INDEX