XCFrameworks and Binary Distribution Trade-offs
WHAT IT TESTS: knowledge of binary distribution on Apple platforms. OUTLINE: XCFramework bundles slices for multiple platforms/architectures, used to hide source or speed builds. RED FLAG: ignoring debugging, Swift ABI, and update friction trade-offs.
Decoupled Cross-Module Navigation in Modular iOS
WHAT IT TESTS: decoupling feature modules. OUTLINE: depend on a shared abstraction, register concrete routers in a coordinator or registry, resolve at runtime. RED FLAG: importing module B directly or coupling features through a god object.
Resolving Conflicting Transitive Versions in SPM
WHAT IT TESTS: understanding of SPM's single-version resolution. OUTLINE: SPM allows only one version per package, so diagnose the graph, then update, pin, or fork to find an overlap. RED FLAG: assuming both versions can coexist like in some other ecosystems.
Making a Legacy UIViewController Testable
WHAT IT TESTS: refactoring legacy UIKit for testability. OUTLINE: extract logic into a testable view model, inject dependencies, keep the controller a thin humble object. RED FLAG: rewriting everything at once or testing through the UIKit lifecycle directly.
setUp() and tearDown() in XCTestCase
WHAT IT TESTS: knowledge of XCTest lifecycle and test isolation. OUTLINE: setUp builds fresh state before each test, tearDown cleans up after, ensuring independence. RED FLAG: thinking they run once per class or sharing mutable state across tests.
Generating Video Thumbnails with AVAssetImageGenerator
WHAT IT TESTS: AVFoundation usage plus async UI hygiene. OUTLINE: load AVAsset, configure AVAssetImageGenerator, request the time off the main thread, hop back to update UI. RED FLAG: doing the decode synchronously on the main thread.
Building a Card Flip Animation in SwiftUI
WHAT IT TESTS: SwiftUI animation and 3D transform fluency. OUTLINE: drive a flipped state, rotate both faces with rotation3DEffect, hide the back face. RED FLAG: forgetting the back is mirrored or showing both faces at once.
Push vs Modal Presentation in UIKit
WHAT IT TESTS: understanding of UIKit navigation models. OUTLINE: push adds to a nav stack with back, modal presents a self-contained interrupting flow. RED FLAG: treating them as interchangeable or ignoring the stack relationship.
IBOutlet vs IBAction in Interface Builder
WHAT IT TESTS: grasp of Storyboard-to-code wiring. OUTLINE: outlet references a view, action handles an event, both connect via Ctrl-drag. RED FLAG: confusing the two directions or forgetting the connection is runtime, not compile-time.
Protocols with associated types and opaque types
WHAT IT TESTS: generics and type erasure. OUTLINE: a PAT leaves a placeholder type unresolved, so it has no single concrete shape and historically could not be used as a bare existential; opaque types with some let you return one fixed underlying conforming…
do-try-catch versus Optional return types
WHAT IT TESTS: error modeling choices. OUTLINE: throwing functions with do/try/catch convey why something failed via typed Error values; Optionals only say success or absence. Use throws when the caller needs the reason.
Closures and trailing closure syntax
WHAT IT TESTS: first-class functions and capture. OUTLINE: closures are self-contained function blocks that capture surrounding state; a final closure parameter can be passed as a trailing closure outside the parentheses.
Purpose of the guard statement
WHAT IT TESTS: early-exit control flow. OUTLINE: guard requires its condition to hold or else exits the scope, and unwrapped optionals stay in scope afterward; this flattens nesting versus if.
Retain cycles and how to break them
WHAT IT TESTS: ARC and closure capture. OUTLINE: a cycle is two objects (or a closure and its owner) holding mutual strong references so neither deallocates; break it with a [weak] or [unowned] capture list.
Decoding a heterogeneous JSON array by a type field
WHAT IT TESTS: custom Decodable with a discriminator. OUTLINE: peek the type field with a partial decode, switch on it, and decode the concrete type, wrapping each in an enum or boxed protocol value.
Minimizing Storyboard merge conflicts
WHAT IT TESTS: collaboration on monolithic XML UI files. OUTLINE: split into many small storyboards or xibs, or move to programmatic or SwiftUI layout; process-wise coordinate ownership and merge often.
Faulting in Core Data
WHAT IT TESTS: lazy loading in Core Data. OUTLINE: a fault is a placeholder object whose property data is not yet loaded; accessing a property fires the fault and fetches from the store, saving memory. RED FLAG: ignoring the N+1 fetch storm faulting can cause.
View identity in SwiftUI and the .id() modifier
WHAT IT TESTS: how SwiftUI tracks views across updates. OUTLINE: identity links a view to its persistent state and transitions; structural identity comes from position, explicit identity from .id(); changing the id resets state and forces a new view.
Copy-on-write and implementing it for a custom struct
WHAT IT TESTS: value semantics with shared backing storage. OUTLINE: CoW shares a buffer until mutation, deep-copying only when the buffer is non-unique; Array, Dictionary, Set, String use it; implement with a class storage box and isKnownUniquelyReferenced.
map versus compactMap versus flatMap
WHAT IT TESTS: functional transforms on sequences. OUTLINE: map transforms each element one-to-one; compactMap transforms then drops nils; flatMap transforms to sequences then concatenates.