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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
String interpolation is easy, right? Wrong! String interpolation is actually a huge power feature in Swift, and we have a massive array of functionality on hand to help us customize it. In this article I’ll show you just how much control we have, and how to use that control to make your code easier to read.
Although many apps work great when paid for up front, many more work better when using a freemium model – you get lots of downloads of a free app, then charge for some kind of premium service. In this article we’re going to prepare to limit our app unless the user has paid for an unlock, but we’ll be using a flexible approach you can adapt easily.
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.
Our app was designed to work in English, and although you might not want to change that your should at least be able to change. Let’s start with that…
Bezier paths let us draw all sorts of shapes efficiently and smoothly, and with a little work we can bring them into SwiftUI then animate them smooth, and in this article I’m going to walk you through making a very simple
ShapeView struct to do just that.
The second part of cleaning up CloudKit involves tackling error handling head on, and along the way I’ll show you a useful trick for making this process easier. I’ve said it before, but it bears repeating that getting error handling right is the key to a great CloudKit app!
Our next step is to build a simple form so the user can edit items, which in itself isn’t too hard. However, along the way I want to show you some useful tips for tracking changes and updating the UI – it’s not quite as straightforward as you might expect.
The flood fill approach to path finding is one of the easiest to learn, works great in games with small maps, and is also commonly used in software – filling a picture with color, for example. In this article I’ll walk you through how the algorithm works, and help you build a visual representation of it in action.
Many apps show lots of data in a list, and allow users to filter that list by typing in a text view. In this article we’re going to build that in SwiftUI, then pull it out into a reusable component you can apply anywhere.
Link copied to your pasteboard.