iOS architecture interview questions: how each answer is scored
By Mike Salari. Staff mobile engineer · 500+ technical interviews from the hiring side.
This page is for iOS engineers going into a senior or staff architecture round. You get ten questions about authority, lifetime, abstraction cost, decisions and scale, with what gets scored, what a strong answer covers, the follow-ups that change the conditions, and the weak answers. Pattern names (MVVM, MVI, TCA, VIPER) are not the subject here. This page covers what comes after the pattern.
Who this is for
Senior and staff iOS engineers, and mobile leads, who get an "architect this feature" or "walk me through your app" round. You know the patterns. The round checks whether you can say who owns each fact, how long each piece of work lives, and what your design makes cheap or expensive.
One idea runs through the whole page. In Controlled Change, the question behind every architecture is: "How cheaply and safely can this product absorb the next important change?" Answers that start there score well. Answers that start with folder names do not.
In an architecture round I push back on purpose with "isn't that overkill here?" A senior defends the design. A staff candidate moves: drops a layer, keeps the seam that matters, and says why.
Ten iOS architecture questions on MVVM, TCA, navigation, dependency injection and SPM modules are in the iOS architecture guide on Mobile Interview Room.
The questions
1. "What change does your architecture make cheap, and what does it make expensive?"
What is scored: whether you can price your own design instead of praising it.
A strong answer covers:
- Context: name a real change pressure, such as a new payment provider, an offline requirement, or a third team joining.
- Decision: the boundary you placed for that pressure, and the change it now contains.
- Alternative: the simpler design you would keep if that pressure were absent.
- Failure mode: every move buys one property by spending another. A new module isolates ownership and can slow the build.
- Evidence: what you measured after, such as files touched per change or build time.
Follow-ups:
- The payment SDK must be removed within one quarter. Which modules move?
- The team doubles. Which part of the design breaks first?
- The pressure that justified this boundary is gone. Do you remove it?
Weak answer: "It is clean and follows SOLID." Clean for what change? Controlled Change has a phrase for a neat app that cannot be migrated, observed or released safely: it is "well illustrated."
2. "On this screen, who is authoritative for each piece of data?"
What is scored: authority per fact, with the repository as the place that encodes it.
A strong answer covers:
- Authority is per fact. The server owns confirmed bookings and payments. The device owns an unsent draft until the user submits it.
- The UI reads one local projection. Network responses update the store through one ingestion path, and the UI follows the store.
- The local store is the source the UI reads, and the server stays the authority for anything it must validate.
- The repository exposes product meaning, so callers can see uncertainty:
// Generic: hides who decides
protocol Repository {
associatedtype Item
func get(id: String) async throws -> Item
func save(_ item: Item) async throws
}
// Semantic: shows intent, pending state and reconciliation
protocol BookingData {
func observe(_ id: String) -> AsyncStream<BookingSnapshot>
func requestCancellation(of id: String) async throws -> PendingOperation
}- Failure mode: the network result goes straight to the UI while a database observer delivers a second value a moment later.
Follow-ups:
- The user switches account while a sync is running. What can the new account see?
- Which facts here could the device own outright, and which never?
Weak answer: "The repository is the single source of truth." Controlled Change lists this as a common weak answer: treating the repository as magic without saying which value wins when sources disagree.
3. "Would you put a protocol in front of this? Defend it."
What is scored: whether abstraction has a reason and a price.
A strong answer covers:
- The four-question boundary test from Controlled Change: volatility (do the two sides change for different reasons?), consequence (what breaks if change leaks?), multiplicity (are there real second implementations, including tests?), coordination (do different teams own the sides?).
- Concrete first, seam second, abstraction third.
- Alternative: keep the type concrete and leave a seam until a second real demand appears.
- Failure mode: a protocol for every type. Navigation, mapping and test doubles grow, and the people who can change the code safely get fewer.
Follow-ups:
- Two features sort dated items the same way. Do you share the code?
- The type wraps a payment SDK. Does your answer change?
Weak answer: "We might swap it out one day." Controlled Change says "we might replace this someday" is weak multiplicity. Name the second consumer or keep it concrete.
4. "Where are your objects built, and how does a test swap one?"
What is scored: a visible composition root and honest test seams.
A strong answer covers:
- One place near app start, or one per feature, that builds concrete types and passes them in.
- Initializer injection for what a type cannot work without.
- SwiftUI environment for values many views read; plain parameters for the rest.
- Failure mode: a container used as a service locator, so any type can pull anything and dependencies are hidden. Controlled Change names this as a common abstraction failure.
- Evidence: a test that builds the feature with fakes in a few lines.
Follow-ups:
- Replace the clock for one feature only. How?
- The analytics SDK can only be initialised once. Where does that fact live?
Weak answer: "Singletons are fine, we mock them." Shared global state across tests is the opposite of a seam.
5. "How long is this piece of work allowed to live?"
What is scored: lifetime as a design decision.
A strong answer covers:
- Name the lifetime tier: view, feature, process, device or account.
- Screen-bound loading belongs to the view. SwiftUI's
.taskmodifier starts work before the view appears and can cancel it after the view disappears, per Apple's docs. - An upload that must finish belongs to something that outlives the screen, with its own owner and cancel rule.
- Failure mode: Controlled Change says many concurrency bugs are lifetime mistakes disguised as threading mistakes. A
Task { }nobody stores and nobody cancels is the usual example.
Follow-ups:
- The user logs out mid-upload. Who cancels it, and what is deleted?
- The app is killed. Which work must resume on next launch?
Weak answer: "It runs on a background thread." That says where, never how long or who stops it.
6. "How does the screen show saved data and an action that has not reached the server yet?"
What is scored: a declared precedence between durable data and local intent.
A strong answer covers:
- What the UI shows is saved data plus pending local intent plus short-lived presentation state, and the order of precedence is written down.
- The pending overlay is removed when the server confirms.
- Write commands carry the minimal intent, such as a rename with an expected version, instead of resaving a whole stale object.
struct Itinerary { let title: String }
struct ItineraryScreenState {
let title: String
let isSyncing: Bool
}
func screenState(saved: Itinerary, pendingTitle: String?) -> ItineraryScreenState {
ItineraryScreenState(
title: pendingTitle ?? saved.title,
isSyncing: pendingTitle != nil
)
}- Failure mode: the pending value is written into the saved store, so a failed request leaves a title the server never accepted.
Follow-ups:
- The server rejects the rename. What does the user see?
- The same itinerary changes on another device while the rename is pending. Then what?
Weak answer: "We update the UI optimistically." With no rule for removal or rollback, optimistic becomes wrong.
7. "Is freshness part of your model?"
What is scored: whether stale data is visible to the code.
A strong answer covers:
- A cached value carries when it was fetched and how long it stays valid.
- Product policy decides what stale data may do. Controlled Change puts it simply: showing an old title may be harmless; confirming an old price is not.
- Actions that move money or commit stock revalidate first.
struct Observed<Value> {
let value: Value
let fetchedAt: Date
let maxAge: TimeInterval
func isFresh(at now: Date = .now) -> Bool {
now.timeIntervalSince(fetchedAt) < maxAge
}
}- Failure mode: one array of items, with no way to tell confirmed data from a cache shown during refresh.
Follow-ups:
- The app was offline for three days. What may the user still act on?
- Who decides the
maxAgefor each type, engineering or product?
Weak answer: "We cache for five minutes." One number for every fact ignores consequence.
8. "Write the decision record for this choice. What would reopen it?"
What is scored: reasoning that survives the author leaving.
A strong answer covers:
- Context with dates and evidence, the decision, real alternatives, trade-offs, scope, owner, and revisit triggers.
- Classes of decision by reversibility: view-local state needs code review only; a persisted schema needs a migration plan; a public SDK needs broad review and an exit plan.
- Revisit triggers based on facts, such as build time over budget for four weeks, or three teams needing the same capability. Time alone is a weak trigger.
- Failure mode: a record written after the fact to give a decision legitimacy, with no rejected options.
Follow-ups:
- The trigger fires. Do you edit the old record or write a new one?
- Which of your past decisions was the most expensive to reverse?
Weak answer: "We discussed it in Slack." Nobody can rebuild the reasoning, so the debate repeats.
9. "Pick an abstraction in your app you would delete. How do you know it is safe?"
What is scored: willingness to remove, with archaeology before cleanup.
A strong answer covers:
- Sort abstractions as protective, enabling, speculative or historical. Remove speculative wrappers first.
- Before deleting, check commit history, incidents, old backend contracts and platform limits. The odd mapper may protect a client version still in use.
- Measure the effect: build time and how many modules a typical change touches.
- Failure mode: a "simplification" that brings back a bug the old layer was preventing.
Follow-ups:
- The original author has left. How do you find out why it exists?
- Removing it touches forty files. How do you ship that safely?
Weak answer: "I would rewrite it cleanly." Deleting without archaeology repeats old incidents.
10. "Fifty engineers now work on this app. What changes in your design?"
What is scored: the staff extension: ownership, module graph and reversibility.
A strong answer covers:
- Which capabilities are shared platform, and which stay with feature teams.
- The module graph, with fan-in, fan-out and change coupling as the numbers you watch. A shared module that everything imports and that changes with every feature is a bottleneck.
- Fitness checks that protect the design, such as forbidden dependency directions in CI.
- How old clients are phased out, and which decisions stay reversible.
Follow-ups:
- Two teams need the same domain rule. Shared module or duplication?
- Build time doubles in six months. Where do you look first?
Weak answer: "More modules." Without ownership and measurement, more modules mean more configuration and the same coupling.
For the cross-platform version of these ideas (sync, conflicts, API changes, migration), see mobile app architecture interview questions. For state, identity and Observation in SwiftUI, see SwiftUI interview questions. For the wider senior loop, see senior iOS interview questions.
What changed in 2024 to 2026
- Swift 6 (17 September 2024) added an opt-in language mode that reports potential data races as compiler errors. Lifetime and isolation now show up at build time. (Announcing Swift 6)
- Swift 6.2 (15 September 2025) added an option to run code on the main actor by default, which the post suggests for UI code, and the
@concurrentattribute for code that should run concurrently. (Swift 6.2 Released) - Observation can be adopted one model at a time. Apple's migration guide says an app can mix
ObservableandObservableObjecttypes, and that@StateObjectand@EnvironmentObjectstill support@Observabletypes during the move. It needs iOS 17 or later. (Apple: Migrating to the Observable macro) - SwiftData, as documented in 2026, combines Core Data's persistence technology with Swift concurrency, and needs iOS 17 or later. Apple also describes it as usable for a light cache with limited offline support. Core Data remains available. (Apple: SwiftData)
State your OS floor and Swift language mode before leaning on any of these.
How the rounds run
Formats vary by company and level. Some loops have a mobile architecture round, some fold it into general system design, and some staff loops add a deep dive into past work. StaffEng's guide warns that a staff loop may look like a senior loop, or a manager loop with a programming question added, and calls it reasonable to ask what each interview evaluates.
Ask the recruiter three things: will you design something new, walk through your own app, or review a design; is it a whiteboard or a shared doc; and what does the round score. Then, in the room, follow the order Controlled Change uses for system design: requirements, ranked characteristics, one critical journey, state and authority, architecture and contracts, failure and scale, trade-offs and evolution.
Sources
- Announcing Swift 6, swift.org, 17 September 2024
- Swift 6.2 Released, swift.org, 15 September 2025
- Migrating from the Observable Object protocol to the Observable macro, developer.apple.com, accessed 21 October 2026
- SwiftData, developer.apple.com, accessed 21 October 2026
- task(id:name:priority:file:line:_:), developer.apple.com, accessed 21 October 2026
- Interviewing for Staff-plus roles, StaffEng, accessed 21 October 2026