Swift & Swift UI Roadmap

This Swift & Swift UI Roadmap is a free, full-text syllabus of 156 lessons in 45 stages, starting with Introduction and ending with Swift for Server Apps. It suits anyone who wants to learn Swift & Swift UI, whether new to it or filling gaps. There is no fixed length: every lesson is open from the start, so you go at your own pace and skip what you already know.

Last updated

Getting Started0%
Halfway
Almost There
Complete

Reading is open to everyone. Sign in to join this roadmap and track what you finish.

Continue learning

1. IntroductionIntroduction

0%

Introduction

5 topics · 4 sub-topics · 0 completed

0%

Full syllabus: every lesson in the Swift & Swift UI roadmap

45 stages and 156 lessons, in the order the roadmap suggests. Every lesson is free to read and open from the start.

  1. Stage 1: Introduction

    • Introduction

      Swift is a powerful and intuitive programming language developed by Apple, designed for building apps across all Apple platforms, including iOS, macOS, watchOS, and tvOS. SwiftUI is a declarative UI framework that enables developers to create user interfaces straightforwardly and efficiently using Swift. It offers…

    • What is Swift?

      Swift is a modern, general-purpose programming language developed by Apple. It's designed to be safe, fast, and expressive, making it a great choice for building applications across Apple's platforms, including iOS, macOS, watchOS, and tvOS. Swift combines the best aspects of C and Objective-C without the…

    • Why use Swift?

      Swift is a modern, powerful, and intuitive programming language developed by Apple. It's designed to be safe, fast, and expressive, making it an excellent choice for building applications across Apple's ecosystems, including iOS, macOS, watchOS, and tvOS. Its clean syntax and focus on developer productivity…

    • Swift vs Objective-C

      Swift and Objective-C are both programming languages used to develop applications for Apple's operating systems (iOS, macOS, watchOS, tvOS). Objective-C is an older language, built as an extension of C, while Swift is a more modern language designed to be safer, faster, and easier to learn. Swift offers features…

    • Where Swift is used?

      Swift is a versatile programming language developed by Apple, primarily known for building applications across the Apple ecosystem. This includes creating apps for iPhones, iPads, Macs, Apple Watches, and Apple TVs. Beyond Apple platforms, Swift can also be used for server-side development, command-line tools, and…

  2. Stage 2: Constants & Variables

    • Constants & Variables

      Constants and variables are fundamental building blocks in Swift for storing data. A variable holds a value that can be changed during the execution of a program, while a constant holds a value that, once assigned, cannot be altered. They are declared using the var and let keywords, respectively, followed by the…

  3. Stage 3: Installing Swift

    • Installing Swift

      Installing Swift involves setting up the Swift compiler and related tools on your system, allowing you to write and run Swift code. This typically involves downloading a Swift toolchain from the official Swift.org website or using a package manager like Homebrew on macOS or apt on Linux. The installation process…

  4. Stage 4: Type Annotations

    • Type Annotations

      Type annotations in Swift are a way to explicitly specify the type of a variable or constant. Instead of letting Swift infer the type based on the initial value, you tell the compiler exactly what kind of data the variable will hold, such as an Int, String, or Bool. This provides clarity and can help catch errors…

  5. Stage 5: Print & String Interpolation

    • Print & String Interpolation

      In Swift, print() is a function used to display values in the console, which helps debug and see the output of your code. String interpolation allows you to embed variables or expressions directly within a string. You do this by wrapping the variable or expression in parentheses preceded by a backslash:…

  6. Stage 6: Comments

    • Comments

      Comments in Swift are notes within your code that the compiler ignores. They're used to explain what the code does, making it easier for you and others to understand. You can create single-line comments using two forward slashes //. Anything after // on that line will be treated as a comment. For multi-line…

  7. Stage 7: Semicolons

    • Semicolons

      Semicolons (;) are used in Swift to separate multiple statements on a single line. While Swift doesn't require semicolons at the end of each statement like some other languages, they are necessary when you want to write more than one statement on the same line of code. Otherwise, Swift infers the end of a statement…

  8. Stage 8: Operators

    • Operators

      Operators are special symbols or phrases that you use to check, change, or combine values. Swift supports a variety of operators, from familiar arithmetic operators like + and -, to more advanced operators for logic and bit manipulation. These operators allow you to perform calculations, make comparisons, and…

    • Arithmetic

      Arithmetic operators are special symbols that perform mathematical calculations on values. Swift provides standard arithmetic operators like addition (+), subtraction (-), multiplication (), and division (/). It also includes the remainder operator (%), which calculates the remainder after division. These operators…

    • Comparison

      Comparison operators are symbols used to compare two values. These operators evaluate to a Boolean value (either true or false) based on the relationship between the values being compared. Common comparison operators include equal to (==), not equal to (!=), greater than (), less than (<), greater than or equal to…

    • Logical

      Logical operators in Swift allow you to combine or modify Boolean (true/false) values. They are used to create more complex conditions in your code. The primary logical operators are AND (&&), OR (||), and NOT (!). These operators enable you to control the flow of your program based on multiple conditions being met…

    • Nil-Coalescing

      The nil-coalescing operator ( ?? ) provides a default value when an optional is nil. It's a shorthand way to unwrap an optional if it contains a value, or to provide an alternative value if the optional is nil. This operator simplifies code by avoiding verbose if let or guard let statements when handling optional…

  9. Stage 9: if / else

    • if / else

      if and else statements are fundamental control flow structures in Swift that allow your code to execute different blocks of code based on whether a condition is true or false. The if statement evaluates a Boolean expression, and if the expression is true, the code within the if block is executed. Optionally, you…

    • Type Safety

      Thanks to type safety, Swift prevents you from accidentally using a value in a way that's not intended. Swift checks the types of your variables and constants during compilation. If you try to assign a value of the wrong type to a variable (like assigning a string to an integer variable), Swift will give you an…

    • Type Inference

      Type inference is a feature in Swift that allows the compiler to automatically deduce the data type of a variable or constant based on the value assigned to it. This means you don't always have to explicitly declare the type when creating variables; Swift can figure it out for you, making your code cleaner and more…

    • Type Casting

      Type casting is a way to check the type of an instance, or to treat that instance as if it were a different superclass or subclass from somewhere else in its own class hierarchy. It's essentially a way to access an object as a different type than it was originally declared to be. Swift provides is and as operators…

    • Memory Safety

      Memory safety in Swift is a set of language features that prevent common programming errors related to memory access. It ensures that your program accesses memory predictably and safely, preventing issues like accessing memory that has already been deallocated (dangling pointers) or writing outside the bounds of an…

    • Integers

      Integers in Swift are whole numbers, meaning they don't have any fractional or decimal parts. They can be positive, negative, or zero. Swift provides different integer types (like Int, Int8, Int16, Int32, Int64, UInt, UInt8, etc.) that vary in the range of values they can store, allowing you to choose the most…

    • Booleans

      Booleans represent truth values, either true or false. They are fundamental for controlling program flow, making decisions based on conditions, and representing binary states. In Swift, you declare a Boolean variable using the Bool keyword and assign it either true or false.

    • Floats & Doubles

      Floats and Doubles are fundamental data types in Swift used to represent numbers with fractional components (decimal numbers). A Float represents a 32-bit floating-point number, offering a balance between memory usage and precision. A Double represents a 64-bit floating-point number, providing greater precision…

    • Optionals & nil

      In Swift, an optional is a type that can hold either a value or the absence of a value (represented by nil). It's a way to indicate that a variable might not have a value at a particular time. nil itself represents the lack of a value for a variable of an optional type. Optionals are used to handle situations where…

    • Strings

      In Swift, a string is a sequence of characters, like letters, numbers, and symbols. It's a fundamental data type used to represent text. You can create strings using string literals (text enclosed in double quotes) or by combining other strings and values. Strings in Swift are Unicode-compliant, meaning they can…

    • Tuples

      Tuples in Swift are a way to group multiple values into a single compound value. Unlike arrays, the values within a tuple can be of different types. You define a tuple by enclosing the values within parentheses, separated by commas. For example, (1, "hello", true) is a tuple containing an integer, a string, and a…

  10. Stage 10: Basic Functions

    • Basic Functions

      Functions are self-contained blocks of code that perform a specific task. You define a function with a name, a set of inputs (parameters), and a return type. When you call a function, you execute the code within its block, potentially passing in values for the parameters, and the function may return a value as a…

  11. Stage 11: switch / case

    • switch / case

      A switch statement allows you to control which block of code is executed based on the value of a variable or expression. It compares the value against several possible cases, and executes the code associated with the first matching case. Unlike some other languages, Swift's switch statements don't require a break…

  12. Stage 12: Parameters

    • Parameters

      Parameters are named values that you pass into a function or closure when you call it. They act as inputs, allowing the function or closure to operate on specific data. Each parameter has a name and a type, and you specify these in the function or closure's definition. When calling the function or closure, you…

  13. Stage 13: Return Types

    • Return Types

      In Swift, a return type specifies the kind of data a function or closure sends back to the caller after it has finished executing. If a function performs a calculation or processes data, the return type indicates what type of result you can expect. If a function doesn't return any value, its return type is Void,…

  14. Stage 14: Error Handling

    • Error Handling

      Error handling is a mechanism for responding to and recovering from error conditions that your program may encounter during execution. It allows you to gracefully manage unexpected situations, such as invalid input, network failures, or file access issues, preventing your app from crashing and providing a more…

    • throwing

      Throwing errors allows you to signal that something unexpected or problematic has occurred during the execution of your code. When a function encounters a situation it can't handle normally, it can throw an error. This error is then passed up the call stack until it's caught and handled by an appropriate error…

    • catching

      Handling errors involves catching potential problems that may occur during code execution. When a function or method can throw an error, you use a do-catch block to try executing the code that might fail. If an error is thrown within the do block, control is transferred to the catch block, allowing you to respond…

    • propagating

      Error propagation in Swift is the process of passing an error up the call stack until it's handled by a catch block. When a function encounters an error it can't resolve, it throws the error. The calling function then has the responsibility to either handle the error using a do-catch block or to propagate the error…

  15. Stage 15: Loops

    • Loops

      Loops are fundamental programming constructs that allow you to execute a block of code repeatedly. They provide a way to automate repetitive tasks, iterate over collections of data, and perform actions until a specific condition is met. In Swift, you'll primarily encounter for-in loops for iterating over sequences…

  16. Stage 16: Function Types

    • Function Types

      In Swift, functions are first-class citizens, meaning they can be treated like any other data type. A function type describes the parameters a function accepts and the type of value it returns. This allows you to assign functions to variables, pass them as arguments to other functions, and return them as values…

  17. Stage 17: Nested Functions

    • Nested Functions

      Nested functions are functions defined inside the body of another function. The outer function is called the enclosing function, and the inner function is the nested function. Nested functions can access variables from their enclosing function's scope, even after the enclosing function has returned, creating a…

  18. Stage 18: Closures

    • Closures

      Closures in Swift are self-contained blocks of functionality that can be passed around and used in your code. Think of them as mini-functions without a name. They're similar to lambdas or anonymous functions in other programming languages, allowing you to define a function-like construct directly where it's needed,…

    • for

      In Swift, a for loop provides a clean and concise way to iterate over a sequence of items, such as elements in an array, characters in a string, or a range of numbers. It executes a block of code repeatedly for each item in the sequence. The basic structure involves specifying a loop variable that takes on the…

    • while

      A while loop in Swift repeatedly executes a block of code as long as a specified condition is true. The loop checks the condition before each execution of the code block. If the condition is initially false, the code block is never executed. This makes it suitable for situations where you want to repeat a task…

    • repeat..while

      The repeat...while loop in Swift executes a block of code at least once, and then continues to repeat the block as long as a specified condition is true. Unlike the while loop, which checks the condition before executing the code, the repeat...while loop checks the condition after executing the code. This…

    • continue & break

      In Swift, continue and break are control flow statements used within loops (like for, while, and repeat-while) to alter their execution. The continue statement skips the rest of the current iteration of the loop and proceeds to the next iteration. The break statement, on the other hand, immediately terminates the…

  19. Stage 19: Trailing Closures

    • Trailing Closures

      A trailing closure is a closure that's written after the function's parentheses. If a function's last parameter is a closure, you can pass the closure outside of the parentheses when you call the function. This syntax makes the code more readable, especially when the closure is long and complex. It's a syntactic…

  20. Stage 20: Enumerations

    • Enumerations

      Enumerations, often shortened to enums, are a way to define a group of related values under a common type. They essentially let you create your own custom data types where the possible values are explicitly defined. This makes your code more readable and safer by restricting the values a variable can hold to only…

  21. Stage 21: Protocols

    • Protocols

      A protocol in Swift defines a blueprint of methods, properties, and other requirements that suit a particular task or piece of functionality. Classes, structures, and enumerations can then adopt these protocols, providing concrete implementations for the requirements specified by the protocol. This allows you to…

  22. Stage 22: Structures & Classes

    • Structures & Classes

      Structures and classes are fundamental building blocks in Swift for creating custom data types. They allow you to group related variables (properties) and functions (methods) into a single, reusable unit. Structures are value types, meaning they are copied when passed around, while classes are reference types,…

  23. Stage 23: Generics

    • Generics

      Generics allow you to write flexible and reusable code that can work with any type. Instead of writing separate functions or structs for each data type you want to support, you can define a single function or struct that works with a placeholder type. This placeholder type is then specified when the function or…

  24. Stage 24: What is SwiftUI

    • What is SwiftUI

      SwiftUI is a declarative UI framework from Apple that allows developers to build user interfaces across all Apple platforms (iOS, macOS, watchOS, tvOS, and visionOS) using Swift code. Instead of imperatively defining UI elements and their behavior, you describe the desired state of your UI, and SwiftUI…

    • UIKit vs SwiftUI

      UIKit and SwiftUI are both frameworks for building user interfaces on Apple platforms (iOS, iPadOS, macOS, watchOS, and tvOS). UIKit is the older, imperative framework that has been around since the first iPhone was introduced. SwiftUI is a newer, declarative framework introduced in 2019 that offers a more modern…

    • Stored

      Stored properties are variables or constants that are part of a structure or class. They hold data directly within an instance of that structure or class. Think of them as the "things" an object has. You define them with var for variables (values that can change) and let for constants (values that cannot change…

    • Computed

      Computed properties in Swift provide a way to calculate a value rather than storing it directly. Unlike stored properties, which hold a value in memory, computed properties offer a getter to retrieve a value and an optional setter to indirectly set other properties. This allows you to perform calculations or…

    • Observers

      Property observers in Swift allow you to monitor and respond to changes in a property's value. You can define code that will be executed before (willSet) or after (didSet) a property's value is set. This is useful for tasks like updating the user interface, performing calculations based on the new value, or…

    • Wrappers

      Property wrappers in Swift provide a way to add a layer of code between the property and the code that manages it. They essentially encapsulate code that gets executed when a property is accessed or modified. This allows you to reuse the same property logic across multiple properties, such as enforcing constraints,…

    • Properties

      Properties associate values with a particular class, structure, or enumeration. Stored properties store constant or variable values as part of an instance, whereas computed properties calculate (rather than store) a value. You can also define type properties, which are associated with the type itself, rather than…

    • Methods

      Methods are functions that are associated with a particular type, like a structure or a class. They provide a way to encapsulate behavior and data together. You can define methods to perform actions related to instances of that type, allowing you to interact with and manipulate the data stored within those instances.

    • Initialization

      Initialization is the process of preparing an instance of a class, structure, or enumeration for use. This involves setting an initial value for each stored property on that instance and performing any other setup or initialization required before the new instance is ready. Initializers are special methods that are…

    • Inheritance

      Inheritance is a fundamental concept in object-oriented programming where a new class (called a subclass or derived class) can inherit properties and methods from an existing class (called a superclass or base class). This allows you to create a hierarchy of classes, where subclasses inherit and extend the…

    • Subscripts

      Subscripts are shortcuts for accessing elements within a collection, list, or sequence. They allow you to query instances of a type by writing one or more values in square brackets after the instance name. You can define subscripts on classes, structures, and enumerations, and they can take a single parameter or…

    • Extensions

      Extensions in Swift are a way to add new functionality to an existing class, structure, enumeration, or protocol type. They allow you to extend types even if you don't have access to the original source code. Extensions can add computed instance properties, define instance methods and type methods, provide new…

    • Optional Chaining

      Optional chaining is a feature that allows you to access properties, methods, and subscripts of an optional value. If the optional contains a value, the property, method, or subscript is accessed as normal. However, if the optional is nil, the entire chain gracefully fails and returns nil without causing a runtime…

  25. Stage 25: App lifecycle

    • App lifecycle

      The app lifecycle manages the state and behavior of your application from launch to termination. It's primarily handled through the @main attribute, which designates the entry point of your app. The App protocol defines the structure of your application, including the initial scene that's displayed to the user.…

  26. Stage 26: Views

    • Views

      In Swift and SwiftUI, a View is a fundamental building block for creating user interfaces. It represents a rectangular area on the screen that displays content and responds to user interactions. Views can be simple, like a text label or an image, or complex, composed of multiple nested views arranged in a hierarchy…

  27. Stage 27: Data Flow

    • Data Flow

      Data flow refers to how data moves and changes within your application. It describes the path data takes from its source, through various components, and ultimately to the user interface. Understanding data flow is crucial for building predictable and maintainable apps, as it helps you manage state and ensure that…

    • NavigationStack

      NavigationStack provides a way to manage hierarchical navigation within your app. It allows users to move forward and backward through a stack of views, similar to how you navigate through folders on a computer. Each view pushed onto the stack becomes a new level in the navigation hierarchy, and the NavigationStack…

    • NavigationPath

      NavigationPath provides a way to manage the navigation stack programmatically. Instead of relying solely on NavigationLink to push views onto the stack, NavigationPath allows you to manipulate the navigation history directly. This is particularly useful for scenarios where you need to navigate based on complex…

    • TabView

      TabView allows you to create an interface with multiple distinct views, each accessible through a tab bar at the bottom (or top, depending on the platform). It's a container view that manages a collection of child views, presenting one at a time based on the user's tab selection. Each tab can be associated with an…

    • NavigationLink

      NavigationLink enables navigation between different views within your app. It acts as a button or tappable element that, when activated, pushes a new view onto the navigation stack, displaying it to the user. This allows you to create hierarchical navigation structures, where users can drill down into more detailed…

    • HStack

      An HStack is a layout container that arranges its child views in a horizontal line. It's like a row where you place different UI elements side-by-side. You can control the spacing between these elements and how they align vertically within the row. HStack simplifies creating horizontal layouts without needing to…

    • VStack

      A VStack is a layout container that arranges its child views in a vertical line. It's like stacking building blocks on top of each other. You can use it to group related UI elements, such as text labels, images, and buttons, so they appear one above the other on the screen. VStack automatically manages the…

    • ZStack

      ZStack is a layout container that overlays views on top of each other, aligning them in both the horizontal and vertical axes. The views are stacked in the order they are declared, with the last view in the code appearing on top. This allows you to create layered effects, such as placing text over an image or…

    • Grid

      A Grid is a layout container that arranges views in a two-dimensional grid, similar to a table. It allows you to organize content into rows and columns, providing a structured way to display information and create complex layouts. You can customize the appearance and behavior of the grid by specifying the number of…

    • GeometryReader

      GeometryReader is a container view that provides information about its own size and position within its parent view. It allows you to access the available space offered by the parent, enabling you to create views that adapt dynamically to different screen sizes and orientations. By using a closure, you can access a…

    • Text

      Text is a fundamental view used to display static, read-only text on the screen. It allows you to present strings, apply formatting like fonts, colors, and styles, and handle localization for different languages. You can use Text to create labels, descriptions, headings, and any other textual content within your…

    • Image

      Image is a fundamental view used to display pictures or graphics within your app's user interface. It allows you to load images from various sources, such as your app's asset catalog, the file system, or even remote URLs, and present them to the user. You can customize the appearance of an Image by applying…

    • Button

      A Button is a fundamental UI element that triggers an action when tapped or clicked. It's essentially a tappable area on the screen that, when interacted with, executes a predefined piece of code. Buttons are used to initiate actions like submitting forms, navigating to different screens, or performing specific…

    • List

      A List is a container view that arranges data in a single column, making it easy to display scrollable collections of items. It's similar to a table view in UIKit, but with a more declarative and flexible approach. You can populate a List with static content or dynamically generate rows based on data from an array…

    • Form

      In Swift and SwiftUI, a Form is a container view that's designed to organize and display input controls, such as text fields, toggles, and pickers. It automatically handles the layout and styling of these controls, making it easier to create structured and user-friendly interfaces for collecting data or configuring…

    • font

      The font modifier in SwiftUI allows you to customize the appearance of text within your views by specifying the typeface, weight, and size. It provides a way to control how text is displayed, enabling you to create visually appealing and consistent user interfaces. You can apply different font styles to various…

    • padding

      Padding in Swift and SwiftUI is used to add space around the content of a view. It essentially creates a buffer zone between the view's content and its surrounding elements or the edges of its parent view. This helps improve the visual appearance and readability of your user interface by preventing elements from…

    • background

      The background view modifier in SwiftUI allows you to set a background for a view. This background can be a color, a shape, or even another view. It's applied behind the content of the view it modifies, effectively layering content on top of the background you specify. You can customize the appearance of the…

    • clipShape

      clipShape in SwiftUI allows you to mask a view, effectively cropping it to a specific shape. Instead of displaying the entire rectangular area of a view, clipShape lets you define a shape (like a circle, rectangle with rounded corners, or even a custom shape), and only the portion of the view that falls within that…

    • ViewBuilder

      ViewBuilder is a result builder attribute in Swift that allows you to build complex views in a declarative and concise way. It essentially transforms a series of statements into a single view, automatically handling the logic of combining multiple views together. This is particularly useful when creating custom…

  28. Stage 28: Animations

    • Animations

      Animations allow you to visually enhance your app's user interface by creating smooth transitions and dynamic effects. They involve changing properties of views over time, making your app feel more responsive and engaging. You can animate things like size, position, opacity, and color, adding a layer of polish and…

    • Implicit animations

      Implicit animations in Swift UI provide a simple way to animate changes to a view's properties. When a property that affects the view's appearance changes, and an animation modifier is attached to the view, Swift UI automatically animates the transition between the old and new values. This creates smooth and…

    • Explicit animations

      Explicit animations involve directly controlling the animation's behavior by specifying its parameters, such as duration, delay, and easing. Instead of relying on implicit transitions triggered by state changes, you define exactly how a view's properties animate from one value to another. This gives you…

    • Transitions

      Transitions define how views appear and disappear from the screen. They control the visual effects applied during these changes, allowing you to create smooth and engaging user experiences. You can customize transitions to include effects like fading, sliding, scaling, or even more complex animations, making your…

    • Animatable Protocol

      The Animatable protocol allows you to customize how changes to your custom data types are animated in SwiftUI. By conforming to this protocol, you define a var animatableData: Self.AnimatableData property that SwiftUI uses to interpolate between the starting and ending values of your data during an animation. This…

  29. Stage 29: User Interaction

    • User Interaction

      User interaction refers to how users engage with your app. This includes everything from tapping buttons and entering text to swiping through lists and responding to alerts. It's about making your app responsive and intuitive, so users can easily navigate and accomplish their goals. SwiftUI provides various tools…

    • UI Controls

      UI Controls are the visual building blocks that users interact with in an app's interface. These elements, such as buttons, text fields, sliders, and switches, allow users to input data, trigger actions, and navigate through the application. They provide a way for the user to communicate with the app and for the…

    • Gestures

      Gestures are actions performed by a user to interact with a device's screen, such as tapping, swiping, pinching, or rotating. They allow users to directly manipulate and control elements within an application, providing a more intuitive and engaging experience. By recognizing and responding to these gestures,…

    • Drag & Drop

      Drag and drop is a user interface interaction that allows users to select an item (the "drag") and move it to a different location (the "drop"). This interaction is commonly used for rearranging items in a list, moving files between folders, or transferring data between different parts of an application. It…

    • Localization

      Localization is the process of adapting your app to different languages, regions, and cultures. This involves translating text, adjusting layouts for different reading directions, and formatting dates, times, and currencies according to local conventions. By localizing your app, you can reach a wider audience and…

    • Accessibility

      Accessibility focuses on making your app usable by everyone, including people with disabilities. This involves providing alternative ways to interact with your app's content and controls, such as using screen readers, switch controls, or larger fonts. By implementing accessibility features, you ensure that your app…

    • @State

      @State is a property wrapper in SwiftUI that allows you to manage the state of a view. It's used to store values that can change over time and trigger updates to the view when they do. When a property is marked with @State, SwiftUI automatically manages the storage and ensures that the view is re-rendered whenever…

    • @Binding

      @Binding creates a two-way connection between a view and a source of truth that lives elsewhere. It essentially provides a way for a view to read and modify a value that's owned and managed by another view or data structure. When the view modifies the bound value, the original source of truth is automatically…

    • @StateObject

      @StateObject is a property wrapper used to manage the lifecycle of reference type objects (classes) that hold state for a view. It ensures that the object is created only once when the view appears and persists across view updates, preventing the object from being re-initialized every time the view redraws. This is…

    • @ObservedObject

      @ObservedObject is a property wrapper in SwiftUI used to subscribe to an external class that conforms to the ObservableObject protocol. When the observable object publishes changes (typically through @Published properties), any views observing it will automatically update to reflect the new data. This allows you to…

    • @EnvironmentObject

      @EnvironmentObject allows you to share data across your entire app or specific parts of your view hierarchy without having to manually pass it down through each view. It's a way to make data accessible to any view that needs it, acting like a global state container that SwiftUI manages. This is particularly useful…

  30. Stage 30: Access Control

    • Access Control

      Access control lets you restrict which parts of your code can be used and accessed by other parts of your code, or from code in other files and modules. It's like setting permissions on different components of your app, ensuring that sensitive data and internal workings are protected from unintended use or…

  31. Stage 31: ARC

    • ARC

      Automatic Reference Counting (ARC) is a memory management feature in Swift that automatically frees up memory used by class instances when they are no longer needed. It works by tracking how many references exist to each object. When the reference count drops to zero, meaning no other parts of the code are using…

  32. Stage 32: Result Builders

    • Result Builders

      Result builders in Swift provide a way to build up data structures, like views in SwiftUI, using a sequence of statements. They essentially transform a series of expressions into a single value, often an array or a more complex data structure. This allows you to write more declarative and readable code, especially…

    • Core Data

      Core Data is a framework provided by Apple for managing the model layer objects in your application. It's not a database itself, but rather an object graph management and persistence framework. Core Data allows you to treat data as objects, making it easier to work with and manage complex relationships between data…

    • SwiftData

      SwiftData is Apple's modern framework for managing an app's data model and persisting data locally. It provides a declarative and type-safe way to define your data schema, interact with the underlying storage (typically SQLite), and manage relationships between different data entities. SwiftData integrates…

    • CloudKit

      CloudKit is Apple's cloud storage solution that allows developers to save and retrieve app data in iCloud. It provides a way to store structured data, like records with fields, and binary data, like images or videos, in the cloud. Users can access their data across all their devices logged into the same iCloud…

    • Firabase

      Firebase is a Backend-as-a-Service (BaaS) platform that provides developers with a suite of tools and services to build, manage, and grow their apps. It handles many backend tasks, such as data storage, user authentication, hosting, and analytics, allowing developers to focus on building the front-end user…

    • Realm

      Realm is a mobile database solution that offers a convenient and efficient way to store and manage data directly on a user's device. It's designed to be faster and easier to use than traditional databases like SQLite, providing a developer-friendly API for reading, writing, and querying data. Realm supports…

    • GRDB

      GRDB is a Swift library that provides a convenient and reliable way to interact with SQLite databases. It allows you to perform database operations like creating tables, inserting, querying, updating, and deleting data using Swift code. GRDB focuses on safety, performance, and ease of use, making it a good choice…

  33. Stage 33: Macros

    • Macros

      Macros are a way to generate code at compile time. They allow you to write code that transforms or expands into other code, effectively automating repetitive tasks and enabling more expressive and concise syntax. This can lead to improved code readability, reduced boilerplate, and enhanced compile-time safety.

  34. Stage 34: Data persistance

    • Data persistance

      Data persistence refers to the ability of an application to store data in a way that it remains available even after the application is closed or the device is restarted. This allows apps to remember user preferences, save progress, or maintain data across multiple sessions. In Swift and SwiftUI, various techniques…

    • Databases

      Databases provide a structured way to store and manage data within your Swift applications. They allow you to persist information beyond the app's runtime, meaning data is saved even when the app is closed. This is essential for storing user information, application settings, or any other data that needs to be…

    • FileManager

      FileManager provides a way to interact with the file system. It allows you to perform operations like creating, reading, writing, deleting, and moving files and directories. You can use it to manage data stored locally on the device, such as user preferences, cached data, or downloaded content.

    • UserDefaults, AppStorage

      UserDefaults and AppStorage are mechanisms in Swift and SwiftUI for storing small amounts of data persistently on a user's device. UserDefaults is a traditional way to store simple data types like strings, numbers, and booleans, using key-value pairs. AppStorage, built on top of UserDefaults, provides a more…

    • Asynchronous Functions

      Asynchronous functions allow your program to start a potentially long-running task and then continue executing other code without waiting for that task to complete. When the asynchronous task finishes, it can notify your program, which can then process the results. This approach prevents your app from freezing or…

    • Asynchronous Sequences

      Asynchronous sequences allow you to iterate over a series of values that arrive over time, potentially from different threads or even across a network. Unlike regular sequences, where all elements are immediately available, asynchronous sequences produce elements as they become available, enabling you to handle…

    • Tasks & Task Groups

      Tasks in Swift's concurrency model represent units of work that can be executed concurrently. Task Groups allow you to create and manage collections of child tasks, enabling you to perform parallel operations and aggregate their results. This provides a structured way to break down complex operations into smaller,…

    • Unstructured Concurrency

      Unstructured concurrency in Swift allows you to create and manage concurrent tasks without adhering to a strict parent-child relationship. This means you can launch asynchronous operations independently, and their lifecycles are not necessarily tied to the scope in which they were created. It provides flexibility…

    • Actors

      Actors are a concurrency model that provides a way to isolate state and prevent data races in concurrent Swift programs. They encapsulate mutable state and allow access to that state only through asynchronous message passing. This ensures that only one task can access the actor's state at any given time,…

    • Strict Concurrency Checking

      Strict concurrency checking is a feature that helps you write safer and more reliable concurrent code. It detects potential data races and other concurrency-related issues at compile time, preventing unexpected behavior and crashes when your app runs. By enforcing rules about how data can be accessed from different…

    • SwiftUI with Async/Await

      Async/Await is a programming paradigm that simplifies asynchronous code, making it easier to read and manage. In SwiftUI, it allows you to perform long-running tasks, like network requests or data processing, without blocking the main thread, ensuring your app remains responsive. This approach replaces traditional…

  35. Stage 35: Swift Package Manager

    • Swift Package Manager

      The Swift Package Manager is a tool for managing dependencies in your Swift projects. It automates the process of downloading, building, and linking external libraries and frameworks into your code. This allows you to easily reuse code written by others and share your own code with the Swift community, promoting…

    • Using Packages

      Swift Package Manager lets you add external libraries and tools to your Swift projects. Using packages involves declaring dependencies in your Package.swift file, which tells Swift Package Manager where to find the code you want to use. Once declared, Swift Package Manager handles downloading, building, and linking…

    • Creating Packages

      The Swift Package Manager is a tool for managing the distribution of Swift code. Creating a Swift package allows you to bundle your code into reusable modules, making it easy to share and use in other projects. This involves defining the package's structure, specifying dependencies, and building the code into a…

    • Plugins

      Swift Package Manager plugins allow you to extend the build process of your Swift packages with custom tools and scripts. These plugins can automate tasks like code generation, linting, formatting, and other pre-build or post-build operations, streamlining your development workflow and ensuring consistency across…

  36. Stage 36: App Architecture

    • App Architecture

      App architecture is the structural design of an application, defining its components, their relationships, and how they interact to achieve the app's functionality. It provides a blueprint for organizing code, managing data, and handling user interactions, ensuring the app is maintainable, scalable, and testable. A…

    • MVVM

      MVVM (Model-View-ViewModel) is a software architectural pattern that facilitates the separation of concerns in application development. It divides an application into three interconnected parts: the Model (data and business logic), the View (the user interface), and the ViewModel (an intermediary that prepares data…

    • Clean Architecture

      Clean Architecture is a software design philosophy that emphasizes separation of concerns, making applications more maintainable, testable, and scalable. It achieves this by dividing the application into distinct layers, each with its own specific responsibility and dependencies. The core idea is to keep the…

    • Dependency Injection

      Dependency Injection is a design pattern where a component receives its dependencies from external sources rather than creating them itself. This promotes loose coupling, making code more modular, testable, and reusable. Instead of a class being responsible for instantiating the objects it needs, those objects are…

  37. Stage 37: Swift Package Index

    • Swift Package Index

      The Swift Package Index is a comprehensive catalog and search engine for Swift packages. It allows developers to discover, explore, and evaluate Swift packages that can be integrated into their projects. It provides information about package compatibility, documentation, and other relevant details, making it easier…

  38. Stage 38: Testing

    • Testing

      Testing involves writing code to verify that your app functions correctly automatically. This includes checking individual units of code (unit tests), ensuring different parts of your app work together seamlessly (integration tests), and validating the overall user experience (UI tests). By writing tests, you can…

    • Swift Testing

      The Swift Testing library allows you to leverage the powerful and expressive capabilities of the Swift programming language to develop tests with more confidence and less code. The library integrates seamlessly with Swift Package Manager testing workflow, supports flexible test organization, customizable metadata,…

    • XCTest

      XCTest is Apple's framework for writing unit, integration, and UI tests for your Swift and Objective-C code. It allows developers to verify the correctness of their code by writing assertions that check for expected outcomes. While XCTest has been the standard for iOS testing for a long time, the Swift Testing…

  39. Stage 39: Logging & Debugging

    • Logging & Debugging

      Logging and debugging are essential practices in software development for identifying and resolving issues in your code. Logging involves recording information about your application's behavior as it runs, allowing you to trace events and diagnose problems. Debugging, on the other hand, is the process of stepping…

    • XCode debugging

      The Xcode debugger is a powerful tool built into the Xcode IDE that allows developers to step through their code line by line, inspect variables, and understand the flow of execution. It helps identify and fix bugs by providing insights into the application's state at various points in time. You can set breakpoints…

    • swift-log

      swift-log is a logging API for Swift that provides a standardized way to record messages from your code. It allows you to capture information about your application's behavior, errors, and performance, making it easier to diagnose issues and understand how your code is running. With swift-log, you can configure…

    • SwiftUI inspector

      The SwiftUI Inspector is a built-in tool within Xcode that allows developers to examine and modify the properties of SwiftUI views in real-time while an app is running, either in the simulator or on a physical device. It provides a visual interface to inspect the view hierarchy, adjust attributes like colors,…

    • CocoaLumberjack

      CocoaLumberjack is a logging framework for Objective-C and Swift that provides a flexible and powerful way to record and manage log messages in your applications. It allows you to log to multiple destinations simultaneously, such as the console, files, or even remote servers, and offers different log levels to…

  40. Stage 40: Server Frameworks

    • Server Frameworks

      Server frameworks provide the tools and structure needed to build backend applications, APIs, and web services. They handle tasks like routing requests, managing data, and interacting with databases, allowing developers to focus on the core logic of their server-side applications. These frameworks enable Swift…

    • Vapor

      Vapor is an open-source web framework written in Swift that allows developers to build robust and scalable server-side applications, APIs, and websites. It provides a clean and expressive syntax, making it easier to handle tasks like routing, database interaction, and templating, all while leveraging the…

    • Hummingbird

      Hummingbird is an open-source server-side framework written in Swift, designed to help developers build high-performance web applications and APIs. It leverages Swift's type safety and concurrency features to provide a robust and efficient platform for handling HTTP requests, routing, and middleware. Hummingbird…

    • MongoKitten

      MongoKitten is a native Swift driver for MongoDB, a popular NoSQL database. It allows Swift applications, including those built with SwiftUI, to interact with MongoDB databases for storing and retrieving data. This interaction involves establishing a connection, performing CRUD (Create, Read, Update, Delete)…

  41. Stage 41: IDEs

    • IDEs

      An Integrated Development Environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE typically includes a source code editor, build automation tools, and a debugger. These tools are designed to streamline the process of writing,…

  42. Stage 42: Networking Libraries

    • Networking Libraries

      Networking libraries provide tools and abstractions to simplify the process of making network requests, handling responses, and managing data transfer. They handle tasks like creating URLs, managing connections, serializing data into formats like JSON, and parsing responses, allowing developers to focus on the…

    • Alamofire

      Alamofire is a Swift-based HTTP networking library that simplifies the process of making network requests in your iOS, macOS, tvOS, and watchOS applications. It provides an elegant interface built on top of Apple's URLSession to handle common networking tasks like making GET, POST, PUT, and DELETE requests,…

    • swift-nio

      SwiftNIO is a low-level, cross-platform asynchronous event-driven network application framework. It enables the development of high-performance protocol servers and clients in Swift. It provides building blocks for handling network connections, data transfer, and event processing without blocking the main thread,…

    • Moya

      Moya is a Swift networking library that simplifies the process of making API requests. It acts as an abstraction layer on top of URLSession, providing a cleaner and more organized way to define and manage your API endpoints. Instead of directly dealing with URLs, HTTP methods, and request parameters, you define…

  43. Stage 43: Static Linux SDK

    • Static Linux SDK

      A Static Linux SDK allows you to compile Swift code into standalone executables that can run on Linux systems without requiring a full Swift runtime environment to be installed. This is achieved by bundling all necessary Swift libraries and dependencies directly into the executable file, making it self-contained…

    • DocC

      DocC is Apple's documentation compiler that allows developers to create rich, interactive documentation directly from their Swift or Objective-C code. It transforms specially formatted comments within your code into a structured and navigable documentation set, complete with articles, tutorials, and API reference.…

    • Swift Charts

      Swift Charts is a framework within Swift that allows you to create a variety of visually appealing and informative charts directly in your applications. It provides a declarative syntax for defining chart types, data sources, and visual customizations, making it easier to represent data clearly and understandably.…

    • Swift Playgrounds

      Swift Playgrounds is an Apple application designed to teach coding in a fun and interactive way. It uses a game-like environment where users learn Swift programming concepts by solving puzzles and completing challenges. It's available on iPad and Mac, making it accessible for beginners and experienced programmers…

    • Xcode

      Xcode is Apple's integrated development environment (IDE) used for developing software for macOS, iOS, watchOS, and tvOS. It provides a comprehensive suite of tools for writing, debugging, and testing code, as well as designing user interfaces. Xcode includes a code editor, compiler, debugger, and build system, all…

    • VSCode

      VSCode (Visual Studio Code) is a free and popular source code editor developed by Microsoft. It's known for its lightweight design, extensive customization options through extensions, and robust support for various programming languages, including Swift. It provides features like syntax highlighting, debugging, an…

    • Emacs

      Emacs is a highly customizable and extensible text editor, known for its powerful editing capabilities and extensive ecosystem of packages. It's more than just a text editor; it's often described as an operating system within an operating system, allowing users to tailor the environment to their specific needs…

    • Neovim

      Neovim is a free and open-source, heavily refactored and extended version of the Vim text editor. It aims to improve Vim's extensibility, user experience, and maintainability. It allows developers to use plugins and extensions to customize their editing environment, and it can be used for coding in various…

  44. Stage 44: SDKs for Wasm

    • SDKs for Wasm

      WebAssembly (Wasm) is a binary instruction format designed as a portable compilation target for programming languages, enabling high-performance applications on the web and other environments. SDKs for Wasm allow developers to compile Swift and Swift UI code into Wasm, making it possible to run Swift applications…

  45. Stage 45: Swift for Server Apps

    • Swift for Server Apps

      Swift isn't just for iOS and macOS apps; it can also be used to build server-side applications. This allows developers to use their existing Swift knowledge to create backends, APIs, and other server-side components, potentially leading to more efficient development workflows and code sharing between client and…

Questions about the Swift & Swift UI Roadmap

Is the Swift & Swift UI Roadmap free?

Yes. All 156 lessons in this roadmap are free to read on Bibha AI Learning Labs, with no account and no payment. Signing in is optional: it lets you mark lessons as done and keep your progress, and it opens the AI tutor, which runs on your own API key.

How long does the Swift & Swift UI Roadmap take?

There is no fixed duration. It has 156 lessons in 45 stages, and the time it takes depends on how many hours you give it each week. Nothing is locked, so you can skip what you already know, and your progress is saved once you sign in.

Where should I start the Swift & Swift UI Roadmap?

Start with stage 1, Introduction, and work down in order. The stages are numbered in the order the roadmap suggests, but every lesson is open, so if you already know Introduction you can go straight to Constants & Variables or anything after it. Each lesson links to free resources for going deeper.

Can I learn Swift & Swift UI in Hindi?

The lessons are written in English. Once you sign in, you can ask the AI tutor on any lesson to explain it in Hindi or Hinglish. It answers from that lesson’s own text, so the explanation stays on the syllabus. The tutor runs on your own Google, OpenAI or Anthropic key.

Still confused? Ask me