Skip to content
All guides

iOS interview prep book: what a good one covers and how to test it

By Mike Salari. Staff mobile engineer · 500+ technical interviews from the hiring side.

If you are choosing an iOS interview prep book, this page gives you a checklist for what the book must cover and how to use it so your answers change. Then it gives you ten sample questions, with what the interviewer scores, so you can test any book against them, mine included.

Who this is for

Mid-level, senior and staff iOS engineers with a loop two to eight weeks away. If you are still learning Swift, start with The Swift Programming Language on swift.org. A prep book helps most when you already ship apps and need to explain your choices under pressure.

What a good iOS prep book must cover

A book gives you structure and rehearsal prompts. It cannot replace Apple's documentation, and it cannot tell you a company's loop. Check these before you buy.

  • A dated technical baseline. The book should say which Swift and iOS SDK it was checked against, and when. Concurrency and SwiftUI move every year.
  • Answers by level. A correct answer and a hire are different things. Look for the typical answer next to the senior one, so you can hear the gap.
  • Follow-up chains. The first answer is rarely what decides the question. The push after it does. A book without follow-ups prepares you for half the conversation.
  • Red flags. The lines that cost you: "structs are thread-safe", "Swift 6 guarantees data-race safety", "I would just rewrite it".
  • Failure modes. Every design answer should say what breaks and what the user sees.
  • Code that compiles. Short snippets, checked against the stated baseline.
  • Clear sourcing. "Apple documents X" with a link, and "I prefer Y" marked as opinion.

How to use a prep book

  1. Map the job post to chapters. SwiftUI heavy, UIKit legacy, performance, or platform work.
  2. Ask the recruiter what each round scores, and whether you code in Xcode or a shared editor.
  3. Answer out loud before you read the model answer. Record it. Compare structure, not wording.
  4. Pair each chapter with one real story from your own work.
  5. Finish with timed mocks. Content without pace still fails a 45-minute round.

The questions

Ten sample questions from areas a serious book must cover. Four include code.

1. "The user starts a large video upload and switches apps. Later the system terminates your app. Does the upload finish?"

What is scored: knowing what survives your process, and what the user can still break.

A strong answer covers:

  • Context: tasks on a default session die with the process.
  • Decision: a background session. Apple's docs say it hands transfers to the system, which runs them in a separate process, so in iOS they can continue when the app is suspended or terminated.
  • Relaunch: after a normal termination by the system, create the session again with the same identifier to get the status of transfers that were in flight.
  • Failure mode: the user force-quits from the app switcher. The system then cancels the session's background transfers and does not relaunch the app until the user opens it.
  • Write the payload to a file first and upload from that file, so nothing depends on memory in a process that may be gone. Give the server an upload ID, so a retry does not create a second video.
Swift
let config = URLSessionConfiguration.background(withIdentifier: "com.example.app.uploads")
config.sessionSendsLaunchEvents = true
let session = URLSession(configuration: config, delegate: uploadDelegate, delegateQueue: nil)

var request = URLRequest(url: uploadURL)
request.httpMethod = "PUT"
let task = session.uploadTask(with: request, fromFile: videoFileURL)
task.resume()

Follow-ups:

  • Apple encourages isDiscretionary for large transfers. The user is waiting for this one. Do you set it?
  • The upload finished while the app was not running. How does the screen know when the user comes back?

Weak answer: "I start a background task so it keeps running." That buys a short extension, not an upload that survives termination.

2. "A feed of photos uses too much memory. Walk me through the image pipeline."

What is scored: decode cost, cache policy and cancellation.

A strong answer covers:

  • Memory then disk then network, with in-flight requests for the same URL joined into one.
  • Downsample at decode to the display size, off the main thread. A full-size photo decoded for a thumbnail cell wastes memory.
  • NSCache is pressure-aware and thread-safe. Apple describes "various auto-eviction policies", which is not a strict LRU promise. Set a cost limit in bytes.
  • Cancel the load when the cell is reused, and drop a response that arrives for an old URL.
Swift
import ImageIO
import UIKit

func downsample(at url: URL, to pointSize: CGSize, scale: CGFloat) -> UIImage? {
    let sourceOptions = [kCGImageSourceShouldCache: false] as CFDictionary
    guard let source = CGImageSourceCreateWithURL(url as CFURL, sourceOptions) else { return nil }
    let maxPixels = max(pointSize.width, pointSize.height) * scale
    let options = [
        kCGImageSourceCreateThumbnailFromImageAlways: true,
        kCGImageSourceShouldCacheImmediately: true,
        kCGImageSourceCreateThumbnailWithTransform: true,
        kCGImageSourceThumbnailMaxPixelSize: maxPixels
    ] as CFDictionary
    guard let image = CGImageSourceCreateThumbnailAtIndex(source, 0, options) else { return nil }
    return UIImage(cgImage: image)
}

Follow-ups:

  • Now the user scrolls fast through 2,000 rows. What gets cancelled?
  • Now the same image appears at two sizes. One cache entry or two?

Weak answer: "I'd add an image library." Maybe, but there is no diagnosis and no policy.

3. "Where does this data live: UserDefaults, Keychain, files or a database?"

What is scored: matching the store to shape, size and sensitivity.

A strong answer covers:

  • UserDefaults for small preferences only. Never tokens, never structured records.
  • Keychain for secrets, with the accessibility class chosen on purpose. Apple recommends kSecAttrAccessibleAfterFirstUnlock for items background work needs.
  • Files with data protection for large blobs.
  • A database for anything you query, relate or page.

Follow-ups:

  • A background refresh runs before the user has unlocked the phone after a restart. Can it read the token?
  • Now the user restores to a new device from an encrypted backup. Should the token come with them?

Weak answer: "UserDefaults is fine, it's only a token." It fails the security part of the round in one line.

4. "How do you ship a schema change without losing user data?"

What is scored: migration risk taken seriously.

A strong answer covers:

  • Context: a failed migration on launch can mean a crash loop or a wiped store.
  • Decision: a lightweight migration where the change allows it; a staged or custom one where it does not.
  • Evidence: a test that opens a fixture database saved from the previous version and migrates it.
  • Failure path: what the app does if migration fails. Retry, keep the old store, and report.

Follow-ups:

  • The user skipped three app versions. Which migrations run?
  • The fixture is from a clean install. What real data shapes does it miss?

Weak answer: "Delete the store and refetch from the server." Acceptable only for a pure cache, and you must say so.

5. "Your async test passes locally and fails in CI. Why?"

What is scored: deterministic testing.

A strong answer covers:

  • The sleep is the flakiness. A test that waits for real time races the machine it runs on.
  • Inject a clock, so a debounce or timeout is an exact step in the test.
  • Test what breaks: cancellation, and a stale response that arrives after a newer one.
  • For races, check invariants and run Thread Sanitizer instead of trusting one final count.
Swift
struct SearchDebouncer<C: Clock> where C.Duration == Duration {
    let clock: C
    let delay: Duration = .milliseconds(300)

    func waitForPause() async throws {
        try await clock.sleep(for: delay)
    }
}

// App: SearchDebouncer(clock: ContinuousClock())
// Tests: a clock the test advances by hand

Follow-ups:

  • Now the code under test starts an unstructured Task. How does the test know it finished?
  • Now two requests resolve out of order. Write the assertion.

Weak answer: "I add a sleep so the work finishes before I assert." That is how the flaky test was born.

6. "Would you move this test suite to Swift Testing?"

What is scored: migrating without a big-bang rewrite.

A strong answer covers:

  • Swift Testing uses @Test and #expect, supports parameterized tests, and runs tests in parallel by default.
  • It runs side by side with XCTest, so migration is incremental.
  • New tests in Swift Testing, old ones moved when touched.
  • Failure mode: tests that relied on running in order break when run in parallel. That is shared state the suite was hiding.
Swift
import Testing

@MainActor
@Test(arguments: ["", " ", "\n"])
func blankQueryShowsNoResults(query: String) async {
    let model = SearchModel(service: StubSearchService())
    await model.search(query)
    #expect(model.results.isEmpty)
}

Follow-ups:

  • Now three tests fail only in parallel. Where do you look?
  • Which tests would you leave in XCTest for now?

Weak answer: "Rewrite every test this sprint." Cost now, benefit unclear.

7. "Your view model is 1,500 lines. What went wrong?"

What is scored: responsibility, not pattern names.

A strong answer covers:

  • The MVVM trap: logic moved out of the view controller into one view model. Moving the tangle does not untangle it.
  • Split by responsibility: data access behind a repository protocol, pure decisions in small types you can test without a screen.
  • Dependencies point inward: the view model owns the protocol, the network or database conforms to it.
  • Evidence: a test that drives the view model with a stub repository, no network.

Follow-ups:

  • Now the screen has five independent sections. One view model or five?
  • Now a second screen needs the same logic. Where does it go?

Weak answer: "We should switch to a different architecture." A new name on the same tangle.

8. "Combine or async/await for a new feature?"

What is scored: choosing by the shape of the data.

A strong answer covers:

  • async/await for one-shot work: fetch, decode, save. It reads top to bottom and cancels with the task.
  • A stream of values over time, with operators like debounce and combineLatest, is where Combine still fits, or AsyncSequence if the team prefers it.
  • Bridging: keep one style per layer, convert at the boundary.
  • Failure mode: a Combine chain with a stored AnyCancellable nobody owns, so the subscription outlives the screen.

Follow-ups:

  • Now the team is new to Combine. Does that change your answer?
  • Now the stream must stop when the view disappears. Show where.

Weak answer: "Combine is outdated, use async/await everywhere." It is a slogan with no official source, and it skips the shape of the data.

9. "Walk me through push notifications, from permission to tap."

What is scored: the full path, including the unhappy ones.

A strong answer covers:

  • Ask for permission when the user understands why, not on first launch.
  • Register, send the device token to your server, and handle token changes.
  • Handle foreground presentation, and the tap that routes to a screen.
  • Failure modes: permission denied, a stale token on the server, a tap that arrives on a cold start before the app is ready.

Follow-ups:

  • Now the user denied permission last month. How do you ask again?
  • Now the tap arrives while the user is logged out. Where is the destination kept?

Weak answer: only the registration code. No permission strategy, no routing.

10. "You add an analytics SDK. App Store Connect rejects the build over its privacy manifest. Whose problem is it?"

What is scored: treating third-party code as part of your release.

A strong answer covers:

  • Context: some APIs can be misused to fingerprint a device. Apple calls them required reason APIs. Since 1 May 2024, App Store Connect does not accept apps that use them without describing the reason in a privacy manifest.
  • Each executable or dynamic library that uses one needs its own privacy manifest. An SDK cannot rely on the app's manifest to cover it, and the app cannot cover the SDK's use.
  • Decision: ask the vendor for a version with a correct manifest, or remove the SDK. You ship the binary, so the release risk is yours either way.
  • Declared reasons limit what you may do with the data. Using it for tracking is not allowed whatever the manifest says.
  • Evidence: a dependency check in CI that lists every SDK, its version and whether its bundle carries a manifest.

Follow-ups:

  • The vendor says a fix is two months away and the release is Friday. What are your options?
  • Your own code reads one of these APIs for a reason that is not on Apple's list. What do you do?

Weak answer: "The SDK vendor handles that." The rejection lands on your build, and the user never sees whose code it was.

What changed in 2024 to 2026

  • Swift 6 (17 September 2024) added an opt-in language mode that reports possible data races as compiler errors, plus typed throws and Swift Testing. (Swift.org)
  • Swift 6.2 (15 September 2025) added an option for default main actor isolation and the @concurrent attribute. (Swift.org)
  • From 1 May 2024, App Store Connect does not accept apps that use required reason APIs without declaring the reason in a privacy manifest. (Apple Developer)
  • Swift Testing runs in parallel by default and side by side with XCTest. (Apple Developer)
  • With @Observable (iOS 17 and later), SwiftUI updates a view only when a property its body reads changes, and you can migrate one model type at a time. (Apple Developer)

A book that does not mention these is older than its cover says. Check the edition date.

How the rounds run

Formats vary by company and level. Some loops are mostly general coding; others have an iOS round, mobile system design and a project deep dive. No book can tell you which. StaffEng's guide says it is always reasonable to ask the recruiting team about the process, and that the first thing to learn is the interview formats and what each evaluates.

If you want the questions themselves rather than a book checklist, read Swift interview questions and the iOS interview checklist.

Sources