Hello, dev community! The past few weeks I've been hard at work on a Swift + SwiftUI Roadmap intended for those of you who want to learn about iOS Development, and in here you'll find all the knowledge for becoming a great iOS developer! Think of this as some kind of guidebook, but that actually wants to teach you something. Honestly this is something I wish I had when first starting to learn Swift.
Why bother?
Well, one of the key aspects of learning anything in this life is sharing knowledge with others. That's how the foundation of everything started, so I thought to myself that creating something like this would be amazing to pass down to the newcomers. Although this roadmap starts from a "level 0", there are a lot of more advanced concepts further down the line, so it can provide for everyone, even Swift developers that already have a lot of experience.
Here is the visual format of the roadmap. It has the complete documentation, explanations given in full, examples, visual examples, funny jokes and even intermissions. I strongly suggest you check it out!
DO KEEP IN MIND THAT THIS IS ONLY A PREVIEW, THE FULL ROADMAP WITH ALL OF THE EXPLANATIONS, RESOURCES, AND PROJECTS IS AVAILABLE IN THE VISUAL FORMAT
If you wish to contribute
I know this may not be ALL the mountain that is Swift, but I tried to cover most of the important stuff. If you think I may have missed something very important, please do let me know. I really want EVERYONE to provide feedback and contribute to this roadmap, because as I said before: sharing knowledge is key, and I wish you would share yours to help others too!
Please consider creating an issue on our GitHub if you have any kind of problem with the roadmap or you would like to see it updated with other stuff.
Join our Discord if you wish to provide relevant feedback for the roadmap and interact with our team.
PLEASE GIVE FEEDBACK TO THE FULL ROADMAP IN THE LINK, AS I SAID THIS IS JUST A PREVIEW OF CHAPTERS AND RESOURCES, NOT THE FULL ROADMAP
0.About Swift
Swift is a modern and versatile programming language developed by Apple as a means for developers to write fast, responsive code for building AppleOS applications (includes iOS, tvOS, WatchOS, and even the new VisionOS)
- Easy to learn
- Performant
- Open Source
- Rich Library
- Growing Job Opportunities
1. Swift Fundamentals
- Comments
-
Types in Swift
- Constants and Variables
- Basic Types (bool, integer, string)
- Type Safety and Inheritance
- Swift is a Type-safe language, meaning you must keep track of a variable's type
- Type Safety and Type Inheritance
- Functions - very important!! And probably the core of Swift
-
Non-Primitive Data Types in Swift
- ObjectOrientedProgramming is based on the premise that we design code around data and objects instead of functions and logic.
- Enums in Swift
- Structs in Swift
- [How to use Structs](https://youtu.be/gRKlprUj-I8?si=zCqPpPLISMYeMes3
- Classes in Swift
- Classes are used to define objects, and they are very alike to Structs, but Classes are used to defined much more complex Objects
- Classes in Swift
- How to use Classes in Swift
- Access Control
- Literally what the name suggests, it ensures a way to control which files are accessible from what part of your project.
- How to use Access Control
- Arrays
- This is a Collection Type
- Learn all about Swift Arrays
- Sets
- This is a Collection Type
- Sets in 60 seconds
- Dictionaries
- This is a Collection Type
- How to use Dictionaries in Swift
-
Flow Control in Swift (Loops and Conditionals)
- If-Else Conditionals (every programming language 101)
- For, While, Repeat - the three horseman
- Guard Statements - kind of a reverse of an if statement
- Defer statement - used for code cleanup after exit
- Collection Types Operations (Sort, Filter, Map)
2. Creating and Manipulating Views
- In SwiftUI you can add text, images, buttons, custom shapes, and pretty much any UI element you could ever think for, but what you have to understand is that any element has to be inside of a
View
protocol What are View Protocols- Basic UI Elements
- Graphics Manipulation - Colors
- Gradients
- Manipulating Images
- Frames
- Stacks - VStack, HStack, ZStack
- Backgrounds
- Spacers
- ScrollView - container of elements using Lazy Stacks
- ScrollViewReader
- Safe Areas - defining and ignoring them
3.State Management
- State management in Swift happens by just declaring variables instead of constants (e.g.,
var welcomeText: String = "Hello, user!"
), but, SwiftUI doesn't like this because it doesn't know that the variable will at some point change, and since we are working with UI elements, the View protocol should update according to the value of the variable. That's where the state property wrapper comes into play.
4.Sharing View States
5.Sharing State between Parent and Child - Binding
6.Extracting functions and Subviews
7.Gestures and Animations; Transitions
- How to use gestures in SwiftUI
- Adding Animations in SwiftUI
- Animation Curves and Timing in SwiftUI
- Showing and Hiding views with Transition
8.Swift Sheets
- Now that we know how to add and customize animations and transition to our app, another KEY element that developers use when building applications are what's known as Sheets
9.ActionSheet and Alerts
10. Context Menu
11. NavigationStack
- So, you've already learned about transition animations and adding sheets (a view on top of an existing view), but, let's say that for example you want to change the keyboard language on your iPhone. For that, you'd have to go to Settings -> General -> Keyboard -> Keyboards. And, as you can tell, the system isn't adding sheets on top of sheets on top of the main view, because that would be horrible, like? Well, here's where NavigationStacks come into play (previously known as NavigationView, but that's became deprecated in iOS 17) and NavigationLinks
12. Lists
- Since we've learned about creating the flow of navigation of our app using NavigationStack, now's a good time to tell you about
Lists
. Lists and navigation go hand-in-hand because it's very easy to define links using lists.
13. TabView and Badges in SwiftUI
- TabView
- Badges, .badge modifier
14. User Inputs - Text Inputs, Toggles, TextSelection
- Other UI Elements that will most likely be present in your application are TextField and TextEditor. Text fields are text inputs that you request from users of your app. These can be anything you want, but they are mostly used for requesting user data (things like passwords, emails, usernames) and stuff like that. There are also Toggles, simple control switches that "toggle" between an on and off state
15.FocusState
16. Pickers - Color, Date & Menus
- How to use Picker and PickerStyles in SwiftUI
- How to use ColorPicker in SwiftUI
- How to use DatePicker in SwiftUI
- How to use Menus and MenuStyles in SwiftUI
17.Other User Inputs - Steppers and Sliders
18. Complex view methods
- Now, let's talk about Complex View methods starting with
.onAppear()
and.onDisappear
functions. As their name suggests, the functions add an action to perform before the view appears, or after the view appears.
19. Custom Models in Swift
20.AppStorage
- Now, in iOS applications, you want to sometimes store data inside of the application cache, using the
@AppStorage
property wrapper. AppStorage is useful for restoring the state of the application when a user closes it, and is generally used to reflect User Defaults values, useful for storing, for example, if a user is signed in or signed out of your app.
21. Transitioning to Concurrency - AsyncImage
- Another KEY element in building Swift Applications is the AsyncImage view. What it basically does is it waits for the image to load before actually displaying it on the screen. You will find out more about Swift Asynchronous methods when we will talk about all aspects of Swift Concurrency, but for now, let's finish with the first part of the SwiftUI stuff.
22.Toolbar
23.Adapting your code to Dark Mode
- The pinnacle of app design - Dark Mode. Since we are all aspiring young developers, most of us zoomers even, we just can't stand to stare at white elements on our 1000nits HDR10+ 4K OLED monitors, because they burn right through our fragile retinae. So, what you will have to do at some point is make your App dark mode compatible. How you do that, you might ask? Well, to put it simply, you define colors that dynamically change if the user has its appearance set to Light or Dark.
24.Documenting your Swift Code
- Imagine that there wouldn't exist documentation at all. It's just like IKEA sending you a floating bed with drawers but without giving you any instructions at all on how to assemble it. Even with the instructions, they are hard to do and take countless hours, but think about the horror that would await you without instructions at all!
---Swift Concurrency ---
25.What is Concurrency?
- Think of Concurrency as Swift’s fancy way of naming Asynchronous operations. Concurrency is Swift’s built-in way of writing the this type of operations. But what does Asynchronous actually means? Well, it refers to the fact that a piece of code actually runs in parallel to the main program flow. That's why it's called concurrency in Swift, because actions take place concurrently with program execution, without the app needing to wait for the results. In short, it is code that can run independently without requiring to wait for some part of it to be run. Think of videogame loading screen, and what happens when you go to a new level. The game has to load the assets required for your level, for your character, calculate the vector graphics, get your stats, your HP, etc. Well, imagine how long it would take if the game wasn't allowed to load all of this stuff in parallel, and instead it would first load the assets, then start building the environment and place each of the asset independently to where they belong, then render the graphics and so on. So what this actually does is it allows the user to go about his business in your application, while your app loads other stuff in the background that may or may not be required for future user actions. Now, let's go back to Swift and talk about Concurrency.
26.Error Handling
27.Async and Await Functions
28. Task
- Basically, just like in an employee schedule, some tasks will have a higher or a lower priority than others. For example, getting coffee for your cute co-worker Sarah should be of lower priority than fixing a bug that corrupts the entire database everytime a user likes Sarah's post (well, it depends, but you get the idea).
- How to use Task and .task in Swift
- TaskGroup
29.Actors
- Swift: Struct vs Class vs Actor, Value as Reference Types, Stack vs Heap
- How to use Actors in Swift
- Global Actors
30.The Sendable Protocol
31.MVVM Design Pattern
-
MVVM stands for Model-View-ViewModel. What it does is it describes the flow of data within our app and separates application tasks(handling of the UI, the backend such that the view is not dependent on any specific model problem).
- Model - responsible for representing the data from our backend logic
- View - responsible for handling all the layouts and displaying the data
- ViewModel - responsible for transforming data recieved in a View, recieving actions from the View, dealing with logic
- MVVM Swift: Model View ViewModel Design Pattern
32.Search Features
- All you need to do to add a search interface to your app is applying one of the searchable view modifiers inside of your NavigationStack or a view inside of it, by using
.searchable()
33.PhotosPicker
- A Picker that we haven't talked about yet is the new PhotosPicker introduced in the PhotoUI framework in Swift.
Alright, let's finish business: SwiftUI Part 2
34.Timer and .onReceive
-
Timers and just as the name says, a class object that, we say, "fires" after a certain time interval. To actually use the data sent by Timers, we use the
.onReceive()
modifier, which can be read about here.
35.FileManager in Swift
- This is another KEY element that you have to learn for mastering Swift
36.Haptics and Sound Effects
- New in iOS 17, Apple introduced the SensoryFeedback view modifier, marked by
.sensoryFeedback()
which can now represent simple haptics useful for example to let the user know that a task has succeeded or if an error is present. - Simple sound effects can also be easily added inside of our application using the AVFoundation framework built by Apple. You can simply import it into your app and use something like
AudioServicesPlaySystemSound(1026)
, where 1026 is the SystemSound id, for simple alerts and or notification sounds within your app. If you want to add custom sounds, you should instead use AVKit Framework.
37.Push Notifications
38.Core Data - CRUD Operations
- This is another way to cache application data, just like UserDefault, BUT, this is used to add a LOT of data inside of it, unlike UserDefault which should be used only for very small pieces. We will also talk about CRUD operations (Create, Read, Update, Delete)
- One thing that you need to know is that every App that uses Core Data has a Core Data stack.
39.Multi-threading in Swift
40.Closures
41.Codeable, Encodable, Decodable
42.Using the API in Swift
- In this roadmap, we'll talk about two ways which you can download data in Swift
- The first one is by using URLSession, which is a class object that coordinates a group of related, network data transfer tasks.
- The second one is by using the Combine Framework. This framework provides a Swift API that processes values over time, which can represent many kinds of asynchronous events, by using what's known as Publishers and Subscribers. Publishers provide data which can then be accesed by Subscribers
43.NSCache
- Another type of caching class object in Swift is NSCache. But, the key thing with this type ofcaching is that it is not permanent, will not persist between sessions, and it's used to store key-value pairs that may be deleted in case of low resources on the user's phone.
44.Custom features in SwiftUI
- Custom ViewModifiers in SwiftUI
- Custom ButtonStyle in SwiftUI
- Custom Transitions in SwiftUI
- How to use MatchedGeometryEffect in SwiftUI
- Custom Shapes in SwiftUI
- Custom shape susing Arcs and Quad Curves in SwiftUI
- Custom Tab Bar in SwiftUI
- Custom Navigation Bar in SwiftUI
- Custom Bindings in SwiftUI
- Custom Errors and Alerts in SwiftUI
- Custom Property Wrappers - part 1
- Custom Property Wrappers - part 2
45.Custom Protocols in Swift
- I've talked before about what Protocols are and I've actually referenced them a lot throughout this roadmap, but now we'll do a deeper dive inside this concept. First of all, a Protocol defines a blueprint of methods or properties thatcan then be adapted by classes (or other types). One of the biggest benefits of using
Protocols
is actually the fact that multiple classes can abide by a single protocol. Let's suppose we have two objectsstruct Dog { var breed: Labrador}
andstruct Cat { var breed: British Shorthair}
. Now, let's print their names. You'd have to do something likefunc printOut(dog: Dog){ dog.breed }
andfunc printOut(cat: Cat){ cat.breed }
. But, if you'd use a protocol, for exampleProtocol Printing { var name: String { get } }
, and then you define the structs as protocolsofPrinting
:struct Dog: Printing { var name: String }
andstruct Cat: Printing { var name: String }
, you could then use a single function to print both of their names, like so: `func printOut(object: Printing) { print(object.name) }.
46.Unit and UI Testing
47.CloudKit
- CloudKit is Apple's Framework for moving data between your app and iCloud. With this, you make sure that data stored by your app in iCloud can be accessed from multiple devices (e.g., the Notes app on iPhone and Mac use CloudKit for keeping notes synced between them). This framework provides services from transfering data to and from iCloud servers, and network connection MUST be present for it to work (that's why it's a cloud, duh)
48.TimelineView
- TimelineView is a view that updates according to a provided schedule, acting as a container where it redraws the content it contains at scheduled point of time. This is useful, for example, when we don't want the body of our SwiftUI views to update whenever a data change occurs, but at a given point in time.
49.KeyPaths in Swift
50.Accessibility - VoiceOver
51.The End
- Damn, you've finally did it. You reached the end. Congratulations! Took way longer than you first hoped for, huh? Well, as you could already see, Swift is a very vast and complex programming language, but, the easy-to-find documentation and video tutorials provide you with a bunch of tools useful for learning, but, one thing to keep in mind is that with every new OS version, Apple adds a bunch of improvements to Swift and sometimes also removes or provides replacement for functions and methods in all of their Frameworks. Altough I've covered most of the stuff available currently in Swift, there's no telling when some things will get deprecated or better alternatives will be available.
- What I'd do in your place is explore my horizon. There's no better alternative to learning than to practice and write Swift code yourself, and by building an app from the ground-up all by yourself. Me, personally, I tried to create a SoundCloud alternative with better UI and animations. It was a fun project that I enjoy, and I plan on releasing the repo for it on GitHub in the future after I finish it, because right now it's in a rougher shape :D
Please let me know what you think about it and make sure to join our Discord
Top comments (0)