Swift

Apple's language for its platforms.

Swift is taught here in 13 lessons, running from Syntax and optionals through to Packaging, build configuration and distribution. Each lesson takes one topic, shows the working code, and links onward to the next, so the course can be read straight through in order.

TrackMobile Development
Lessons13
LevelBeginner to intermediate
Reading timeabout 3 hours
PrerequisitesHelpful, but not required: Kotlin

Lessons

  1. Syntax and optionalslet and var, functions and control flow, and the optional type that forces you to decide what happens when a value is missing.
  2. Structs, classes and protocolsValue versus reference semantics, when inheritance is the right tool, and how protocols drive reuse in Swift.
  3. Closures and error handlingClosure syntax and capture semantics, throwing functions with do-catch, and combining both with async and await.
  4. Setting up Swift: Xcode, Swift Package Manager and Swift 6Pick a toolchain, decide between an Xcode project and a Swift package, read a Package.swift manifest, and build and run from the command line.
  5. Generics, opaque types and protocol designGeneric functions and constraints, associated types, some versus any, primary associated types, type erasure, and designing protocols that stay useful.
  6. Collections, strings and the standard libraryArrays, dictionaries and sets, map and filter and reduce, String versus Substring, Unicode and grapheme clusters, Date and Calendar, and Codable basics.
  7. Swift 6 concurrency: tasks, actors and SendableTask and TaskGroup, async let, actor isolation, MainActor, Sendable checking, structured cancellation and the data-race safety rules of language mode 6.
  8. SwiftUI: views, state and navigationCompose views, choose between State, Binding and Observable, build lists and forms, navigate with NavigationStack, and connect a view to async data.
  9. Networking, persistence and CodableURLSession with async and await, JSONDecoder and CodingKeys, mapping errors, caching, UserDefaults, file storage and SwiftData essentials.
  10. Testing with XCTest and Swift TestingTest targets, the expect and require macros, async tests, parameterised cases, protocol-based mocks, UI tests and running everything in CI.
  11. Memory management, ARC and performanceStrong, weak and unowned references, capture semantics, value-type copying, autorelease, and using Instruments to find a leak or a hot path.
  12. Macros, property wrappers and result buildersWrite a property wrapper, build a result builder, understand the macro system and its limits, and know how to read generated code when something breaks.
  13. Packaging, build configuration and distributionBuild settings and xcconfig files, schemes and environment configuration, Swift packages as dependencies, TestFlight, App Store submission and server-side deployment.

More in Mobile Development

Android iOS Flutter React Native Kotlin

FAQ

How long does the Swift course take?
It has 13 lessons, about 3 hours of reading. Expect roughly twice that if you type out and run every example.
Do I need prior experience for Swift?
Not strictly. It helps to have read Kotlin first, because some lessons build on it, but every lesson explains its own assumptions.
What should I read after Swift?
This is the last course in Mobile Development right now. Browse the other tracks from the courses index to go sideways.