Independent Consultant
Course Description
If you're making mobile clients for iOS, Swift is the language you need to learn. In the course, you'll create a real-world App from scratch. Using Swift the language, you'll create a user interface with SwiftUI, connect it with data, and then make the final package that will be ready for you to publish to the Apple App Store.
This course and others like it are available as part of our Frontend Masters video subscription.
Preview
CloseWhat They're Saying
Just finished the amazing "iOS App Development with Swift" course by Max Firtman on Frontend Masters! 📱🚀
It's packed with practical examples, insightful explanations, and hands-on projects. Highly recommend it to anyone looking to dive into Swift development!
![Ahmed Eid](https://pbs.twimg.com/profile_images/1542544394238263305/nR4U586w.jpg)
Ahmed Eid
Ahmed3Eid3
Course Details
Published: June 22, 2022
Topics
Learn Straight from the Experts Who Shape the Modern Web
Your Path to Senior Developer and Beyond
- 200+ In-depth courses
- 18 Learning Paths
- Industry Leading Experts
- Live Interactive Workshops
Table of Contents
Introduction
Section Duration: 27 minutes
- Maximiliano Firtman introduces the course by providing some personal background with mobile development and discussing an overview of what material will be covered in this course. Pre-requisites, a frontend map demonstration, and a brief discussion of the UI frameworks available to use with Swift are also provided in this segment.
- Maximiliano walks through the provided course project files and demonstrates a finished version of the course project.
- Maximiliano provides an overview of Swift, including who developed it, its type of language, available platforms, and the included null-safety. A discussion regarding language types, what type of application will be created, and the contents of the resulting project ZIP file are also covered in this segment.
Basics
Section Duration: 1 hour, 23 minutes
- Maximiliano demonstrates writing basic Swift expressions in an Xcode playground, including booleans, C-syntax, variables, data types, and valid identifiers. Everything declared in Swift is accessible to every other file in the project.
- Maximiliano discusses defining variables in Swift, including constants, types, explicitly defining data types, and core data types. Swift will infer and enforce variable types but can be overridden with the Any keyword.
- Maximiliano discusses the concept of Null Safety, Null-safe operators, and how to treat properties as optional using a question mark or non optional using an exclamation mark. The functions of other operators, including the safe operator, default values, and explicit optional unwrap, are also covered in this segment.
- Maximiliano demonstrates writing functions in Swift, setting function return types and the option to omit the return keyword. How to utilize Xcode to help troubleshoot argument errors and how to handle optional arguments when defining a function are also covered in this segment.
- Maximiliano discusses Swift closures as literal functions, anonymous functions, or lambda expressions in other languages. The data type Void being used to express no return value and the syntax for functions receiving closures as arguments are also covered in this segment.
- Maximiliano walks through defining custom types and classes, briefly discusses structures, enums, and protocols, and demonstrates using the self keyword in place of JavaScript's this keyword. Swift has full support for OOP, and classes can be extended.
- Maximiliano answers student questions regarding having structures instead of tuples and if classes are more efficient than structs. A walkthrough of error management using do, try, and catch is also provided in this segment.
SwfitUI Overview
Section Duration: 1 hour, 6 minutes
- Maximiliano discusses an overview of the multi-platform declarative UI framework Swift UI. Swift UI can use single or double-way data binding to re render dependencies.
- Maximiliano walks through creating a new project in Xcode using the iOS App template and selecting SwiftUI as the interface type. A demonstration of some features of the Xcode user interface is also covered in this segment.
- Maximiliano demonstrates editing the metadata of the course application and how to run the application through an iOS simulator. The iOS simulator will run using the computer's processing power, not an iPhone, and therefore may not accurately show application performance.
- Maximiliano discusses the function of the some keyword regarding multiple Scenes and demonstrates having multiple content views using the Xcode previewer. The View of the body must return only one view, which will result in two simulators unless adequately grouped.
- Maximiliano demonstrates how to use modifiers to create a new version of a text object with the modifier applied; the inspector can also be used to edit modifiers. Modifiers are applied in a chain, meaning each subsequent modifier is layered on top of the result of the previous function.
- Maximiliano walks through how to bind data to views to pull in variables and change dynamically on user input. Binding data to a view allows each view instance to be reusable.
SwiftUI Concepts & View Types
Section Duration: 1 hour, 55 minutes
- Maximiliano briefly discusses an overview of SwiftUI's main concepts, including app, scene, view, view modifier, dependencies, dimension unit, and graphical assets. View types covered include text, label, button, the various types of stacks, and spacer.
- Maximiliano walks through creating the first view of the course project to represent an available discount offer and demonstrates how to create multiple previews by copying the same view. A student's question regarding how the structs defined in offer get imported to ContentView is also covered in this segment.
- Maximiliano demonstrates how to create and utilize a referenceable color library in Xcode. The created color library will allow colors to be dragged and dropped into the code as modifiers.
- Maximiliano walks through how to create a new reusable image asset. It's better to have three different-sized png images to render the correct quality at different screen sizes.
- Maximiliano demonstrates creating an interactive bottom navigation bar and finding the appropriate icons using SF Symbols. The tabs created in this segment will switch between application pages.
- Maximiliano demonstrates how to group files in Xcode and create the three remaining application pages. A student's question regarding the difference between assets and preview assets is also covered in this segment.
- Maximiliano walks through creating and connecting the category and product data models to allow importing dependencies. MenuManager and CartManager classes are also created to help download and store the application content.
- Maximiliano demonstrates using View structure objects called environment objects to avoid passing data manually as properties. Environment objects can be injected at any level.
- Maximiliano demonstrates adding content to the shopping cart page and an Xcode error message.
- Maximiliano walks through adding and importing a dependency called Alamofire which is used to download JSON from an API.
API Data
Section Duration: 59 minutes
- Maximiliano demonstrates how to pull in the data being stored in the managers to populate the menu items. Editing the product prices to the correct decimal points is also covered in this segment.
- Maximiliano implements add and remove functions to allow items to be added to and removed from the cart. Updating the cart total and badge showing the number of items are also covered in this segment.
- Maximiliano demonstrates utilizing an environment variable to inject variables from the OS. Student questions regarding why Alamofire was used and not CocoaPods and the benefits of using Alamofire are also covered in this segment.
- Maximiliano demonstrates integrating a website or web app with SwiftUI and UIKit. A student's question regarding if this process is how cross-platform applications work and a brief demonstration of running JavaScript code is also covered in this segment.
- Maximiliano walks through adding an application icon and rendering a launch screen to display a splash screen when the application launches.
- Maximiliano demonstrates how to make the final build through Xcode and distribute the app to the App Store. A student's question regarding how to run the application on a personal device is also covered in this segment.
Wrapping Up
Section Duration: 1 minute
- Maximiliano wraps up the course by providing suggested project improvements to practice Swift and well wishes on future development endeavors.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops