Overview
This is a fast-paced introduction to iOS / iPhone application development for experienced developers. During the delivery, developers iteratively build an expense tracking application which incorporates a fully featured UI, use of the camera, interaction with RESTful services and Unit and Integration tests. Best practices for iOS programming are incrementally introduced, along with commonly used design patterns and third party libraries.
The complete Swift language is covered right up to Swift 5.
Outline
The Swift Language
- Type inference and variable declarations in Swift
- Support for reference and value types (classes and structs)
- Distinguishing argument labels from parameter names
- Accessing state via stored, computed and type properties
- Using the lazy attribute for delayed loading
- Coding with regular, single expression and trailing closures
- The Optional type and the different unwrapping strategies
- Managing optionals using guard expressions and 'if ... let' blocks
- Defining protocols with properties, initialisers and optional methods
- Leveraging extensions for flexible type augmentation
- Using mark comments to help the IDE organise your code
- Memory management and automatic reference counting (ARC)
Overview of the iOS Platform
- Setting up the XCode and Interface Builder toolset
- Using CocoaPods to manage your external dependencies
- Using Carthage to manage your external dependencies
- The lifecycle of iOS components and the available 'hooks'
- Building a simple app from scratch
- Guidelines for defining a proper MVC architecture in iOS
- Distinguishing between View and View Controller components
- Creating services and injecting them into controllers
- The delegation pattern and event handling within iOS
- Wiring components together via outlets and actions
Testing iOS Applications
- Using the built-in XCTest tool for Unit Testing
- QA testing with XCTest and the UI test recorder
- Differences between Simulators in iOS and Emulators in Android
- Why simulator-based testing is never entirely sufficient
Introducing the Sample Application
- Managing expenses and receipts with totalling and scanning
- Defining the candidate architecture and prototype user interface
- Building a simple GUI around the UITableView widget
- Choosing between Core Data and Realm Swift for data storage
- Creating an API to abstract the details of serialisation
Iteration One: (Getting Started)
- Creating the initial project in XCode
- Composing a skeleton UI in Interface Builder
- Defining entity types for Expenses and Receipts
- Wiring up the table view, data source and delegates
Iteration Two: (Adding Multiple Views)
- Introducing storyboards and adding extra views
- Navigating between master and detail View Controllers
- Using segues and prepare methods to transition to a new view
- Returning to the original view via an exit segue method
Iteration Three (Building Custom Components)
- Creating a detail view for expense receipts
- Standard view cells available for use with table views
- Generating custom view cells with associated types
- How the Flyweight Pattern is used to manage view cells
Iteration Four (Advanced Features)
- Using a backend RESTful service for receipts
- Interacting with the camera via UIImagePickerController
- Testing using the Photo Picker when developing on the simulator
- Defining delegators for when photos are taken or images selected
- Interacting with services via the native NSURLConnection
- Simplified interaction with services via the 'Alamofire' framework
- Processing and unmarshalling the returned data via SwiftyJSON
Requirements
Delegates should be experienced at coding in either Java or C#. Prior experience with iOS and Objective-C is beneficial, but not assumed. If delegates wish to deploy to actual devices (as opposed to simulators), they must be registered with the Apple Developer Program.