iOS · 30 min read

Top 100 iOS interview questions with answers (2026)

The top 100 iOS interview questions for 2026 with short answers, grouped by area: Swift, memory, concurrency, SwiftUI, UIKit, architecture, design and testing.

A hundred questions is a revision sheet, not a study plan. Use this page the week of your loop to find gaps fast: read each question, answer it in your head, then check the short answer. If yours matched, move on. If it did not, that topic goes on tomorrow’s list.

The questions come from what I hear most in iOS loops after more than 500 interviews on the hiring side, grouped into ten areas of ten. Answers are one to three sentences, which is about the length of a good first answer in a real interview before the follow-up arrives. For weak and senior answers side by side, use the top 10 iOS interview questions; for more room per answer, the top 50.

How to run a 100-question pass

Pass What you do Goal
First Read every question, answer silently, mark misses Find gaps
Second Answer only the marked ones aloud Fix wording
Third Have someone pick ten at random and push back Test under pressure

Three passes over two or three days works better than one long session. The third pass matters most, because a real interviewer never lets a first answer stand on its own.

Swift fundamentals

1. “What is type inference?”

Answer: The compiler works out a type from the value or context, so let n = 5 is an Int without annotation. I still annotate public API and complex expressions to keep compile times and intent clear.

2. “let versus var?”

Answer: let binds a constant and var a variable. For a struct, let also makes all its properties immutable; for a class, only the reference is fixed.

3. “What is an optional?”

Answer: An enum with some and none cases that forces you to handle a missing value before use.

4. “What is optional chaining?”

Answer: Calling through an optional with ?., where the whole expression returns nil if any link is nil.

5. “What does the nil-coalescing operator do?”

Answer: a ?? b unwraps a or falls back to b when a is nil.

6. “What are computed properties?”

Answer: Properties that calculate their value on each access instead of storing it. They suit derived values that are cheap to produce.

7. “What are property observers?”

Answer: willSet and didSet run code around a change to a stored property. They do not fire during the owner’s own initializer.

8. “What are generics for?”

Answer: Writing one function or type that works across many types while keeping full type safety, like Array<Element>.

9. “What is a where clause on a generic?”

Answer: A constraint that narrows which types qualify, for example requiring an associated type to be Equatable.

10. “What are key paths?”

Answer: Typed references to a property, like \User.name, that can be passed around and used to read or write that property later.

The fundamentals are quick, but hesitation on them in a phone screen colours the rest of the loop. The Swift interview questions guide goes deeper on each.

Swift advanced

11. “What is copy on write?”

Answer: A technique where copies share storage until one of them mutates, at which point the mutating copy gets its own buffer. Standard collections use it.

12. “some versus any?”

Answer: some hides one fixed concrete type with static dispatch. any is an existential box for any conforming type, with dynamic dispatch.

13. “What is a protocol with an associated type?”

Answer: A protocol where each conformer picks a type for a placeholder, like Element in Sequence. It usually needs generics or some at use sites. Since Swift 5.7 you can also write any Sequence<Int>, so the old rule that you can never use one as a type is out of date.

14. “What is a result builder?”

Answer: A type that turns a sequence of statements into one combined value. SwiftUI’s ViewBuilder is the best-known example.

15. “What are property wrappers?”

Answer: Types that wrap storage for a property with reusable logic, applied with an @ attribute, like @State or a custom @Clamped.

16. “What are macros in Swift?”

Answer: Compile-time code generators that expand into Swift source, such as @Observable and #Preview. They are type-checked and visible with “Expand Macro” in Xcode.

17. “What is typed throws?”

Answer: A Swift 6 feature that lets a function declare the exact error type it throws, so callers can handle it without casting.

18. “What is the difference between static and dynamic dispatch?”

Answer: Static dispatch picks the implementation at compile time and can be inlined. Dynamic dispatch picks it at runtime through a witness table or vtable, which enables polymorphism.

19. “Why mark a class final?”

Answer: It prevents subclassing, which states intent and lets the compiler use static dispatch.

20. “What is @autoclosure?”

Answer: It wraps an argument expression in a closure automatically, so it is only evaluated if needed, as assert and ?? do.

Advanced Swift questions test curiosity more than memory. It is fine to say you have not used a feature in production, as long as you can explain what it is for.

Memory management

21. “What does ARC do?”

Answer: It counts strong references to class instances and frees each instance when its count reaches zero.

22. “What is a strong reference?”

Answer: The default kind of reference, which keeps the target alive.

23. “What is a weak reference?”

Answer: An optional reference that does not keep the target alive and becomes nil when it is freed.

24. “What is an unowned reference?”

Answer: A non-optional reference that does not keep the target alive and traps if used after the target is gone. Unowned optionals exist too, so “non-optional” is not the whole definition.

25. “How do closures create retain cycles?”

Answer: A stored closure that captures self strongly, held by that same self, keeps both alive forever.

26. “What is a capture list?”

Answer: The [weak self] or [x] part of a closure that controls how values are captured, including copying a value at creation time.

27. “When is [weak self] unnecessary?”

Answer: When the closure is not stored beyond the call, such as map or forEach, or when a short-lived strong capture is intended.

28. “How do you confirm a screen is deallocated?”

Answer: Log in deinit in debug builds, or inspect the memory graph debugger after leaving the screen.

29. “What is autoreleasepool used for today?”

Answer: Limiting peak memory in tight loops that create many temporary Objective-C objects, like image processing.

30. “How do you respond to memory warnings?”

Answer: Drop caches that can be rebuilt, such as decoded images, and let NSCache evict under pressure. NSCache is pressure-aware, not a strict LRU cache.

Memory questions are cheap for interviewers to ask and expensive for candidates to miss. Practise explaining a cycle out loud with a concrete example from your own code.

Concurrency

31. “What is async/await?”

Answer: Syntax for asynchronous functions that suspend without blocking a thread, reading top to bottom like synchronous code.

32. “What is a Task?”

Answer: A unit of asynchronous work. Task { } inherits actor context and priority; Task.detached does not.

33. “What is an actor?”

Answer: A reference type that serialises access to its mutable state, removing data races on that state. It does not make multi-step logic atomic across an await.

34. “What is @MainActor?”

Answer: The global actor tied to the main thread. Code isolated to it runs there, which is required for UI work.

35. “What is reentrancy?”

Answer: Other callers getting a turn on an actor during a suspension inside one of its methods. Anything you checked earlier may no longer hold once the await returns.

36. “What is Sendable?”

Answer: A marker for types that are safe to pass across isolation domains, checked by the compiler.

37. “What is async let?”

Answer: A way to start a child task that runs concurrently and await its result later in the same scope.

38. “What is a task group?”

Answer: A structured way to run a dynamic number of child tasks and collect their results.

39. “How is cancellation handled?”

Answer: Cooperatively: cancellation sets a flag, and code checks it or calls APIs that throw CancellationError. Cancelling does not undo a request the server may already have accepted.

40. “What is AsyncSequence?”

Answer: A sequence whose elements arrive over time, consumed with for await. AsyncStream creates one from callbacks; decide how it buffers and how the source is cleaned up when the stream ends.

Senior loops probe this area in follow-ups. The senior iOS interview questions guide shows how interviewers follow up on these.

SwiftUI

41. “Why are SwiftUI views structs?”

Answer: They are lightweight descriptions of UI, cheap to create and compare. SwiftUI keeps the real state and rendering elsewhere.

42. “What does @State do?”

Answer: It gives a view storage that SwiftUI owns and preserves across body evaluations for as long as the view’s identity lasts.

43. “What does @Binding do?”

Answer: It gives a child two-way access to a value that some other view owns.

44. “What is @Observable?”

Answer: A macro that makes a class observable with per-property tracking, so a view is not updated by properties it never read. Parent, identity and environment changes can still invalidate it. It needs iOS 17 or later.

45. “What is @Environment for?”

Answer: Reading values injected higher up the view tree, such as colour scheme, dismiss actions or app services.

46. “What is @Bindable?”

Answer: A wrapper that creates bindings to properties of an @Observable object, for use with controls like TextField.

47. “What causes unnecessary body evaluations?”

Answer: Reading more state than needed, unstable identity, and passing large models where a small value would do.

48. “How does ForEach identify items?”

Answer: By an id key path or Identifiable conformance, which must be stable across updates.

49. “What does .task(id:) do?”

Answer: Runs async work tied to the view’s lifetime, cancelling and restarting it whenever the id value changes.

50. “How do previews help?”

Answer: #Preview renders views in Xcode with sample data, which speeds iteration and encourages views that take their dependencies as inputs.

SwiftUI questions reward a clear story about ownership and identity. The SwiftUI interview questions guide covers each in depth.

UIKit

51. “What is the responder chain?”

Answer: The path events and actions travel through views, controllers and the app until an object handles them.

52. “viewDidLoad versus viewWillAppear?”

Answer: viewDidLoad runs once after the view loads. viewWillAppear runs before every appearance.

53. “What does prepareForReuse do?”

Answer: It runs before a cell is reused, the place to reset state and cancel pending work.

54. “What is a diffable data source?”

Answer: A data source that applies snapshots of identifiers and animates the differences, avoiding batch update crashes.

55. “What is compositional layout?”

Answer: A collection view layout built from items, groups and sections, which handles complex grids without subclassing.

56. “bounds versus frame?”

Answer: frame is a view’s rectangle in its superview’s coordinates. bounds is its own coordinate space.

57. “What is intrinsic content size?”

Answer: The natural size a view reports from its content, like a label’s text, which Auto Layout uses without explicit width and height.

58. “What are content hugging and compression resistance?”

Answer: Priorities that decide which view grows or shrinks first when there is extra or too little space.

59. “What is the delegate pattern?”

Answer: One object hands decisions or events to another through a protocol, usually held weakly to avoid a cycle.

60. “How do you host SwiftUI inside UIKit?”

Answer: With UIHostingController, added as a child view controller, or with UIHostingConfiguration for cells.

These show up whenever the codebase is older than a few years, which is most codebases. See the UIKit interview questions guide for more.

Architecture

61. “What is MVC’s main problem on iOS?”

Answer: View controllers collect networking, state and layout, growing too large to test.

62. “What does MVVM add?”

Answer: A view model that holds state and presentation logic, so the view only renders and tests can skip UI.

63. “What is TCA?”

Answer: The Composable Architecture, a library with a single state, actions, reducers and managed effects, strong on testability.

64. “What is VIPER?”

Answer: A pattern splitting a screen into view, interactor, presenter, entity and router, suited to large UIKit teams at the cost of boilerplate.

65. “What is the coordinator pattern?”

Answer: An object that owns navigation flow, so view controllers do not push each other directly.

66. “What is dependency injection?”

Answer: Passing dependencies in rather than creating them inside, which makes code testable and coupling visible.

67. “Why avoid singletons?”

Answer: They hide dependencies and share mutable state across tests. When one is needed, I still inject it.

68. “What is a repository layer?”

Answer: A type that hides where data comes from, network or cache, behind one interface for the rest of the app.

69. “How do Swift packages help architecture?”

Answer: They enforce module boundaries with access control and speed up incremental builds.

70. “What is unidirectional data flow?”

Answer: State flows down into views and user actions flow up to one owner that changes state, which makes changes easy to trace.

Architecture questions are scored on reasons. The iOS architecture interview questions guide shows how to defend a choice.

Networking and data

71. “How do you structure a network layer?”

Answer: An API client that builds requests from typed endpoints, decodes with Codable, and maps errors into a small domain error type.

72. “What is Codable?”

Answer: A pair of protocols, Encodable and Decodable, that convert types to and from formats like JSON.

73. “How do you handle a JSON key that does not match your property?”

Answer: Use CodingKeys, or a decoder key strategy like convertFromSnakeCase.

74. “How do you retry failed requests?”

Answer: Only for safe or idempotent requests, with exponential backoff and a cap. A timeout on a POST may have succeeded, so use an idempotency key. For a 429, wait as long as the server asks.

75. “Core Data or SwiftData?”

Answer: SwiftData for new SwiftUI-first apps that fit its model, Core Data for mature apps or features SwiftData does not yet cover.

76. “Where do you store secrets like tokens?”

Answer: In the Keychain, never in UserDefaults or files.

77. “What is certificate pinning?”

Answer: Comparing the certificate or public key the server presents with a value shipped in the app, which blocks some man-in-the-middle attacks but needs a rotation plan. In my view most apps do not need it; if you do pin, pin to a public key or use NSPinnedDomains in Info.plist, and plan the rotation.

78. “How does URLCache help?”

Answer: It stores HTTP responses and respects cache headers, giving cheap caching for many GET requests.

79. “How do background downloads work?”

Answer: A background URLSession continues transfers while the app is suspended and relaunches the app to deliver results. A user force-quit stops it, and the file in the delegate callback is temporary, so move it.

80. “How do you handle pagination?”

Answer: Prefer cursor-based paging, load the next page near the end of the list, and track loading and end states.

Networking answers improve when you mention failure: timeouts, retries and offline. That is where interviewers push.

System design

81. “How do you start an iOS system design answer?”

Answer: With requirements and scale: users, offline needs, real time or not, and what matters most.

82. “Design an image cache.”

Answer: Memory and disk layers, deduplicated in-flight loads, cancellation, and downsampling at decode time off the main thread.

83. “Design a news feed.”

Answer: Cursor paging, a local store for instant launch, prefetching and clear loading states.

84. “Design offline-first sync.”

Answer: Local store as source of truth, a durable outbox, idempotent retries and a stated conflict rule that never silently loses user text.

85. “Design chat.”

Answer: WebSocket in the foreground, push in the background, local persistence and resync by last seen id.

86. “How do you design for push notifications?”

Answer: Register for a token, send it to the server, handle taps with deep links, and use a notification service extension for rich content.

87. “How would you add analytics?”

Answer: A small event API behind a protocol, batched uploads, and a schema so events stay consistent.

88. “How do you use feature flags?”

Answer: Remote config with local defaults, used for gradual rollout and as a kill switch.

89. “How do you think about app launch time?”

Answer: Measure a cold launch in a Release build on a real device, with the App Launch template in Instruments and field data from MetricKit or the Xcode Organizer, then defer non-critical work past the first frame.

90. “How do you design for accessibility?”

Answer: Support Dynamic Type, VoiceOver labels and sufficient contrast from the start, and test with the Accessibility Inspector.

The iOS system design interview guide has full walkthroughs of the design questions above.

Testing, tooling and behavioural

91. “What is Swift Testing?”

Answer: Apple’s newer test framework with @Test functions, #expect assertions and parameterized tests.

92. “How do you test async code?”

Answer: Write async tests that await results, with injected clocks and fakes instead of sleeps.

93. “What are snapshot tests for?”

Answer: Catching visual regressions by comparing rendered views against reference images.

94. “What is Instruments used for?”

Answer: Profiling CPU time, memory, leaks, hangs, energy and SwiftUI updates, on a real device and in a Release build, since debug builds mislead.

95. “How do you investigate a hang?”

Answer: Use the hangs report or Time Profiler to find work blocking the main thread, then move it off or make it smaller.

96. “What does CI do for an iOS team?”

Answer: Builds and tests every change, and automates signing and delivery so releases are repeatable.

97. “Tell me about a hard bug.”

Answer: Impact, how you narrowed it down, the fix, and what you changed so the same bug cannot come back.

98. “Tell me about a disagreement.”

Answer: Both positions stated fairly, how you tested yours, the decision, and how you supported it.

99. “How do you mentor others?”

Answer: Pair on real work, give specific feedback, and help people take on problems slightly beyond their comfort.

100. “Why do you want this role?”

Answer: Tie something specific about the product or team to work you have done and want to do more of.

Behavioural answers at the end of a list are easy to skip, and that is a mistake. At senior level they often decide the outcome.

What changed in 2024 to 2026

  • Swift 6.2 shipped on 15 September 2025 with what the Swift team calls approachable concurrency (Swift.org, Swift 6.2 released).
  • A module can opt in to main actor isolation by default, so its code runs on the main actor without @MainActor written on every type. Do not guess a module’s setting from the compiler version. Check the language mode and the default isolation in the build settings.
  • The new @concurrent attribute marks a function that should run concurrently, which makes it visible in the code when work leaves the actor.

Sources

Where a one-line answer here is too short to be safe, these docs are the place to confirm the detail before you say it in an interview.

What to do next

A hundred short answers will not carry you through a loop by themselves. Use them to find what you do not know, then spend real time there.

Free guide: the Phoenix Method