Architecture
Patterns, modularization, dependency inversion, and the problems that only surface on large teams.
- Why did you choose this architecture? A strong answer names the actual constraints that drove the choice, what alternative was considered and rejected, and what you would do differently now.
- MVVM vs MVC vs TCA vs Clean Architecture: pros and cons MVC is fast but overloads the view controller, MVVM balances testability and ceremony, and TCA or Clean Architecture demand steep learning for real payoff.
- What are coordinators? Coordinators are plain objects that own navigation decisions, decoupling screens from each other and making flow logic testable outside a view controller.
- What architectural problems appear only at scale? Small apps mostly need code written correctly and fast, while large ones face coordination cost across teams, build times, and migrations.
- How do you prevent massive ViewModels? Massive ViewModels come from having nowhere else to put logic, so the fix pushes business rules into services and navigation into coordinators.
- How do you structure modules in large iOS apps? Large apps combine horizontal layers like Core and Networking with vertical feature modules that depend downward on those layers but never on each other.
- What is Clean Architecture and how have you applied it? Clean Architecture's dependency rule keeps source code pointing inward toward business logic, with outer layers implementing protocols inner layers define.
- How do you isolate features in multi-team apps? Multi-team isolation mirrors module boundaries to team ownership, shares protocol-defined contracts, and gates rollout with feature flags.
- How do you share business logic safely? Safe sharing means exposing a narrow, protocol-defined contract instead of a concrete implementation, tested independently and versioned like a public API.
- How do you avoid tight coupling? Tight coupling comes from depending on concrete types, singletons, or wide interfaces, so inject the narrowest protocol that covers what's needed.
- What is dependency inversion in iOS? Dependency injection just passes a dependency in, while inversion requires both sides to depend on an abstraction the high-level code effectively owns.
- How do you design a production networking layer? A production networking layer hides URLSession behind an HTTPClient protocol, models requests declaratively, and serializes token refresh through an actor.
- How do you manage multiple environments? Xcode configurations and schemes with distinct bundle identifiers separate Debug, Staging, and Production, centralized into one AppEnvironment type.
- How do you design app-wide error handling? Each layer should define errors meaningful to itself, translate deliberately at its boundary, and funnel presentation through one error-to-UI mapping.