Prices shown are a USD base. Your local-market price is calculated at checkout in your own currency, plus any local sales tax.
What is inside
20 chapters, in the order the interviews tend to ask them:
Optionals, nil and the ways out of an optional
Value semantics, reference semantics and copy-on-write
Structs, enums with payloads and pattern matching
Protocols, associated types and existentials
Generics, constraints and type erasure
Closures, capture semantics and escaping
Implicitly unwrapped optionals and their hazards
Collections, sequences and lazy pipelines
throws, Result and typed throws
Structured concurrency, async, await and actors
Task groups, scopes and structured cancellation
SwiftUI state, view identity and rendering
Combine publishers and async sequences
UIKit and SwiftUI interop and migration
The Swift Package Manager and module boundaries
Foundation, Codable, dates and the platform layer
Automatic reference counting, retain cycles and ownership
XCTest, Swift Testing and testable design
Performance, measurement and Instruments
Tooling, formatting, linting and build configuration
How the answers are built
Each chapter opens with the checklist the question is really testing. A few from this pack:
Optional is a generic enum with a none case and a some case wrapping the value, which is why wrapping is type safe and every extraction is a visible operation.
Assigning a struct copies it, so two variables cannot alias the same storage, which removes a whole category of aliasing bug at compile time.
An enum with associated values is an algebraic data type, so the compiler forces you to handle every case instead of trusting a flag field.
A conformance is resolved at compile time through a witness table, so a call on a concrete type is direct and a call through an existential is indirect.
A generic function is specialised per concrete type, so the body sees the real type and the optimiser can inline, at the cost of code size.
A closure is escaping when it outlives the call, which is exactly what the compiler means when it asks for the escaping attribute.
Questions this pack covers
At runtime, what does the Optional type actually contain?
When is nil a legitimate value for a model property?
When does assigning a struct actually copy its storage?
What does the identity operator compare that Equatable does not?
What does an enum with associated values give you that a class hierarchy cannot?
When does a recursive enum need the indirect keyword?
What is a witness table and when does the compiler build one?
When should you reach for some and when for any?
Each one is answered in full in the pack, with the reasoning written out rather than a bullet list.