Skip to content
tezvyn:

iOS & Swift

SwiftUI, UIKit, Xcode, Swift language, Apple platforms

74 bites

Test yourself: Top 30 iOS & Swift interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in. No easy set yet. This is the full iOS & Swift quiz.

Easy everything in iOS & Swift, page 2

UIViewController lifecycle states: network vs geometry updates
easy2 min read

UIViewController lifecycle states: network vs geometry updates

Tests UIViewController lifecycle states and separation of data vs layout. Strong answers list loadView to viewDidDisappear, start network in viewDidLoad or viewWillAppear, and geometry in viewDidLayoutSubviews. Red flag: network calls inside layout methods.

What is @State in SwiftUI and how does it affect the view?
easy2 min read

What is @State in SwiftUI and how does it affect the view?

Tests declarative data flow ownership. A strong answer defines @State as private value-type storage owned by the view that triggers a body re-evaluation on mutation. Red flag: confusing it with external data sources like @ObservedObject or @Binding.

When should you use frame-based layout versus Auto Layout?
easy2 min read

When should you use frame-based layout versus Auto Layout?

Frames suit static or high-frequency UI like particle systems; Auto Layout handles rotation, Dynamic Type, localization, and split screen.

What LLDB command prints a UIView description versus an Int?
easy2 min read

What LLDB command prints a UIView description versus an Int?

Tests LLDB formatting at breakpoints. Great answers: po invokes description or debugDescription on objects, while p evaluates and prints raw primitive values with type info. Red flag: mixing them up or recommending console print instead of LLDB.

Difference between .xcodeproj and .xcworkspace, and when to use a workspace
easy2 min read

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.

easy2 min read

Explain protocols and how extensions provide default implementations

Tests behavior sharing without inheritance. A strong answer defines protocols as requirements, shows extensions injecting default implementations, and contrasts this with base-class inheritance.

Swift struct vs class: differences and when to choose each
easy2 min read

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.

easy2 min read

What is an optional in Swift? Demonstrate two safe unwrapping methods.

This checks Swift type safety and nil-handling. A strong answer defines Optional as an enum, demonstrates if let binding, and shows the nil-coalescing operator ?? for defaults. Avoid suggesting force-unwrapping with ! as a safe pattern.

easy2 min read

What is the difference between let and var in Swift?

This tests value semantics beyond syntax. A strong answer defines let as immutable and var as mutable, notes that let on a reference type only fixes the pointer, and cites clearer intent and compiler optimization.

easy2 min read

UserNotifications Framework: iOS Alert Gatekeeper

UserNotifications is the gatekeeper between your app and the lock screen. You use it to request permission and schedule local or push alerts on iOS. Send a notification before authorization and the system silently drops it.

Selectors: Objective-C's Function Pointers in Swift
easy2 min read

Selectors: Objective-C's Function Pointers in Swift

A selector is a lightweight name for a method, not a direct pointer. Swift uses it to call Objective-C code dynamically at runtime. It's common in UIKit for target-action patterns, like button taps. The footgun: forgetting @objc causes a runtime crash.

Bridging Header: Mixing Objective-C and Swift
easy1 min read

Bridging Header: Mixing Objective-C and Swift

A bridging header is a translation list for Xcode, letting your new Swift code call old Objective-C code. It's essential when migrating a legacy codebase or using an Objective-C library. The footgun: it only exposes Objective-C to Swift, not vice-versa.

Main Thread Checker: Keep Your UI Responsive
easy2 min read

Main Thread Checker: Keep Your UI Responsive

The Main Thread Checker is an Xcode tool that catches UI updates on background threads, which cause crashes or glitches. It runs during debugging, flagging AppKit, UIKit, or SwiftUI calls made off the main thread.

Grand Central Dispatch (GCD): Your App's Task Manager
easy2 min read

Grand Central Dispatch (GCD): Your App's Task Manager

Grand Central Dispatch (GCD) is your app's task manager, letting you run code in the background without freezing the UI. Use it to offload network requests or heavy computations, then update the UI on the main queue.

easy2 min read

App Store Reviews: Your Public Support Channel

Treat App Store reviews as public conversations, not just support tickets. Responding lets you fix your app's narrative, help users with issues, and show potential customers you're engaged. The footgun is writing an emotional or defensive reply.

Archiving an iOS App for Distribution
easy2 min read

Archiving an iOS App for Distribution

Archiving an app bundles your code and assets into a distributable package. It's the final step before sending your app to beta testers on TestFlight or submitting it to the App Store.

easy2 min read

App Store Connect: Your App's Mission Control

Think of App Store Connect as your app's mission control. It’s the web portal for managing your app's lifecycle after coding, from uploading builds and running TestFlight betas to submitting for final review.

easy1 min read

Apple Developer: The Official Resource Hub

Think of Apple Developer as the official command center for building on Apple platforms. It's the central website for the tools, APIs, and technical resources you need to write software for iOS, macOS, watchOS, and more.

easy2 min read

CocoaPods: Managing Dependencies in Apple Projects

CocoaPods manages third-party libraries in your Swift/Objective-C projects. You list dependencies in a Podfile, run pod install, and it handles the rest. The biggest footgun: always open the .xcworkspace, not the .xcodeproj file after installing.

XCTAssert: The Pass/Fail Gatekeeper of Your Tests
easy2 min read

XCTAssert: The Pass/Fail Gatekeeper of Your Tests

XCTAssert functions are the gatekeepers of your tests, asserting if code behaves as expected. Use them to validate conditions like equality (XCTAssertEqual) or truth (XCTAssertTrue).

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles