
This video will give you an overview about the course.
SwiftUI is a completely new concept for user interface development. This video serves as a quick introduction and shows the basics of SwiftUI.
• Create your first SwiftUI project
• Use automatic previews in Xcode
• Learn to modify text: “Hello, World!”
SwiftUI leverages some new keywords and concepts that might be confusing at first glance. Understand their meaning and learn more about them.
• Understand the “var body: some View” keyword
• Learn how to align your views
• Add multiple modifiers to your views
Navigating between two views in SwiftUI is necessary to create meaningful apps, and in this video, you will learn how to do it.
• Structure your Xcode project
• Create an overview view
• Navigate between your two views
Lists of data are an essential part of many apps. In this video you will create a list of entries.
• Create your first list
• Design your rows
• Add a navigation title
Code complexity increases with each line of code. Learn how to structure your views so they become more readable and easier to understand.
• Create a custom view
• Use your custom view
• Format the date inside your custom view
Getting meaningful sample data is important to see how your app looks. Learn how SwiftUI can help you with that.
• Define your sample data as JSON
• Load your sample data
• Apply your sample data to your views
Users often need to enter data into an app. With SwiftUI creating forms that do just that is easier than ever.
• Learn about the native Form view
• Learn about the @State property wrapper
• Use TextFields and Pickers to allow data entry
It is confusing to the user if certain screens behave like they are embedded into the navigation. Modally presenting screens is the right solution here.
• Learn about the @Environment property wrapper
• Create navigation items like buttons
• Modally present your view
When a user enters data on one screen, it is often necessary to display that data somewhere else. In this video you, will learn how to create a model that can be used throughout your app.
• Learn about the @ObservedObject property wrapper
• Create a model that conforms to “ObservableObject” model
• Add entries and see them in the overview
Users expect that data is stored on their device and available on the next app session. Learn how to use Core Data to store all journaling entries.
• Create a Core Data model
• Implement the @FetchRequest property wrapper
• Load and store data with Core Data
Users expect that a modern app works on all their Apple devices. With SwiftUI, it is easy to use just one codebase for all devices.
• Enable the Mac as a valid target
• Apply some padding
• Run your app on all devices
Programmers often need a fast and accessible in memory storage, usually an array. But sometimes this is not enough. Dictionaries help you with a key value storage that is fast and easy to understand.
• Explore the syntax of dictionaries
• Learn how to access and iterate over dictionaries
• Use custom classes and structs as key
Many functions would often be useful for more than just one type. Generics allow you to write reusable code and avoid code duplication.
• Learn how to use generics in functions
• Use generics in classes and structs
• Create extensions for constrained generic types
Custom classes and structs can often provide functionality that requires the use of operators, like the + symbol. With operator overloading, you can do just that.
• Use existing operators in your classes
• Extend existing classes with custom operators
• Learn about post and prefix operators
Sometimes a programmer wants to return more than just one value from a function. Swift makes this possible.
• Learn how to return two integers
• Use return type names for clearer code
• Pass a function into another function
Readable code is good code. Typealiases allow the programmer to create a new name for already existing types.
• Create a typealias for double
• Create a typealias for multiple types
• Use a typealias for function types
Many programmers don’t know how powerful enums can be and what their unique benefits are. This video shows how to enhance code readability and type safety through the use of enums.
• Learn about historic context of enums
• Reduce invalid input through enums
• Enhance readability with enums
Sometimes an enum must conform to a raw value like an Integer. Luckily, this is possible in Swift and this video shows how.
• Create an enum of type Int
• Create an enum of type String
• Explore how to deal with invalid raw values
The cases of an enum often describe all possible options for certain values. Getting all possible options is helpful and can be done by using CaseIterable.
• Conform to the protocol CaseIterable
• Iterate over all cases of your enum
• Enhance print output through other protocols
Enums cannot just be tied to a primitive raw value. In Swift, it is also possible to attach one or more other types to every individual enum case.
• Learn how to use associated values
• Access the associated values in a switch statement
• Access the associated values in an if statement
When dealing with enums, it is important to handle all possible cases. Future development might introduce new cases that developers cannot even think of today. Swift helps to deal with those special cases by using @unknown default.
• Handle possible future cases
• Handle nil values
• General tips and best practices
Nearly all apps need to access data via the internet. URLSession makes it very easy to communicate with a server and to download data.
• Learn how to request data
• Transform that data into a readable String
• Customize the URLSession to your needs
Most servers these days return data in the form of human readable JSON format. We are going to request data from a server that returns such a JSON. We will then introduce a model that mimics the server structure and parses the JSON into our Swift classes.
• Identify the used JSON model
• Create a corresponding Codable Swift model
• Download and parse the JSON using Codable
Network code is almost always async code. That increases the complexity and, hence, the chance for potential errors. With the Combine framework, you will use a declarative way to describe your network code.
• Understand the basics of declarative programming
• Restructure your networking code
• Use a publisher to assign incoming data
When writing networking code, you always have to be aware of edge cases and error cases. There is so much that can go wrong. With the new Swift Result, you can handle these cases with ease.
• Implement the paging of the API
• Extend the declarative approach
• Use Swift Result to handle all error cases
An app that goes beyond showing static information needs to communicate with a server. In the past, server development was complicated and required you to learn a different programming language. With Vapor, you can use Xcode and Swift to develop with ease.
• Explore what Vapor is
• See how to install Vapor
• Run the demo project
An app communicates with a server through an API. In this video, you will learn how to develop such an API.
• Understand the API development
• Specify your custom API
• Develop your API
It is not enough to simply develop an API on the server. Your iOS app needs to support the API as well. In this video, you will learn how to improve your journaling app from section 1, with your custom API.
• Adjust the iOS model
• Introduce HTTP post methods
• Store and retrieve data from a server
Developing for the server-side has some common pitfalls. This video shows you how to avoid them.
• Run your Vapor instance
• Persist your database
• Move your project
While reactive programming style can help a lot in asynchronous situations, it is at times a very different concept to the traditional programming style. This video sheds light on the yet untold concepts of the Combine framework and reactive programming.
• Learn about Publishers
• Get to understand Subscribers
• How to use Operators
Some of the features of Combine have been used throughout this course already. However, they have been used mostly in combination with SwiftUI. This video will show you how to use the Combine framework with UIKit.
• Create a simple registration form
• Connect the IBOutlets
• Use the @Published property wrapper
Changes in the form are of an asynchronous nature. Reacting to such changes in the published variables can help us build a simple form validation.
• Create custom Publishers that validate input
• Subscribe to those Publishers
• Reactively show the status in the UI
A complete form validation needs to make sure all single parts are validated. Learn how to combine two individual Publishers into one to enable the registration button.
• Combine two Publishers into one
• Subscribe to the new Publisher
• Reactively enable or disable the registration button
Reactive programming style was already available for Swift before Combine. Learn how to apply concepts from RxSwift to Combine and the major differences of the two frameworks.
• See the pros of RxSwift
• Explore the cons of RxSwift
• Learn how to translate the concepts
Critical code parts need to be tested thoroughly. Learn how to use Xcode to write and run such tests.
• Learn the basics about XCTestCase
• Write your own test method
• Run your test
In addition to critical code parts, it is also a challenge to test the user interface of your app. With UI tests, you can automate this as well. The UI tests will programmatically click through your app and test it.
• Learn what UI tests are
• Record your UI tests
• Run and adapt your UI test
Screenshots that are up to date are essential for any app on the App Store. However, taking them is a lot of effort. With UI tests, you can automate the creation of screenshots and you will learn how to do so in this video.
• Take a screenshot in your UI test
• Add an attachment to your test
• See the resulting screenshot
Some data, like passwords, needs to be stored securely. The iOS Keychain provides an easy way to store encrypted data chunks like this. Here, learn how to store, check, and delete a user password.
• Store a password
• Check if the password matches the original
• Delete the password
Such critical pieces of code like the encryption of a password need to be unit tested. In this video, you will learn how to do this.
• Test the password storage
• Test the password checking
• Test the password deletion
Strings in Swift offer a lot of syntactic sugar. Learn about the most helpful ones in this video.
• Use multiline Strings
• Use raw Strings
• Iterate over Strings
Closures in Swift are function pointers. As such, they can be stored in variables for later execution. The @escaping keyword is essential in this regard and you will learn what it means here.
• Explore closures that are executed before returning
• See closures that are executed after returning
• Explore weak self and Closures
The MVC (Model View Controller) pattern is widely used in iOS. However, a common mistake can lead to a memory error. Learn how to avoid it in this video.
• Create a ViewController
• Create a model for the ViewController
• Learn how to avoid a common memory leak
Sometimes an existing class does not provide a method that we would like to have. In such cases, extensions allow you to add methods and variables to existing class implementations.
• Extend the Swift Array with a function
• Extend only Equatable Arrays
• Make Array conform to a new protocol
With significant yearly updates to the Swift language and the introduction of new iOS SDKs, it can be hard to stay up-to-date. Nevertheless, it is critical to embrace these changes for the success of the apps you are building and your personal career. This course will enhance your skillset by showing you how to write better and more efficient code with Swift—in the least time with minimal effort—and make the best use of Swift 5.
In this practical and to-the-point guide, each section is specifically designed to further your programming skills with Swift. We will begin by creating a demo application using SwiftUI and will be implementing all the new features as we move on systematically. We will then explore the benefits of combining SwiftUI with UIKit to build advanced interfaces.
We provide exciting tips, tricks, and best practices to enhance your understanding of Swift and the new features in version 5. While delving into Swift UI, a groundbreaking new technology that makes use of Swift to design simple, yet powerful user interfaces across all of Apple's devices.
Ultimately, this course will help you tackle the latest challenges and help you master all key, relevant, and significant changes in Swift 5.
About the Author
Philipp Baldauf is a professor of iOS development at the University of Applied Sciences in Hagenberg, Austria. Through years of experience with lecturing, iOS, and Swift development, Philipp has a practical yet sophisticated approach for educating his viewers. Philipp is also one of the co-founders of Butleroy, an iOS and MacOS app for managing your schedule and tasks automatically.