
How would you use Energy Log to investigate battery drain?
Tests correlating Instruments energy metrics to app behavior. Strong answers profile with Energy Log, map CPU/Location/Network spikes to user flows or background work, and validate fixes with before/after logs. Red flag: blaming the OS without evidence.

Explain symbolic breakpoints and debug Auto Layout with one
Tests debugging closed-source frameworks without source lines. A strong answer says a symbolic breakpoint stops on UIViewAlertForUnsatisfiableConstraints, then checks the backtrace or log to find the bad view.

Difference between .xcodeproj and .xcworkspace, and when to use a workspace
Tests your mental model of Xcode build containers. A project defines one buildable unit; a workspace groups multiple projects so they build together and share derived data. Use it for package managers or modular codebases.

Explain Copy-on-Write in Swift and implement it for custom structs
Tests value semantics with reference storage and uniqueness checks. A strong answer explains CoW delays copy until mutation via isKnownUniquelyReferenced, lists custom steps: wrap, read, check, clone. Red flag: assuming structs are automatically CoW.

Swift struct vs class: differences and when to choose each
Tests value vs reference semantics and let mutability. Strong answers contrast copy behavior with shared references, note allocation tendencies, and choose struct for value semantics or class for identity.

On-Demand Resources: Keep Your App Bundle Slim
On-Demand Resources (ODR) host app assets on the App Store, not in your bundle, shrinking your initial download. Use it for game levels or tutorials not needed at first launch. The OS downloads assets by "tag" when requested, but can also purge them to save.

App Thinning: Ship Only What's Needed
App Thinning shrinks your app's download by delivering only the assets a specific device needs. The App Store uses Slicing for device-specific art and code, and you can use On-Demand Resources for assets downloaded after installation.

Navigating Apple's App Store Submission and Review
Think of App Store submission as a strict gatekeeping process, not just an upload. You must prove your app is safe, reliable, and transparent via App Store Connect.

Static vs. Dynamic Linking: Code Size vs. Flexibility
Static linking bakes library code into your app, creating a large but self-contained executable. Dynamic linking loads libraries at runtime, saving space. This choice impacts app size, launch time, and updates.

XCUITest Page Object Model: Tame Your UI Tests
The Page Object Model treats each app screen as an object, separating test logic from UI interaction. In XCUITest, this creates stable tests for complex apps. The biggest footgun is forgetting synchronization—always wait for views to load before interacting.

Mocking: Faking Dependencies in Unit Tests
A mock is a stunt double for a real object in your unit tests, letting you control its behavior. Use it to fake dependencies like network clients for fast, predictable tests. The footgun: over-mocking can create tests that pass but miss real integration bugs.

VIPER: Taming Massive iOS View Controllers
VIPER is a strict architectural pattern that tames "Massive View Controllers" by splitting features into five layers: View, Interactor, Presenter, Entity, and Router. It's used in large iOS apps to make business logic and navigation explicitly testable.

The Coordinator Pattern: Untangling iOS Navigation
The Coordinator pattern makes a separate object the 'boss' of app navigation, leaving view controllers to just manage their view. This lets you reuse views in different flows without them knowing what comes next.

Dependency Injection in Swift: Stop Creating, Start Receiving
Dependency Injection means objects receive their dependencies from the outside rather than creating them internally. It's used to give a view model a network client or data source, making it testable.

MVVM: Separate SwiftUI Logic from Layout
MVVM separates logic from layout by moving state and business logic out of your SwiftUI View into a dedicated ViewModel class. This makes your code cleaner, more organized, and easier to test.

Model-View-Controller (MVC): Separating App Logic from UI
MVC organizes code by separating data (Model) from the user interface (View), using a Controller as the go-between. This is the foundational pattern for many UI frameworks, like Cocoa and UIKit. The main footgun is the "Massive View Controller."

The UIViewController Lifecycle: From Creation to On-Screen
Think of a UIViewController as an actor with cues to enter, perform, and exit. Its lifecycle methods are your script for setting up data, updating the UI, and cleaning up resources.

Auto Layout: Describing Relationships, Not Frames
Auto Layout lets you describe a UI by its relationships, not hardcoded coordinates. You declare "this button is centered and 8 points below the logo," and the system calculates its position.