Skip to content

Swift Handbook

Before diving into iOS or macOS frameworks, having a clear grip on Swift optionals, structs, protocols, generics, Codable, and Swift 6 concurrency saves hours of compiler headaches.

This handbook teaches modern Swift 6.4 cleanly and practically, covering value types and Copy-on-Write, some vs any protocols, custom Codable decoding, actor reentrancy and bounded task groups, Swift Testing, and 10 runnable exercises with solutions.

Get the Swift Handbook for free (PDF, EPUB, and hands-on exercises with solutions): subscribe to my newsletter and I'll send it your way, together with all my other free programming ebooks.

Want the whole collection? See all my free ebooks.

By subscribing you agree to receive my newsletter (new tutorials, book releases, and courses). You can unsubscribe anytime from the link at the bottom of every email. Your email is the only data collected, stored securely in the EU, and never shared.

Table of contents

23 chapters · exercises included
  1. 01Introduction and setting up Swift 6.4
  2. 02Variables, constants, comments, and semicolons
  3. 03Numbers, booleans, and strings
  4. 04Operators and expressions
  5. 05Optionals and nil
  6. 06Control flow: if, switch, guard, and loops
  7. 07Collections and tuples
  8. 08Everyday Swift recipes: strings, random values, dates, and JSON
  9. 09Functions and closures
  10. 10Structures and enumerations
  11. 11Classes, inheritance, and ARC
  12. 12Protocols, extensions, and generics
Show 11 more chapters
  1. 13Error handling and typed throws
  2. 14Generics, opaque types, and protocol-oriented design
  3. 15Codable beyond the basics
  4. 16Concurrency and Swift 6 data-race safety
  5. 17Modern Swift concurrency in practice
  6. 18Ownership, macros, and modern Swift 6.4 features
  7. 19Swift Package Manager and Swift Testing
  8. 20Common beginner Swift mistakes
  9. 21Swift quick reference cheat sheet
  10. 22Hands-on beginner Swift exercises (with solutions)
  11. 23Where to go from here