Role preparation

iOS Developer interview questions and answers.

Swift memory management, concurrency, and SwiftUI.

Questions

Technical questions to practise out loud

  1. 01

    How do you avoid retain cycles in Swift?

    ARC cannot break a cycle of strong references, so use weak when the referenced object may become nil or unowned only when lifetimes guarantee validity; closures often need an intentional capture list.

    Read the full breakdown
  2. 02

    When do you use actors in Swift?

    Actors serialise access to their isolated mutable state and prevent data races across concurrency domains; crossing an actor boundary requires await, but actors do not make multi-step workflows automatically atomic.

    Read the full breakdown
  3. 03

    How do you reason about the SwiftUI view lifecycle?

    SwiftUI views are transient value descriptions, not long-lived screen objects; persist state with the appropriate property wrapper, keep identity stable, and attach side effects to task or lifecycle hooks.

    Read the full breakdown
  4. 04

    How do you manage memory in an iOS app?

    iOS memory management combines ARC ownership with bounded caches and release of large resources; inspect the memory graph and Instruments for cycles, unbounded growth, and allocations that survive their owner.

    Read the full breakdown
  5. 05

    How do you design networking in iOS?

    Design iOS networking around URLSession, typed request and response models, cancellation, timeouts, mapped errors, secure credential storage, retries for safe transient failures, and observable loading state.

    Read the full breakdown
  6. 06

    How do you choose local persistence in iOS?

    Choose persistence from data shape, volume, query and sync needs: UserDefaults for small preferences, files for blobs, Keychain for secrets, and SwiftData/Core Data or SQLite for structured relationships.

    Read the full breakdown
  7. 07

    How do you structure navigation in a SwiftUI app?

    SwiftUI navigation should derive from explicit route state, use stable identifiers and typed destinations, preserve deep-link and restoration behaviour, and keep routing decisions outside reusable views.

    Read the full breakdown
  8. 08

    What is your iOS testing strategy?

    Use unit tests for domain logic, dependency injection for controllable clocks and clients, integration tests for persistence or networking boundaries, and focused UI tests for critical user journeys.

    Read the full breakdown
  9. 09

    How do you investigate iOS performance issues?

    Investigate iOS performance with Instruments and signposts: measure launch, hangs, frame drops, CPU, allocations and network, then fix the measured main-thread or resource bottleneck and compare again.

    Read the full breakdown
  10. 10

    How do you protect sensitive data on iOS?

    Protect iOS data with least collection, Keychain or Secure Enclave for secrets, file data protection, TLS and server-side authorization; never rely on obfuscation or a client-embedded secret.

    Read the full breakdown