Advanced Programming with Swift 4 for iOS 11 and Xcode 9
Published by O'Reilly Media, Inc.
Advanced Swift for better iOS apps
Join experts Paris Buttfield-Addison and Jon Manning for a look at advanced programming in Swift, used for developing iOS apps and services. This course focuses the latest versions of Swift, and teaches you what you need to know about design patterns, algorithms, and optimized apps.
Beginning with a quick primer on Swift 4 programming, we’ll move quickly to cover a collection of common design patterns used for iOS 11 development. Then we’ll explore the details of Swift and its standard library, including some of the more sophisticated language features, as well as useful algorithms, and UX/visual patterns used by top iOS applications.
We’ll use Playgrounds on macOS, in Xcode, for much of this workshop; Playgrounds are a revolutionary interactive way to work with and learn Swift. This workshop covers the newest Swift, Swift 4, due out with iOS 11 later this year, along with Xcode 9, the toolkit used for working with iOS apps.
This course is structured as a follow-along workshop. Also note that all of the course content was developed with teams in mind.
What you’ll learn and how you can apply it
By the end of this live, online course, you’ll understand:
- How and why to implement common design patterns for your code and your app UX, using Swift 4 for iOS 11 apps.
- You’ll be ready to dive further into Swift on your own, understanding what makes a Swift app a Swift app, and you’ll know how to ‘think in Swift’ for common algorithms.
And you’ll be able to:
- Use advanced algorithms in Swift.
- Use common visual styles and design principles, through Swift, in their iOS apps.
- Optimize their apps for speed and efficiency.
This live event is for you because...
- Swift developers wanting to expand their knowledge
- mobile developers who want to level-up to the latest technology
- Objective-C developers now moving to work in Swift
- anyone who wants to learn how to build iOS, tvOS, or watchOS apps
- these skills generally apply to macOS apps as well
- If you are involved in writing apps and services to related to Apple Watch, Apple TV, iPhones, iPads, or Macs, you need to become familiar with Swift.
Prerequisites
This course is intended for programmers who have some experience with Swift, or are familiar/experienced in any modern language, e.g., a year or more working in Python, Java, C++, C#, etc.
- Familiarity with operating macOS as a user
- Basic knowledge of Swift (preferred) or any other modern language
- Access to a Mac with Xcode 9 (beta) installed
- An iOS device is not needed for this course
Recommended preparation:
Learning Swift, 2nd Edition (book)
iOS Swift Game Development Cookbook, 2nd Edition (book)
Getting Started with Swift on the iPad (Learning Path)
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
Introduction
A Swift Refresher
- A brief review of the Swift language, to get everyone up to speed.
What’s New In Swift 4
- A review of the new features added to the language since Swift 3.
- Swift for newcomers: a crash course in Swift for people using other languages
Design Patterns
- Working with View Controllers
- Navigation, tab, master-detail view controllers
- Popovers
- Embedding view controllers
Managing App Data Flow
- Using the notification system
- The listener pattern
- When to use singletons and when not to
Reactive Swift
- The philosophy of reactive functional programming
- Using RxSwift
- Usefulness and limitations of this technique
Document-Based Applications
- How UIDocument works
- File presenters
- How a document-based application is laid out
When To Use A Struct, A Class, Or An Enum
- Associated values with enums
- Advanced switches and pattern-matching
- Structuring your code for maximum readability and concision
Assignment 1: A Reactive Application
- Using RxSwift, build a data logger.
- This application should accept text input, and store it in a file.
- Each entry should allow viewing additional detail about it on a separate screen.
UX Patterns
- Working with constraints
- A review of constraints
- Solving common constraint problems
- Supporting multiple size classes
- Building constraints in code
Collection Views
- A review of the basics
- Creating custom layouts
Drag and Drop
- What it’s designed for
- Drag and drop between views
- Drag and drop between applications
Scroll Views
- Managing scrolled content
- Pinch-to-zoom
- Managing paged content
- Lazily loading pages of content
State Preservation
- Using the state preservation API
- Common strategies to use and pitfalls to avoid
Common Tasks and Useful Algorithms
Downloading Content
- Using NSURLSession to retrieve content
- Scheduling downloads in the background
Functional Programming
- What functional programming is for
- Functions as first-class values
- Map, reduce, filter
- Creating custom operators for functional work
Parallelising Work
- Using operation queues
- Communicating with the main queue
- Managing performance and priority
Receiving Data from Other Apps
- Share sheets and AirDrop Overview
- Registering to support data types
- Responding to incoming data
Assignment 2: Extending the Data Logger
- Add support for dragging and dropping the data entries as text into other apps.
- Allow receiving text via AirDrop or via the share sheet as a new entry.
- Support iPhone, iPad, and split-screen views.
Your Instructors
Paris Buttfield-Addison
Dr Paris Buttfield-Addison is a co-founder of Secret Lab, a mobile development studio based in beautiful Hobart, Australia. Secret Lab builds games and game development tools, including the award-winning ABC Play School iPad games, Night in the Woods, the Qantas Joey Playbox, and the Yarn Spinner narrative game framework. Paris formerly worked as mobile product manager for Meebo (acquired by Google), has a degree in medieval history, a PhD in Computing, and writes technical books on mobile and game development for O’Reilly Media. He can be found on Twitter @parisba and online at http://paris.id.au.
Jon Manning
Jon Manning is the cofounder of independent game development studio Secret Lab. He's currently working on top-down puzzler Button Squid and the critically acclaimed adventure game Night in the Woods, which includes his interactive dialogue system Yarn Spinner. Jon has written a whole bunch of books for O'Reilly Media about iOS development and game development. He holds a doctorate about jerks on the internet. Jon can be found as @desplesda on Twitter.