iosNudge

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.

12 parts75 items 18h 46m in total1–2 hours a day
0/75 completed0%

Swift fundamentals

0/7 done

Protocols and generics

0/4 done

Memory management

0/4 done
  • 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 mins
  • 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 mins
  • A 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 mins
  • Check 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 mins

Concurrency

0/12 done
  • GCD 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 mins
  • 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 mins
  • 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 mins
  • @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 mins
  • Sendable marks types whose values can safely cross between concurrency domains, like tasks and actors, without causing data races.

    QuizHard3 mins
  • Cancellation in Swift is cooperative; cancel() only sets a flag, and your code must check Task.isCancelled or call try Task.checkCancellation() to stop.

    QuizMedium2 mins
  • A 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 mins
  • Run 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 tests
  • Run 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 tests
  • Retry a failing async operation, and double the wait time after each failure.

    Swift codingMedium20 mins8 tests
  • Build a bank account as an actor so many tasks can deposit, withdraw and transfer at the same time without data races.

    Swift codingEasy15 mins10 tests
  • Transform an array with async work in parallel, keep the input order, and never run more than N tasks at once.

    Swift codingHard35 mins8 tests

UIKit

0/4 done

SwiftUI

0/3 done

Architecture

0/5 done

Networking and data

0/7 done
  • Build 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 mins
  • Codable lets the compiler generate encoding and decoding code, and you customize it with CodingKeys, decoder strategies or a hand-written init(from:).

    QuizEasy1 mins
  • Let URLCache handle HTTP caching with Cache-Control and ETag headers, and add your own memory and disk cache for decoded, downsampled images.

    QuizMedium2 mins
  • Use 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 mins
  • Decode 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 tests
  • Build 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 tests
  • Build a generic cache that drops the least recently used item when it is full. Every operation must be O(1).

    Swift codingMedium30 mins10 tests

App lifecycle, testing and performance

0/4 done

Algorithms in Swift

0/14 done
  • Find the two numbers in an array that add up to a target, in one pass.

    Swift codingEasy15 mins7 tests
  • Check that every bracket in a string is closed by the same type, in the right order.

    Swift codingEasy15 mins9 tests
  • Find the biggest profit from one buy and one later sell, in a single pass.

    Swift codingEasy15 mins9 tests
  • Use binary search to find the first broken CI build with as few checks as possible.

    Swift codingEasy15 mins8 tests
  • Reverse a singly linked list in place by turning every next pointer around.

    Swift codingEasy15 mins8 tests
  • Merge overlapping calendar events into busy blocks by sorting first, then scanning once.

    Swift codingMedium20 mins9 tests
  • Group words made of the same letters by using a dictionary with a smart key.

    Swift codingMedium20 mins9 tests
  • Count how often each hashtag is used and return the k most popular ones.

    Swift codingMedium20 mins9 tests
  • For each index, multiply every other number, without division, using prefix and suffix products.

    Swift codingMedium20 mins8 tests
  • Find the longest run of unique characters with a sliding window and a dictionary.

    Swift codingMedium20 mins10 tests
  • Find the closest view that contains two given views, using superview pointers.

    Swift codingMedium20 mins9 tests
  • Walk a view tree level by level with breadth-first search and return the names of each level.

    Swift codingMedium20 mins8 tests
  • Count connected regions of filled pixels in a mask with flood fill (the "number of islands" problem).

    Swift codingMedium20 mins9 tests
  • Build a prefix tree that returns sorted search suggestions without scanning every word.

    Swift codingMedium25 mins10 tests

UI coding

0/5 done
  • Build an email and password form with live validation, a loading state, server errors and good keyboard focus.

    SwiftUIMedium40 mins
  • Build a list that loads the next page before the user reaches the end, with loading, error and empty states.

    SwiftUIMedium45 mins
  • Build a search screen that waits 300 ms after typing, cancels old requests, and shows results, empty and error states.

    SwiftUIMedium40 mins
  • Build a paging carousel with page dots and an auto-advance timer that pauses while the user drags.

    SwiftUIMedium45 mins
  • Build a 1–5 star control that shows half stars, reacts to taps, and works with VoiceOver.

    SwiftUIEasy30 mins

System design

0/6 done
  • Build a Kingfisher-style library with a memory and disk cache, shared in-flight requests, downsampling, and safe cancellation in reused cells.

    System designHard1h
  • Design a social feed with cursor pagination, prefetching, optimistic likes and an offline cache that opens instantly.

    System designMedium45 mins
  • Design 1:1 and group chat with a WebSocket, server-side ordering, delivery states, an offline outbox and push notifications.

    System designHard1h
  • Design 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 designHard1h
  • Design a typed, testable networking layer with endpoints, a middleware chain, single-flight token refresh, safe retries and clear errors.

    System designMedium45 mins
  • Design a tiny, crash-safe analytics SDK that many apps embed, with batching, disk persistence, retries with backoff, and privacy controls.

    System designMedium45 mins