ARC (Automatic Reference Counting) is Swift's memory management system for class instances. The compiler inserts retain and release calls so that an object's memory is reclaimed as soon as the count of strong references to it drops to zero. Unlike a tracing garbage collector, ARC is deterministic and happens at compile time, so there's no runtime pause. The classic pitfall is a retain cycle, where two objects hold strong references to each other and neither is ever freed. You break cycles with weak or unowned references, commonly in closures and delegate properties.
2 / 5
What is an optional in Swift?
An optional (written T?) encodes the possibility of absence directly in the type system: it is either .some(value) or .none (i.e. nil). This forces you to handle the missing case explicitly, eliminating whole classes of null-pointer crashes. You unwrap optionals safely with if let, guard let, optional chaining (a?.b), or the nil-coalescing operator (??). Force-unwrapping with ! crashes if the value is nil, so it should be reserved for cases you can prove are non-nil.
3 / 5
What kind of UI framework is SwiftUI?
SwiftUI is Apple's declarative UI framework. Instead of imperatively mutating views, you describe what the interface should look like for a given state, and the framework diffs and updates the rendered tree when that state changes. State flows through property wrappers like @State, @Binding, @StateObject, and @ObservedObject. SwiftUI is cross-platform across iOS, macOS, watchOS, and tvOS, and it interoperates with UIKit/AppKit via representable wrappers when you need lower-level control.
4 / 5
What does Apple's Combine framework provide?
Combine is Apple's functional reactive programming framework. A publisher emits a stream of values over time, and a subscriber receives them; operators like map, filter, debounce, and combineLatest transform the stream in between. It standardizes asynchronous event handling — network responses, timers, UI events, and notifications — into composable pipelines with built-in backpressure and error propagation. Combine integrates tightly with SwiftUI, though much of its role is increasingly served by Swift's native async/await and AsyncSequence.
5 / 5
In iOS distribution, what is a provisioning profile?
A provisioning profile is a code-signing artifact that ties together your App ID, one or more signing certificates, the app's entitlements (capabilities like push notifications), and — for development/ad-hoc builds — a list of authorized device UDIDs. iOS will only launch an app whose signature and embedded profile match, which is how Apple enforces who can run what and where. Profiles come in development, ad-hoc, enterprise, and App Store flavors. Closely related is SPM (Swift Package Manager), the dependency manager that fetches and builds external Swift packages declared in Package.swift.