Learn the whole stack
Study Guide
Every core iOS topic, explained from first principles and framed the way interviews ask. Read the concept, then the level note so you know whether it is table-stakes or differentiating.
01 · Swift Language Essentials
What it is. Swift is a value-oriented, type-safe language. The single most important
idea to internalize early is value types vs reference types: struct and
enum are copied on assignment (value semantics), while class instances are
shared by reference. SwiftUI leans hard on value types, so default to struct and reach for
class only when you need identity or reference semantics.
Core fluency the interview assumes: optionals (and safe unwrapping with if let /
guard let rather than force-unwrap !), enums with associated values,
closures and how they capture, protocols and protocol-oriented design, generics,
and error handling with do/try/catch.
self strongly inside a stored property creates a retain cycle —
break it with [weak self]. This is a classic senior follow-up.02 · SwiftUI Fundamentals
What it is. SwiftUI is a declarative UI framework: you describe what the UI should
look like for a given state, and the framework diffs and updates the screen when state changes. A view is
a lightweight struct conforming to View with a body that returns
more views.
Master modifiers (and that order matters — .padding().background() differs
from .background().padding()), layout with VStack/HStack/
ZStack, Spacer, frame, and alignment, and lists with
List and ForEach keyed by stable identity.
ForEach, use a stable id (a real model id, not the array index) or animations
and state will attach to the wrong row.03 · State & Data Flow in SwiftUI
What it is. SwiftUI is driven by a single source of truth. Pick the right property wrapper for who owns the state:
@State— value owned by this view (private, transient UI state).@Binding— a two-way reference to state owned elsewhere.@Observable(the Observation framework, iOS 17+) — reference-type model whose properties the views observe automatically; pair with@Stateto own it and@Bindableto bind to it.@Environment— dependencies injected down the view tree.
Before iOS 17 this was ObservableObject + @Published + @StateObject/
@ObservedObject; know both, because plenty of code still uses the older API.
@Published model, which invalidated all observers.04 · UIKit & Interoperability
What it is. UIKit is the imperative, mature UI framework that powered iOS for a decade.
Even in a SwiftUI-first app you need it for APIs SwiftUI doesn't fully cover, deep customization, and
large existing codebases. Know the UIViewController lifecycle
(viewDidLoad → viewWillAppear → viewDidAppear → …), Auto Layout constraints, and
UITableView/UICollectionView with diffable data sources.
The bridge goes both ways: wrap UIKit in SwiftUI with UIViewRepresentable /
UIViewControllerRepresentable, and host SwiftUI inside UIKit with
UIHostingController.
05 · Swift Concurrency
What it is. Modern async iOS is built on async/await and structured
concurrency. async functions suspend without blocking a thread; Task
starts concurrent work; async let and TaskGroup run children in parallel and
join them. Actors protect mutable state from data races by serializing access, and
@MainActor guarantees code runs on the main thread (required for UI).
Swift 6 turns this into compile-time data-race safety: types crossing concurrency boundaries
must be Sendable, and the compiler enforces actor isolation. Understanding isolation,
Sendable, and @MainActor is the senior concurrency conversation.
DispatchQueue.main.async
out of habit — use @MainActor. And never block the main actor with synchronous work; move it
off with a Task or a background actor.@MainActor.
Senior: explain actor isolation, Sendable, cancellation, and how to migrate a callback-based
API to async with withCheckedContinuation.06 · Networking & Codable
What it is. The standard stack is URLSession's async API plus
Codable for JSON. Codable (= Encodable & Decodable) maps JSON to Swift
types automatically; use CodingKeys to rename fields and decoder strategies (e.g.
.convertFromSnakeCase, custom date decoding) to handle real-world payloads.
APIClient) so view models depend on an abstraction you can mock in tests. Layer caching with
URLCache or your persistence store, and centralize retry/auth-refresh logic.07 · Persistence
What it is. Pick storage by the data: SwiftData (iOS 17+) for app models —
annotate a class with @Model, save through a ModelContext, and query reactively
with @Query; Core Data for older targets or advanced control; UserDefaults for
small preferences; the Keychain for secrets (tokens, passwords — never UserDefaults); and the file
system for blobs.
UserDefaults — it's an unencrypted plist. Use the Keychain (see Security, topic 14).08 · Navigation & App Structure
What it is. An app's entry point is a struct conforming to App
with @main, composing Scenes (usually a WindowGroup). For
navigation, NavigationStack with navigationDestination replaced the old
NavigationView and enables programmatic, value-driven navigation: bind a
path array and push/pop by mutating it. TabView handles top-level sections, and
deep links map a URL onto that path.
Route values you
append to path. That's the senior framing — navigation as data.09 · Performance & Instruments
What it is. Performance work is mostly about doing less: fewer re-renders, fewer
allocations, less main-thread work. In SwiftUI that means keeping body cheap and pure (no
heavy computation, no side effects), giving views stable identity, using LazyVStack/
LazyHStack and List for long content, and letting the Observation framework
re-render only the views that read a changed property.
Measure with Instruments: Time Profiler for CPU hotspots, Allocations/Leaks for memory and retain cycles, the SwiftUI instrument for view-body counts, and Hangs for main-thread stalls. Rule one: profile before you optimize — guesses are usually wrong.
body; loading full-resolution images into small thumbnails (downsample first); retain cycles
from closures capturing self; and blocking the main actor with synchronous I/O.10 · Testing
What it is. Two unit-test frameworks ship today: the long-standing XCTest and the
newer Swift Testing (@Test functions with #expect/#require
macros, parameterized tests, and async support), introduced with Xcode 16. UI flows are covered by
XCUITest. The thing interviews probe is testability: inject dependencies behind protocols so
you can substitute fakes, and keep logic in view models rather than views.
APIClient
protocol, not URLSession, so the view model takes a mock in tests and runs with no network."
That one sentence signals you design for testability.11 · Dependencies & Swift Package Manager
What it is. Swift Package Manager (SPM) is the first-class way to add dependencies
and — just as important — to modularize your own app into local packages. A Package.swift
manifest declares targets (code) and products (what you expose). Splitting a feature into its own package
enforces boundaries, speeds incremental builds, and lets features be tested in isolation. CocoaPods and
Carthage still exist in legacy projects, but SPM is the default for new work.
12 · CI/CD & Release
What it is. A repeatable pipeline that builds, tests, signs, and ships every change. Xcode Cloud is Apple's hosted CI integrated with App Store Connect; Fastlane is the cross-tool automation standard (and runs on GitHub Actions, etc.). The part that trips everyone up is code signing: certificates identify the team, provisioning profiles tie an app id + devices + certificate together. Automatic signing handles the common case; teams often manage it explicitly (e.g. Fastlane match) for shared, reproducible credentials.
CFBundleShortVersionString) from build number (CFBundleVersion, must
increase per upload). Senior answer: PRs run unit + UI tests on CI; merges to main auto-ship a TestFlight
build; releases are promoted with a phased rollout.13 · App Store Review & Distribution
What it is. Shipping happens through App Store Connect: you upload a build, fill in metadata and screenshots, complete App Privacy (the privacy "nutrition label"), and submit for review against the App Store Review Guidelines. Beta testing goes through TestFlight. Know the common rejection reasons so you can avoid them: broken/incomplete functionality, privacy issues (missing usage-description strings, undisclosed data collection), misleading metadata, and using private APIs.
- Phased release rolls an update out to a growing % of users over ~7 days — pause if crash rates spike.
- Privacy manifests + required-reason APIs must be declared (see Security, topic 14).
- StoreKit handles in-app purchases and subscriptions; Apple requires IAP for digital goods.
14 · Security & Privacy
What it is. Store secrets in the Keychain (encrypted, hardware-backed), never in
UserDefaults. Gate sensitive flows with biometrics via the LocalAuthentication
framework (Face ID / Touch ID). Keep App Transport Security (HTTPS-only) on. Use data
protection classes so files are encrypted at rest when the device is locked. Respect privacy:
declare a privacy manifest (PrivacyInfo.xcprivacy) and required-reason API usage,
and request tracking permission via App Tracking Transparency before using the IDFA.
15 · On-Device AI & Machine Learning
What it is. Apple's ML runs on device for privacy, low latency, and offline use,
accelerated by the Neural Engine. The toolbox: Core ML (run trained models), Create ML
(train without leaving Swift), and task frameworks — Vision (images), Natural Language
(text), Speech (transcription), and Sound Analysis. Apple Intelligence pushes this
further with system-level generative features and on-device foundation models. Convert third-party models
to Core ML with coremltools, and optimize (quantize, prune) to fit memory and latency
budgets.