iOS 8 App Development Essentials First Edition
2014 Neil Smyth/eBookFrenzy. All Rights Reserved.
This book is provided for personal use only. Unauthorized use, reproduction and/or distribution strictly prohibited. All rights reserved.
The content of this book is provided for informational purposes only. Neither the publisher nor the author offers any warranties or representation, express or implied, with regard to the accuracy of information contained in this book, nor do they accept any liability for any loss or damage arising from any errors or omissions.
This book contains trademarked terms that are used solely for editorial purposes and to the benefit of the respective trademark owner. The terms used within this book are not intended as infringement of any trademarks.
Rev 1.0b
Table of Contents
1. Start Here
The goal of this book is to teach the skills necessary to create iOS applications using the iOS 8 SDK, Xcode 6 and the Swift programming language.
How you make use of this book will depend to a large extent on whether you are new to iOS development, or have worked with iOS 7 and need to get up to speed on the features of iOS 8 and the Swift programming language. Rest assured, however, that the book is intended to address both category of reader.
1.1 For New iOS Developers
If you are entirely new to iOS development then the entire contents of the book will be relevant to you.
Beginning with the basics, this book provides an outline of the steps necessary to set up an iOS development environment. An introduction to the architecture of iOS 8 and programming in Swift is provided, followed by an in-depth look at the design of iOS applications and user interfaces. More advanced topics such as file handling, database management, in-app purchases, graphics drawing and animation are also covered, as are touch screen handling, gesture recognition, multitasking, iAds integration, location management, local notifications, camera access and video and audio playback support. Other features are also covered including Auto Layout, Twitter and Facebook integration, App Store hosted in-app purchase content, collection views, Sprite Kit-based game development, local map search and user interface animation using UIKit dynamics.
The key new features of the iOS 8 SDK and Xcode 6 are also covered, including Swift playgrounds, universal user interface design using size classes, app extensions, Interface Builder Live Views, embedded frameworks, CloudKit data storage and TouchID authentication.
The aim of this book, therefore, is to teach you the skills necessary to build your own apps for iOS 8. Assuming you are ready to download the iOS 8 SDK and Xcode, have an Intel-based Mac and ideas for some apps to develop, you are ready to get started.
1.2 For iOS 7 Developers
If you have already read the iOS 7 edition of this book, or have experience with the iOS 7 SDK then you might prefer to go directly to the new chapters in this iOS 8 edition of the book.
All chapters have been updated to reflect the changes and features introduced as part of iOS 8 and Xcode 6. Chapters included in this edition that were not contained in the previous edition, or have been significantly rewritten for iOS 8 and Xcode 6 are as follows:
In addition the following changes have also been made:
All chapters have been updated where necessary to reflect the changes made to Xcode 6.
All chapters and examples have been rewritten to use Swift instead of Objective-C.
TableView examples have been updated to cover self-sizing table cells and dynamic type.
The SpriteKit chapters have been updated to use the new Xcode 6 SpriteKit Level Editor environment.
The SQLite chapters have been updated to make use of the FMDB wrapper classes.
The video playback chapter has been rewritten to use the AVPlayerViewControler and AVPlayer classes.
1.3 Source Code Download
The source code and Xcode project files for the examples contained in this book are available for download at:
http://www.ebookfrenzy.com/retail/ios8/
1.4 Feedback
We want you to be satisfied with your purchase of this book. If you find any errors in the book, or have any comments, questions or concerns please contact us at .
1.5 Errata
Whilst we make every effort to ensure the accuracy of the content of this book, it is inevitable that a book covering a subject area of this size and complexity may include some errors and oversights. Any known issues with the book will be outlined, together with solutions at the following URL:
http://www.ebookfrenzy.com/errata/ios8.html
In the event that you find an error not listed in the errata, please let us know by emailing our technical support team at .
2. Joining the Apple iOS Developer Program
The first step in the process of learning to develop iOS 8 based applications involves gaining an understanding of the differences between Registered Apple Developers and iOS Developer Program Members . Having gained such an understanding, the next choice is to decide the point at which it makes sense for you to pay to join the iOS Developer Program. With these goals in mind, this chapter will cover the differences between the two categories of developer, outline the costs and benefits of joining the developer program and, finally, walk through the steps involved in obtaining each membership level.
2.1 Registered Apple Developer
There is no fee associated with becoming a registered Apple developer. Simply visit the following web page to begin the registration process:
http://developer.apple.com/programs/register/
An existing Apple ID (used for making iTunes or App Store purchases) is usually adequate to complete the registration process.
Once the registration process is complete, access is provided to developer resources such as online documentation and tutorials. Registered developers are also able to download older versions of the iOS SDK and Xcode development environment.
2.2 Downloading Xcode 6 and the iOS 8 SDK
The latest versions of both the iOS SDK and Xcode can be downloaded free of charge from the Mac App Store. Since the tools are free, this raises the question of whether to upgrade to the iOS Developer Program, or to remain as a Registered Apple Developer. It is important, therefore, to understand the key benefits of the iOS Developer Program.
2.3 iOS Developer Program
Membership in the iOS Developer Program currently costs $99 per year. As previously mentioned, membership includes access to the latest versions of the iOS SDK and Xcode development environment. The benefits of membership, however, go far beyond those offered at the Registered Apple Developer level.
One of the key advantages of the developer program is that it permits the creation of certificates and provisioning profiles to test applications on physical devices. Although Xcode includes device simulators which allow for a significant amount of testing to be performed, there are certain areas of functionality, such as location tracking, TouchID authentication and device motion, which can only fully be tested on a physical device. Of particular significance is the fact that some aspects of iCloud access, Reminders and In-App Purchasing can only be tested when applications are running on physical devices.
Of further significance is the fact that iOS Developer Program members have unrestricted access to the full range of guides and tutorials relating to the latest iOS SDK and, more importantly, have access to technical support from Apples iOS technical support engineers (though the annual fee covers the submission of only two support incident reports).
Next page