While I’m sure you’re keen to get started programming immediately, please give me a few minutes to outline the goals of this course and explain why it’s different from other courses I’ve written.
Watch the video here, or read the article below
I’m going to explain a few things about this course in just a moment, but if you’re the impatient type there is one thing you absolutely must do: launch Xcode, then create a new iOS project using the App template. I’m naming mine “UltimatePortfolio”, but it’s your project – name it whatever you want.
Note: Because my project is called UltimatePortfolio, my
@main Swift file will be called UltimatePortfolioApp.swift. Whenever you see me refer to UltimatePortfolioApp.swift you should obviously open whatever is the equivalent file in your project – whichever one has
@main before its
As for the Interface and Lifecycle options, please choose SwiftUI and SwiftUI App respectively.
Please do not check Use Core Data or Include Tests. We’ll be doing both these things by hand, so you can see exactly how they work.
After you click Next you’ll be asked where to save your project. You’ll also be asked whether you want to enable source control for this project or not – if you’re comfortable using Xcode for source control then you’re welcome to check that box, but if not I’ll be briefly showing you how to use Git on the command line to keep your code safe.
Okay, that’s the absolute least you need to do to start the project. For the rest of this article I’m going to walk you through the plan for what we’ll be doing – again, I recommend you take the time to follow along!
Many tutorials I write teach a handful of specific things at a time, often wrapped up inside an app project. The app itself is nice enough because it lets you see code in a real-world context, but it’s not the point of the tutorials – the point is to teach your Core Data, or haptics, or whatever, and the app is really just along for the ride.
This course is very different, because we’re going to be building just one app the entire time. And rather than the app itself being somewhat incidental to the end result, this time the app itself is the core of the course because our goal is to make it a great example of so many different parts of app development, and one you can feel proud of uploading to GitHub as part of your portfolio.
This means two things. First, it means we’ll be covering a huge range of topics: important frameworks such as SwiftUI, Core Data, and CloudKit, various system integrations such as Widgets, App Clips, and Spotlight, plus good programming practice such as testing, architecture, localization, project organization, and accessibility.
Second, it means it’s important you understand how everything fits together, so we’ll be covering a lot of why along with how – I’ll take you down a few wrong turns so you can see where problems lie, then show you how to solve them. Hopefully this means when it comes to talking about your project with an employer, you’re able to give clear, correct answers about the choices we made.
Our goal here isn’t to create a fancy user interface that looks shiny in screenshots, but instead to show that you understand what it takes to build solid, reliable software. Yes, of course I want you to build something that looks good, but much more importantly for this course I want you to build something that works good – that shows you can be relied on to build important, complex Swift code.
None of this should stop you from having fun customizing the design as much as you want, it’s just not going to be a priority for me.
This course is split into three sections, which are:
Only the first section is required. It’s important that everyone follow the first section completely, and in order, because that’s where we build the core of our app.
Once you complete the first section, you can complete any or all of sections 2 or 3, in any order you want – they are all optional, and all standalone. This is where the course is more fun because you get to customize your portfolio app to suit what interests you, and it also means your portfolio app will be unique because it focuses on the things you care about.
Now, that first section is quite unlike everything I’ve taught before, because as you’ll see it results in a fascinating crescendo of bad code. In my regular tutorials I would either try to work in best practices as we went, or provide a shortcut because constantly repeating the same thing can be quite tiresome.
Here, though, we’re going to start by building a fairly naive version of the app – no testing, no documentation, no localization, no real project structure, and so on. This will produce a perfectly serviceable app, and one you could ship to the App Store if you wanted, but it won’t be the kind of app that will get admiring comments when you’re talking about it during an interview.
But then once the app is built, we’re going to start fixing it up step by step. Not only will this result in you having an app that has great internationalization, for example, but critically it will also show you the techniques required to give any app great internationalization.
This entire course was written using Xcode 12 for iOS 14. If you complete the full course this means you’ll be implementing iCloud, Sign in with Apple, StoreKit, Apple Pay, and so much more, so it’s essential that you have an active account with Apple’s Developer Program.
If you choose to follow the macOS section of the course, things are more complex not least because you must be running macOS Big Sur otherwise your code simply won’t run. I’ll be talking about this more when we reach that point.
I highly recommend you commit your work to a source code repository such as GitHub as you complete each step. This doesn’t need to be a public repository; anywhere you can put code to keep it safe is a good idea. I’ll be demonstrating this once so you can see how it looks for yourself, but after that it’s down to you.
In terms of your own ability, although I will be explaining every step of our code as we go I highly recommend you complete my 100 Days of SwiftUI course before starting because my goal isn’t to go over all the basics of SwiftUI. Instead, I’ll be focusing on the more interesting stuff – why certain choices make sense, how to structure code well, and so on.
This is the first time I’ve written a course that’s written in installments, so it’s quite an adventure for me. My (very rough) plan is to release the first three videos in one lump, then release new videos every two to three days.
Obviously some parts of the course are much easier than others, so the exact release schedule will fluctuate a little, but that’s my goal. This means two things:
Last but not least, I want to introduce you to the app we’ll be building. At its core, this app is designed to track information – how far you are through completing some sort of task.
Now, I want to encourage everyone to builds an app that means something to them, so although I’ll be using general terms such as “Project” and “Portfolio App”, I want you to adapt that to fit something you care about. I’ve commissioned all-new graphics that cover a variety of activities, such as playing the guitar, cycling, dancing, painting, traveling, gardening, cooking, and more, and later on you’ll be able to use these to customize exactly what kind of data your app is designed for.
This means not only is your final app the culmination of whichever optional modules you chose, but also on a topic that matters to you personally. I’ve said it many times before, but it bears repeating: the best kinds of apps are when you take the coding skill you have and use it to power your own personal passions, to build an app that solves real problems you face every day.
So, we have lots and lots to cover in this course, and I hope you enjoy following along, I hope you enjoy customizing it to fit your needs and interests, and I hope you learn a whole lot along the way.
Here's just a sample of the other tutorials, with each one coming as an article to read and as a 4K Ultra HD video.
Swift’s optionals are implemented as simple enums, with just a little compiler magic sprinkled around as syntactic sugar. However, they do much more than people realize, and in this article I’m going to demonstrate some of their power features that can really help you write better code – and blow your mind along the way.
This early challenge day asks you to build a converter app that’s able to move between any two similar units, such as kilometers and miles. Let’s solve it now, then we’ll take it further, and then we’ll take it even further…
Phantom types are a powerful way to give the Swift compiler extra information about our code so that it can stop us from making mistakes. In this article I’m going to explain how they work and why you’d want them, as well as providing lots of hands-on examples you can try.
Anyone can write Swift code to fetch network data, but much harder is knowing how to write code to do it respectfully. In this article we’ll look at building a considerate network stack, taking into account the user’s connection, preferences, and more.
In this article I’m going to walk you through building a
WaveView with SwiftUI, allowing us to create beautiful waveform-like effects to bring your user interface to life.
Generics are one of the most powerful features of Swift, allowing us to write code once and reuse it in many ways. In this article we’ll explore how they work, why adding constraints actually helps us write more code, and how generics help solve one of the biggest problems in Swift.
In this article you’ll learn how memoization can dramatically boost the performance of slow functions, and how easy Swift makes it thanks to its generics and closures.
Trees are an extraordinarily simple, extraordinarily useful data type, and in this article we’ll make a complete tree data type using Swift in just a few minutes. But rather than just stop there, we’re going to do something quite beautiful that I hope will blow your mind while teaching you something useful.
In this article we’re going to look at the
map() function, which transforms one thing into another thing. Along the way we’ll also be exploring some core concepts of functional programming, so if you read no other articles in this course at least read this one!
SwiftUI gives us a modifier to make simple shadows, but if you want something more advanced such as inner shadows or glows, you need to do extra work. In this article I’ll show you how to get both those effects and more in a customizable, flexible way.
It’s not hard to make a basic property wrapper, but if you want one that automatically updates the
body property like
@State you need to do some extra work. In this article I’ll show you exactly how it’s done, as we build a property wrapper capable of reading and writing documents from our app’s container.
It is my firm belief that every iOS app should be usable to everyone, and putting in the work to make your app function well no matter who is using it says a lot about the kind of developer you are.
Before you dive in to the first article in this course, I want to give you a brief overview of our goals, how the content is structured, as well as a rough idea of what you can expect to find.
Assertions allow us to have Swift silently check the state of our program at runtime, but if you want to get them right you need to understand some intricacies. In this article I’ll walk you through the five ways we can make assertions in Swift, and provide clear advice on which to use and when.
In this final section we start by solving the problem from the previous section, but then cover keyboard input accessories and visual effect blurs, then finish up by looking at
formatted() from Foundation.
If you watch a flock of birds you’ll see it exhibits all sorts of complex behaviors as they swarm around in the air – they often stay together but not too close, they move in the same direction but also seem to change direction at the same time. In this article we will create flocking behavior in SwiftUI, using Craig Reynolds’ classic boids algorithm.
Many coding problems are designed to perform the same operation on lots of data, and in fact they are so common Apple has a whole framework to make it better: Accelerate. In this video I’ll give you an introduction to Accelerate using practical examples so you can see just how easy it is.
In this article we’re going to build a tool that designs particle systems for SwiftUI apps, all built on top of the
Canvas that were added in SwiftUI. I think you’ll really be amazed how fast this comes together!
When users scroll beyond the top of a scroll view the default behavior is to show some empty space, but many apps prefer to show a stretchy header area instead. In this article I’ll show you how to build that SwiftUI, making an image that stays fixed to the top no matter what.
Checkpoint 8 of Swift for Complete Beginners asks you to design a protocol to represent a building, then create two structs conforming to it. Let’s solve that now…
Link copied to your pasteboard.