3–4 weeks
iOS 75
This is a short list of the 75 most important iOS interview questions. It covers Swift, concurrency, UIKit, SwiftUI, algorithms, UI coding and system design. Use it if you want the best results for your time.
Swift fundamentals
0/7 doneStructs are value types and get copied. Classes are reference types and are shared.
QuizEasy3 minsSwiftValue semantics means each copy is independent; copy-on-write makes copies cheap by sharing storage until someone mutates it.
QuizMedium3 minsSwiftPerformanceAn optional either holds a value or nil; unwrap it with if let, guard let, ?? or optional chaining instead of force unwrapping.
QuizEasy2 minsSwiftAssociated values let each enum case carry its own extra data, which is great for modeling states where only valid combinations are possible.
QuizEasy2 minsSwift- What is an escaping closure in Swift?Asked often
An escaping closure can be called after the function that received it returns, so it must be marked @escaping and you must think about what it captures.
QuizEasy2 minsSwiftMemory & ARC - What is a capture list in a Swift closure?Asked often
A capture list, like [weak self] or [count], controls how a closure captures values, either by making references weak or by copying a value at creation time.
QuizMedium3 minsSwiftMemory & ARC - How does error handling work in Swift?Asked often
Functions mark failure with throws, callers handle it with do/catch, try? or try!, and Swift 6 adds typed throws for a fixed error type.
QuizEasy2 minsSwift
Protocols and generics
0/4 doneProtocol-oriented programming means building behavior from small protocols with default implementations, instead of deep class inheritance.
QuizMedium2 minsSwiftProtocolssome is an opaque type that stands for one specific concrete type the compiler knows; any is a box that can hold any conforming type at run time.
QuizMedium3 minsSwiftProtocolsGenericsGenerics let you write one function or type that works with many types, and constraints limit those types to ones that have the abilities you need.
QuizMedium2 minsSwiftGenericsProtocolsSwift uses static dispatch when it knows the exact method, table dispatch for class overrides and protocol requirements, and message dispatch for @objc dynamic.
QuizHard3 minsSwiftPerformance
Memory management
0/4 done- How does ARC work in Swift?Asked often
ARC counts strong references to each class instance and frees the instance as soon as the count reaches zero, with retain and release calls inserted by the compiler.
QuizMedium3 minsMemory & ARCSwift A strong reference keeps an object alive, a weak reference does not and becomes nil when the object dies, and an unowned reference does not and crashes if used after the object dies.
QuizEasy3 minsMemory & ARCA retain cycle happens when objects hold strong references to each other so their counts never reach zero; you break it by making one link weak or unowned.
QuizMedium2 minsMemory & ARCCheck that deinit runs, use Xcode's Memory Graph Debugger to see who holds an object, use the Leaks and Allocations instruments, and add tests that assert objects are freed.
QuizMedium3 minsMemory & ARCToolingPerformance
Concurrency
0/12 doneGCD is a lightweight C-based API for running closures on queues, while OperationQueue is a higher-level Objective-C API built on GCD that adds dependencies, cancellation and concurrency limits.
QuizMedium2 minsConcurrency- How does async/await work in Swift?Asked often
An async function can pause at each await without blocking its thread, letting Swift run other work on that thread until the result is ready.
QuizMedium2 minsConcurrency An actor is a reference type that protects its mutable state by running only one task at a time on it, and reentrancy means its state can change while one of its methods is suspended at an await.
QuizMedium2 minsConcurrency@MainActor is a global actor that runs code on the main thread, and marking UI types and methods with it lets the compiler check that UI updates happen there.
QuizMedium2 minsConcurrencySendable marks types whose values can safely cross between concurrency domains, like tasks and actors, without causing data races.
QuizHard3 minsConcurrencyCancellation in Swift is cooperative; cancel() only sets a flag, and your code must check Task.isCancelled or call try Task.checkCancellation() to stop.
QuizMedium2 minsConcurrencyA deadlock is when threads wait for each other forever, a data race is unsynchronized access to the same memory with at least one write, and a race condition is a logic bug that depends on timing.
QuizMedium3 minsConcurrencyRun an action only after the calls stop for a short time, like a search box that waits until the user stops typing.
Swift codingMedium25 mins9 testsConcurrencySwiftRun an action at most once per time window. The first call runs right away, and the last call in the window runs when the window ends.
Swift codingMedium25 mins9 testsConcurrencySwiftRetry a failing async operation, and double the wait time after each failure.
Swift codingMedium20 mins8 testsConcurrencyNetworkingBuild a bank account as an actor so many tasks can deposit, withdraw and transfer at the same time without data races.
Swift codingEasy15 mins10 testsConcurrencySwiftTransform an array with async work in parallel, keep the input order, and never run more than N tasks at once.
Swift codingHard35 mins8 testsConcurrencyGenerics
UIKit
0/4 done- Explain the UIViewController lifecycle.Asked often
A view controller creates its view, loads it once in viewDidLoad, then gets appear and disappear callbacks every time it shows or hides.
QuizEasy2 minsUIKitApp lifecycle The frame is the view's rectangle in its superview's coordinates, while bounds is the same view described in its own coordinates.
QuizEasy2 minsUIKitAuto Layout solves a set of constraint equations to find each view's frame, and hugging and compression resistance priorities decide which view grows or shrinks first.
QuizMedium2 minsUIKitA table view keeps a small pool of cells and reuses them for new rows, so you must fully reset each cell or you will see old data.
QuizEasy2 minsUIKitPerformance
SwiftUI
0/3 doneThe @State wrapper owns data inside a view, @Binding gives a child read-write access to someone else's data, @Bindable makes bindings to an @Observable object, and @Environment reads shared values from above.
QuizMedium2 minsSwiftUIThe @Observable macro makes a class track reads and writes of each property, so SwiftUI only updates views that read the changed property, while ObservableObject updates every observer on any change.
QuizMedium2 minsSwiftUICombineSwiftUI uses identity to decide if a view is the same one as before, and identity controls how long state lives and whether changes animate or reset.
QuizHard2 minsSwiftUIPerformance
Architecture
0/5 doneMVC is simple but leads to huge view controllers, MVVM moves logic into a testable view model, VIPER splits a screen into many small roles, and TCA uses one state, actions and a reducer.
QuizMedium3 minsArchitectureDependency injection means an object gets its dependencies from outside instead of creating them, which makes code easy to test and change.
QuizMedium2 minsArchitectureTestingA coordinator owns navigation, so view controllers do not know about each other and screens become reusable and easy to test.
QuizMedium2 minsArchitectureUIKitBuild a small DI container that registers factories by type, supports singleton and transient scopes, and throws for missing types.
Swift codingMedium25 mins11 testsArchitectureGenericsParse custom-scheme deep links and universal links into a type-safe Route enum with URLComponents.
Swift codingMedium25 mins12 testsArchitectureSwift
Networking and data
0/7 doneBuild a URLRequest, call try await session.data(for:), check the HTTP status code, then decode the data, and choose a session configuration for caching, timeouts or background transfers.
QuizEasy2 minsNetworkingConcurrencyCodable lets the compiler generate encoding and decoding code, and you customize it with CodingKeys, decoder strategies or a hand-written init(from:).
QuizEasy1 minsNetworkingSwiftLet URLCache handle HTTP caching with Cache-Control and ETag headers, and add your own memory and disk cache for decoded, downsampled images.
QuizMedium2 minsNetworkingPerformanceUse UserDefaults for small settings, the Keychain for secrets, files for documents and caches, and SwiftData, Core Data or SQLite for structured data you query.
QuizEasy3 minsPersistenceSecurityDecode a real-looking API response with snake_case keys, ISO 8601 dates, nested and optional fields, and an enum that survives new values.
Swift codingMedium25 mins11 testsSwiftNetworkingBuild an actor that loads pages for an infinite list, ignores duplicate loads while one is running, and stops at the last page.
Swift codingHard35 mins9 testsConcurrencyArchitectureNetworkingBuild a generic cache that drops the least recently used item when it is full. Every operation must be O(1).
Swift codingMedium30 mins10 testsData structuresGenerics
App lifecycle, testing and performance
0/4 doneAn app moves between not running, inactive, active, background and suspended states, with AppDelegate handling process-level events and SceneDelegate handling each window's UI lifecycle.
QuizEasy2 minsApp lifecycleUIKitSwiftUISwift Testing uses @Test functions with expect and require macros, parameterized tests and parallel runs by default, while XCTest uses XCTestCase subclasses and XCTAssert functions, and both can live in the same target.
QuizEasy2 minsTestingHide each dependency behind a protocol or closure, inject it, and in tests pass a test double such as a stub that returns fixed data or a spy that records calls.
QuizMedium2 minsTestingArchitectureStutters are hitches where a frame misses its deadline, usually from main thread work in cell setup, image decoding, layout or offscreen rendering, so you measure with Instruments and move or remove that work.
QuizMedium2 minsPerformanceUIKit
Algorithms in Swift
0/14 doneFind the two numbers in an array that add up to a target, in one pass.
Swift codingEasy15 mins7 testsAlgorithmsData structuresCheck that every bracket in a string is closed by the same type, in the right order.
Swift codingEasy15 mins9 testsAlgorithmsData structuresFind the biggest profit from one buy and one later sell, in a single pass.
Swift codingEasy15 mins9 testsAlgorithmsUse binary search to find the first broken CI build with as few checks as possible.
Swift codingEasy15 mins8 testsAlgorithmsReverse a singly linked list in place by turning every next pointer around.
Swift codingEasy15 mins8 testsAlgorithmsData structuresMerge overlapping calendar events into busy blocks by sorting first, then scanning once.
Swift codingMedium20 mins9 testsAlgorithmsGroup words made of the same letters by using a dictionary with a smart key.
Swift codingMedium20 mins9 testsAlgorithmsData structuresCount how often each hashtag is used and return the k most popular ones.
Swift codingMedium20 mins9 testsAlgorithmsData structuresFor each index, multiply every other number, without division, using prefix and suffix products.
Swift codingMedium20 mins8 testsAlgorithmsFind the longest run of unique characters with a sliding window and a dictionary.
Swift codingMedium20 mins10 testsAlgorithmsData structuresFind the closest view that contains two given views, using superview pointers.
Swift codingMedium20 mins9 testsAlgorithmsData structuresUIKitWalk a view tree level by level with breadth-first search and return the names of each level.
Swift codingMedium20 mins8 testsAlgorithmsData structuresUIKitCount connected regions of filled pixels in a mask with flood fill (the "number of islands" problem).
Swift codingMedium20 mins9 testsAlgorithmsBuild a prefix tree that returns sorted search suggestions without scanning every word.
Swift codingMedium25 mins10 testsAlgorithmsData structures
UI coding
0/5 doneBuild an email and password form with live validation, a loading state, server errors and good keyboard focus.
SwiftUIMedium40 minsSwiftUIConcurrencyAccessibilityBuild a list that loads the next page before the user reaches the end, with loading, error and empty states.
SwiftUIMedium45 minsSwiftUIConcurrencyNetworkingBuild a search screen that waits 300 ms after typing, cancels old requests, and shows results, empty and error states.
SwiftUIMedium40 minsSwiftUIConcurrencyNetworkingBuild a paging carousel with page dots and an auto-advance timer that pauses while the user drags.
SwiftUIMedium45 minsSwiftUIConcurrencyAccessibilityBuild a 1–5 star control that shows half stars, reacts to taps, and works with VoiceOver.
SwiftUIEasy30 minsSwiftUIAccessibility
System design
0/6 doneBuild a Kingfisher-style library with a memory and disk cache, shared in-flight requests, downsampling, and safe cancellation in reused cells.
System designHard1hSystem designPerformanceMemory & ARCDesign a social feed with cursor pagination, prefetching, optimistic likes and an offline cache that opens instantly.
System designMedium45 minsSystem designArchitectureNetworkingDesign 1:1 and group chat with a WebSocket, server-side ordering, delivery states, an offline outbox and push notifications.
System designHard1hSystem designNetworkingConcurrencyDesign a notes app that works fully offline and syncs across devices with a local database, a push/pull sync engine and safe conflict resolution.
System designHard1hSystem designPersistenceConcurrencyDesign a typed, testable networking layer with endpoints, a middleware chain, single-flight token refresh, safe retries and clear errors.
System designMedium45 minsSystem designNetworkingArchitectureDesign a tiny, crash-safe analytics SDK that many apps embed, with batching, disk persistence, retries with backoff, and privacy controls.
System designMedium45 minsSystem designPerformancePersistence