Q1 You assign a struct value to a new variable and mutate the copy. The original is: Swift Language
A Also mutated (shared) B Unchanged (value semantics) C Set to nil D A compile error
Q2 Which is the safest way to handle a value that may be nil? Swift Language
A Force-unwrap with ! B guard let / if let C Assume it's set D Cast with as!
Q3 What prevents a strong reference cycle between two class instances? Swift Language
A Marking one reference weak or unowned B Using a struct for both C Adding @MainActor D Calling deinit manually
Q4 Swift 6's headline change is: Swift Language
A A new UI framework B Compile-time data-race safety C Dropping optionals D Replacing Codable
Q5 In ForEach, using the array index as id can cause: SwiftUI
A Faster rendering B State attaching to the wrong row on reorder C Type errors D Smaller binaries
Q6 Which wrapper marks state OWNED by the current view? SwiftUI
A @Binding B @Environment C @State D @Bindable
Q7 The advantage of @Observable over ObservableObject is: SwiftUI
A It works only in UIKit B Per-property read tracking, fewer re-renders C It removes the need for state D It runs off the main thread
Q8 .padding().background(.red) vs .background(.red).padding() differ because: SwiftUI
A Modifiers are unordered B Each modifier wraps the previous view C Color overrides padding D Only the first modifier applies
Q9 What does awaiting an async call do to the thread? Concurrency
A Blocks it until done B Frees it; the function suspends and resumes later C Spawns a new thread D Nothing — it's synchronous
Q10 To protect a mutable cache accessed by many tasks, you'd use: Concurrency
A A global var B An actor C @State D A struct
Q11 Code that updates the UI should run on: Concurrency
A Any background actor B The main actor (@MainActor) C A detached task D The global queue
Q12 async let is used to: Concurrency
A Declare a constant B Run child work concurrently within a scope C Block the main thread D Replace Codable
Q13 Where should an authentication token be stored? Data & Networking
A UserDefaults B A plist in the bundle C The Keychain D A global variable
Q14 To map JSON full_name to a Swift property fullName you can: Data & Networking
A Nothing — it just works B Use CodingKeys or convertFromSnakeCase C Rename the JSON D Use a class instead of a struct
Q15 SwiftData is best described as: Data & Networking
A A networking library B A modern Swift persistence layer built on Core Data C A replacement for SwiftUI D A testing framework
Q16 The biggest build/structure win for a large app is usually: Architecture
A One giant target B Splitting into local Swift packages C More singletons D Disabling tests
Q17 Injecting an APIClient protocol into a view model primarily improves: Architecture
A App size B Testability and decoupling C Launch time D Battery life
Q18 Before optimizing, you should: Performance
A Rewrite in UIKit B Measure with Instruments C Add more threads D Disable animations
Q19 A janky image feed most often improves when you: Performance
A Load full-resolution images eagerly B Downsample off-main and cache thumbnails C Use VStack instead of List D Increase image size
Q20 A provisioning profile ties together: CI/CD & Tooling
A Only the app icon B App ID + devices + a certificate C Just the version number D The App Store description
Q21 CFBundleVersion (build number) must: CI/CD & Tooling
A Stay constant B Increase with every App Store Connect upload C Match the iOS version D Be a date
Q22 A phased release lets you: App Store
A Skip review B Roll out to a growing % and pause if crashes spike C Avoid TestFlight D Bypass signing
Q23 App Transport Security (ATS) by default: Security
A Allows plaintext HTTP B Requires HTTPS/TLS for network calls C Disables the Keychain D Encrypts UserDefaults
Q24 A key benefit of on-device ML (Core ML) over a server call is: On-Device AI
A Unlimited model size B Privacy, low latency, and offline use C No need for a model D It avoids Swift
Q25 `some View` (an opaque return type) means the function returns: Swift Language
A Any type at runtime B One specific type the caller doesn't name C A protocol box D Void
Q26 To pass measured size from a child UP to an ancestor you use: SwiftUI
A @Environment B A PreferenceKey C @State D @Binding
Q27 Actor reentrancy means that across an await inside an actor method: Concurrency
A Nothing else can run on the actor B Other calls may run and mutate state C The actor deadlocks D State is frozen
Q28 AsyncStream is most commonly used to: Concurrency
A Replace Codable B Bridge a callback/delegate API into an AsyncSequence C Block the main actor D Cache images
Q29 Compared with a plain dictionary, NSCache automatically: Data & Networking
A Encrypts entries B Evicts under memory pressure and is thread-safe C Persists to disk D Sorts keys
Q30 A headline feature of StoreKit 2 is: App Store
A XML receipts only B Async API with on-device signed transaction verification C No need to offer IAP D It removes subscriptions
Q31 Public-key pinning protects against: Security
A Slow networks B A rogue/compromised CA performing a MITM C Large downloads D Memory leaks
Q32 Feature flags primarily let you: Architecture
A Skip code review B Decouple deploy from release (and kill-switch features) C Avoid testing D Reduce app size
Q33 To run a third-party trained model on iOS you typically: On-Device AI
A Call a cloud API B Convert it to Core ML with coremltools C Rewrite it in Swift by hand D Use UserDefaults
Q34 Which framework gives you on-device text embeddings for semantic search? On-Device AI
A Vision B Natural Language C StoreKit D WidgetKit
Q35 A home-screen widget's content is: SwiftUI
A A live, continuously updating view B Driven by a timeline of pre-rendered entries C A web view D Only static text
Q36 An app and its widget share stored data through: Data & Networking
A iCloud only B An App Group container C The pasteboard D A global variable
Q37 To respect Dynamic Type you should: SwiftUI
A Hard-code font sizes B Use semantic fonts and avoid clipping frames C Disable accessibility D Only support the default size
Q38 The Neural Engine's role is to: On-Device AI
A Store the Keychain B Accelerate ML inference efficiently C Render SwiftUI D Manage networking
Q39 For a dynamic number of concurrent child tasks you should use: Concurrency
A async let for each B A TaskGroup C DispatchQueue.concurrentPerform D Detached tasks in a loop
Q40 Task.detached is discouraged by default because it: Concurrency
A Is slower to start B Opts out of priority, task-locals, and parent cancellation C Can't be awaited D Only runs on the main actor
Q41 Blocking a cooperative-pool thread with synchronous I/O is bad because: Concurrency
A It uses more memory B It can starve the whole concurrency system C It changes the result D It disables actors
Q42 The Clean Architecture dependency rule says dependencies point: Architecture
A Outward to frameworks B Inward toward the domain C Both directions D Toward the database
Q43 Two feature modules need to navigate to each other. The clean fix is: Architecture
A Import each other directly B A shared router/interface they both depend on C A global singleton D Merge them into one module
Q44 Typed throws (Swift 6) let a function: Swift Language
A Throw without try B Declare the concrete error type it throws C Avoid error handling D Return optionals only
Q45 A 'hitch' refers to: Performance
A The main thread blocked for seconds B A single late/dropped frame in animation C A memory leak D A network timeout
Q46 App Attest is used to: Security
A Authenticate the user B Prove a request comes from a genuine, untampered app instance C Encrypt UserDefaults D Store passwords
Q47 Changing a view's .id(value) causes SwiftUI to: SwiftUI
A Reuse the same view and keep its @State B Tear down the old view and create a new one (state resets) C Throw a runtime error D Pause animations
Q48 Wrapping views in AnyView is discouraged because it: SwiftUI
A Crashes on iOS 17 B Erases type/structural identity and hurts diffing C Disables dark mode D Prevents using @State
Q49 A shared-element 'hero' transition between two views is built with: SwiftUI
A AnyView B matchedGeometryEffect + @Namespace C GeometryReader only D TimelineView
Q50 The recommended implicit-animation modifier is: SwiftUI
A .animation(_) with no value B .animation(_:value:) C withAnimation in body D UIView.animate
Q51 To animate a custom Shape's parameter, you implement: SwiftUI
A onAppear B Animatable / animatableData C a Timer D AnyView
Q52 For a custom flow/tag arrangement that stacks can't express, you use: SwiftUI
A Nested GeometryReaders B The Layout protocol C AnyView D drawingGroup
Q53 An app that is essentially a wrapper around your website is rejected under: App Store
A 2.1 App Completeness B 4.2 Minimum Functionality C 3.1.1 In-App Purchase D 2.3 Accurate Metadata
Q54 Unlocking digital content used in the app must use: App Store
A Any payment processor B Apple In-App Purchase (Guideline 3.1.1) C PayPal only D A web checkout you link to
Q55 An app that lets users create an account must also: App Store
A Offer a paid tier B Let users delete their account in-app C Require Face ID D Use SwiftData
Q56 If you offer Google/Facebook social login as a primary option, you must also offer: App Store
A A phone-number login B A privacy-protective equivalent (e.g. Sign in with Apple) C A CAPTCHA D Two-factor auth
Q57 Before accessing the IDFA / tracking across other companies' apps, you must: App Store
A Nothing — it's automatic B Show the App Tracking Transparency prompt and respect the choice C Email Apple D Add a privacy manifest only
Q58 A login-gated app submitted for review should include: App Store
A Nothing special B A working demo account / demo mode in review notes C Only screenshots D A signed NDA
Q59 In StoreKit 2, you should grant an entitlement only when the transaction is: App Store
A .pending B .verified (passes JWS verification) C .userCancelled D any result
Q60 The reliable source of truth for what a user currently owns on-device is: App Store
A A local boolean in UserDefaults B Transaction.currentEntitlements C The purchase() return value cached forever D The receipt file path
Q61 Swift macros run: Swift Language
A At runtime via reflection B At compile time on the syntax tree C Only in tests D On the server
Q62 @Observable and #Preview are, respectively: Swift Language
A Both freestanding B Attached and freestanding macros C Both attached D Property wrappers
Q63 A macro implementation depends on: Swift Language
A UIKit B swift-syntax, in a separate compiler-plugin target C the app's main target D Foundation only
Q64 A type-safe reference to a property like \Type.name is a: Swift Language
A Selector B KeyPath C Mirror D Macro
Q65 Mirror (reflection) is best described as: Swift Language
A Fast and writable B Read-only runtime introspection, best used sparingly C A macro D A property wrapper
Q66 The $ prefix on a property wrapper gives you its: Swift Language
A wrappedValue B projectedValue C memory address D KeyPath
Q67 A Home Screen widget's content is best described as: SwiftUI
A A continuously running live view B A timeline of pre-rendered entries the system shows over time C A web page D A background thread
Q68 Tapping a Button inside an iOS 17 interactive widget runs: SwiftUI
A Arbitrary code in the widget B An App Intent's perform() C A URL scheme only D Nothing
Q69 For UI that must change while visible on the Lock Screen / Dynamic Island, use: SwiftUI
A A widget timeline B A Live Activity (ActivityKit) C A background task D A push notification banner
Q70 In ActivityAttributes, the values you update over time live in: SwiftUI
A The static attributes B The nested ContentState C UserDefaults D The timeline
Q71 App Intents expose your app's actions to: SwiftUI
A Only the Shortcuts app B Siri, Shortcuts, Spotlight, widgets, and Controls C Only widgets D The App Store
Q72 To let an intent accept one of your model objects as a parameter, you implement: SwiftUI
A Codable only B AppEntity + EntityQuery C A property wrapper D A TimelineProvider
Q73 An icon-only button with no accessibilityLabel reads to VoiceOver as: SwiftUI
A Its SF Symbol name B Essentially nothing usable C The screen title D Button
Q74 Marking section titles with the .isHeader trait primarily helps users: SwiftUI
A See bigger text B Jump between sections via the Headings rotor C Get haptics D Skip the app
Q75 To support Dynamic Type, you should mainly: SwiftUI
A Hard-code point sizes B Use semantic fonts and avoid clipping frames C Disable scaling D Only support the default size
Q76 Conveying success/error with color only is a problem because: SwiftUI
A It's slower to render B It fails color-blind users / Differentiate Without Color C It breaks dark mode D It needs more memory
Q77 The minimum recommended touch-target size is about: SwiftUI
A 20×20 pt B 44×44 pt C 10×10 pt D 100×100 pt
Q78 In XCUITest you should query elements by: Testing
A accessibilityLabel (localized) B accessibilityIdentifier (stable, non-localized) C frame coordinates D view tag
Q79 In Swift Charts, you build a chart from: SwiftUI
A UIView subclasses B Marks (BarMark, LineMark, …) inside a Chart C Core Graphics calls D HTML
Q80 To color/stack a bar chart by category you use: SwiftUI
A .foregroundStyle(by: .value(...)) B a for loop of colors C ZStack D chartYScale
Q81 Bars can mislead if you don't set: SwiftUI
A A title B The y-scale domain (e.g. starting at 0) C A legend D Dark mode
Q82 iOS 17 tooltip selection is done with: SwiftUI
A A manual DragGesture + chartProxy only B chartXSelection bound to state C onTapGesture D GeometryReader
Q83 With a 50k-point time series you should: Performance
A Render every point B Aggregate/downsample to display resolution and scroll a window C Use AnyView D Disable the axis
Q84 A donut chart in Swift Charts uses: SwiftUI
A BarMark with rotation B SectorMark with innerRadius C PointMark D Canvas only
Q85 In the iOS 17 SwiftUI Map, you add pins with: SwiftUI
A MKMapView delegate methods B Marker / Annotation in a MapContentBuilder C UIView overlays D a ForEach of buttons
Q86 The blue user-location dot appears only when: SwiftUI
A Always B The user has granted location permission C Wi-Fi is on D You call MKDirections
Q87 As-you-type place suggestions use: Data & Networking
A CLGeocoder B MKLocalSearchCompleter C MKDirections D MapPolyline
Q88 Since iOS 14, a user may grant location that is: Security
A Always precise B Approximate (reduced accuracy) C Server-side only D Disabled for all apps
Q89 For low-power background location, prefer: Data & Networking
A Continuous startUpdatingLocation B Significant-change or region monitoring C A timer polling GPS D Reverse geocoding in a loop
Q90 A common App Review rejection around location is: Security
A Using MapKit at all B Requesting Always with a vague purpose string when When-In-Use suffices C Drawing a polyline D Showing a compass
Q91 Native WebSocket support comes from: Data & Networking
A URLSessionWebSocketTask B A third-party pod only C NSURLConnection D MKDirections
Q92 To process a server token/event stream incrementally, use: Data & Networking
A data(from:) and wait B URLSession.bytes(for:) and iterate lines C a Timer D downloadTask
Q93 Transfers that must continue when the app is suspended need a: Data & Networking
A default session B ephemeral session C background URLSession configuration D WebSocket
Q94 Certificate pinning is implemented via: Security
A Info.plist only B The URLSessionDelegate auth challenge C JSONDecoder D URLCache
Q95 An ETag enables the server to respond with: Data & Networking
A always 200 + body B 304 Not Modified (reuse cache) C a WebSocket D a redirect
Q96 On HTTP 429, the best first move is to: Data & Networking
A Retry immediately in a tight loop B Respect Retry-After / back off with jitter, idempotently C Crash D Switch to WebSockets
Q97 The device token for remote push is delivered to your app in: Data & Networking
A viewDidLoad B didRegisterForRemoteNotificationsWithDeviceToken C applicationDidBecomeActive D the push payload
Q98 The preferred way for a server to authenticate to APNs is: Data & Networking
A Username/password B Token-based auth with a .p8 key (signed JWT) C An API key in the URL D OAuth with Google
Q99 To modify or decrypt a push before it's shown (e.g. attach media), use: Data & Networking
A A content extension B A Notification Service Extension with mutable-content: 1 C A silent push D willPresent
Q100 A push with content-available: 1 and no alert is: Data & Networking
A A guaranteed background wake B A best-effort silent push the system may throttle C A critical alert D Invalid
Q101 An interruption level that breaks through Focus requires: Data & Networking
A Nothing special B time-sensitive (with justification) — or critical with an Apple entitlement C A louder sound file D A content extension
Q102 A dev build's push token works against: Data & Networking
A Production APNs B The sandbox APNs environment C Either, interchangeably D No APNs
Q103 Watch complications today are built with: SwiftUI
A ClockKit B WidgetKit accessory families C UIKit D SpriteKit
Q104 iPhone↔Watch communication uses: Data & Networking
A URLSession to Apple's servers B Watch Connectivity (WCSession) C AirDrop D iCloud only
Q105 A watch app can keep running in the background mainly during: SwiftUI
A Any time it wants B An HKWorkoutSession (workouts) C Scrolling D Charging
Q106 Primary input on visionOS is: SwiftUI
A A mouse cursor B Eyes + hands (look and pinch) C A game controller only D Keyboard
Q107 To call an iOS 17 API while supporting iOS 16, you use: Architecture
A #if os(iOS) B if #available(iOS 17, *) C a try/catch D @MainActor
Q108 The cleanest way to share logic across iOS/watchOS/macOS targets is: Architecture
A Copy-paste files B Shared Swift packages guarded with #if where needed C One giant target D Duplicate repos
Q109 A camera capture pipeline is built around: Data & Networking
A AVPlayer B AVCaptureSession (inputs → outputs) C PhotosPicker D URLSession
Q110 To let users pick photos WITHOUT any library permission, use: SwiftUI
A PHPhotoLibrary directly B PhotosPicker / PHPickerViewController C AVCaptureSession D a file importer
Q111 Using the camera requires: Security
A Nothing B NSCameraUsageDescription + runtime AVCaptureDevice.requestAccess C Only a background mode D Full photo library access
Q112 Background audio + Lock Screen controls require populating: Data & Networking
A URLCache B MPNowPlayingInfoCenter and handling MPRemoteCommandCenter C a widget D Core Data
Q113 For real-time effects and mixing multiple audio sources, use: Data & Networking
A AVAudioPlayer B AVAudioEngine (node graph) C AVPlayer D AVCapturePhotoOutput
Q114 When processing camera frames you should: Performance
A Retain every CMSampleBuffer B Work off the main thread and not hold sample buffers C Run on the main queue D Upscale each frame
Q115 To find out WHAT is mutating a variable, set a: Testing
A Symbolic breakpoint B Watchpoint on the variable C Conditional breakpoint on a line D Network instrument
Q116 You should profile performance on: Performance
A A Debug build in the simulator B A Release build on a real device C Any build, anywhere D Only CI
Q117 Memory that's still referenced but never freed (e.g. an unbounded cache) is best found with: Performance
A Leaks only B Allocations (abandoned memory) C Time Profiler D Energy log
Q118 A retain cycle is fastest to pinpoint with: Performance
A print statements B The Memory Graph Debugger C The view debugger D MetricKit
Q119 Function names in a production crash report require: Testing
A Nothing B The matching dSYM (symbolication) C A jailbroken device D Source uploaded to Apple
Q120 Which tool catches data races at runtime? Testing
A Address Sanitizer B Thread Sanitizer C Main Thread Checker D Time Profiler
Q121 What does the actual drawing/compositing for a UIView? UIKit
A The view's draw(rect:) only B Its backing CALayer C The main run loop D Auto Layout
Q122 A shadow without a shadowPath is expensive because it causes: Performance
A A retain cycle B Offscreen rendering C A data race D A memory leak
Q123 shouldRasterize is a win for: Performance
A Content that changes every frame B A complex but static layer (with correct rasterizationScale) C Solid color views D Text fields
Q124 A callback synchronized to each display refresh comes from: UIKit
A Timer B CADisplayLink C DispatchQueue.main.asyncAfter D URLSession
Q125 You'd reach for Metal directly when: Performance
A Building a standard list UI B Doing custom real-time GPU rendering / compute C Animating opacity D Rounding corners
Q126 Custom CADisplayLink animation on ProMotion should be: Performance
A Assumed to run at 60fps B Time-based using the frame delta, with a preferredFrameRateRange C Disabled D Run on a background thread
Q127 If HealthKit read access is denied, your app: Security
A Gets an error you can detect B Just sees no data (denial is indistinguishable from no data) C Crashes D Is rejected
Q128 For a daily step-count total you'd use: Data & Networking
A HKSampleQuery and sum manually B HKStatisticsCollectionQuery (interval aggregates) C HKObserverQuery D CMAltimeter
Q129 To be woken when new health data arrives in the background, use: Data & Networking
A A Timer B HKObserverQuery + enableBackgroundDelivery C URLSession D CMPedometer
Q130 In HomeKit, the on/off state of a bulb is a: Data & Networking
A Home B Accessory C Characteristic of a service D Trigger
Q131 For stable device orientation you should read: Data & Networking
A Raw accelerometer only B CMDeviceMotion (sensor-fused attitude/gravity) C CMPedometer D The magnetometer alone
Q132 Motion activity (walking/driving) classification requires: Security
A No permission B Motion & Fitness permission + NSMotionUsageDescription C Location Always D HealthKit
Q133 A CIImage represents: Data & Networking
A A decoded bitmap in memory B A lazy image recipe, rendered later by a CIContext C A UIView D A file on disk
Q134 You should create a CIContext: Performance
A Per image/frame B Once and reuse it C Never D On the main thread only
Q135 Chaining five CIFilters results in: Data & Networking
A Five intermediate bitmaps B One fused GPU pass when rendered C A crash D CPU-only processing
Q136 To show many large photos without blowing memory, you should: Performance
A Load full-res UIImages B Decode downsized thumbnails (ImageIO) at the display size C Use AnyView D Increase the cache
Q137 The modern way to render a UIImage off-screen is: Data & Networking
A UIGraphicsBeginImageContext B UIGraphicsImageRenderer C CIContext D drawRect
Q138 For face detection today you use: Data & Networking
A CIDetector B The Vision framework C Core Graphics D PencilKit
Q139 SpriteKit is the right tool for: SwiftUI
A A settings form B A 2D game with many sprites and physics C A REST client D A table of data
Q140 To make SpriteKit motion frame-rate independent, use: Performance
A A fixed pixel step per frame B The delta time passed to update(_:) C DispatchQueue D A Timer
Q141 In SpriteKit, to be notified when two bodies touch (without bouncing) you set: Performance
A collisionBitMask B contactTestBitMask + a contact delegate C zPosition D alpha
Q142 RealityKit is architected around: Performance
A MVC B An Entity-Component-System (ECS) C Storyboards D UIView hierarchy
Q143 In ARKit, the rendering vs tracking split is: Performance
A ARKit renders, RealityKit tracks B ARKit tracks/understands the scene; RealityKit renders C Both render D Neither tracks
Q144 To place an object where the user taps a real surface, use: Performance
A A random position B A raycast to a detected surface, then anchor there C CoreLocation D A timer
Q145 In Package.swift, a 'product' is: CI/CD & Tooling
A A test file B What consumers import (library/executable) C A build setting D A resource
Q146 Bundled package resources are accessed at runtime via: CI/CD & Tooling
A Bundle.main B Bundle.module C FileManager only D URLSession
Q147 What does a dependency rule of from: 1.2.0 allow? CI/CD & Tooling
A Exactly 1.2.0 B Up to the next major (SemVer-compatible) C Any version D The main branch
Q148 Local Swift packages mainly help by: Architecture
A Reducing app size B Enforcing module boundaries + parallel/cached builds C Encrypting code D Avoiding tests
Q149 Putting build settings in xcconfig files primarily: CI/CD & Tooling
A Speeds up the app at runtime B Externalizes them into versioned text (fewer .pbxproj conflicts) C Encrypts settings D Is required by SPM
Q150 A custom Run Script phase that runs on every build (even when nothing changed) is missing: CI/CD & Tooling
A A scheme B Declared input/output files C An xcconfig D A product
Q151 To let a user pick one contact WITHOUT a permission prompt, use: Data & Networking
A CNContactStore.requestAccess B CNContactPickerViewController C EKEventStore D MFMailComposeViewController
Q152 In iOS 17, an app that only adds calendar events should request: Security
A Full access B Write-only access to events C Reminders access D No API exists
Q153 Before presenting MFMailComposeViewController you must: Data & Networking
A Request contacts access B Check canSendMail() C Set a background mode D Use ShareLink
Q154 Why do the mail/message compose controllers need no special permission? Security
A They run in the background B The user must explicitly tap Send in system UI C They are encrypted D They use App Groups
Q155 Presenting UIActivityViewController on iPad requires: Data & Networking
A Nothing extra B Setting the popover sourceView/sourceItem C A share extension D Full-screen modal only
Q156 ShareLink can share any item that is: SwiftUI
A A String only B Transferable C a UIImage only D Codable
Q157 A user's own private CloudKit data is stored: Data & Networking
A On Apple's shared servers at your cost B In their iCloud, against their storage quota C On your backend D Only on device
Q158 To learn that CloudKit data changed without polling, use: Data & Networking
A A repeating Timer B A CKSubscription (silent push) + delta fetch C URLSession D NSUbiquitousKeyValueStore
Q159 Efficient incremental CloudKit sync relies on: Architecture
A Refetching all records each time B Server change tokens + custom record zones C A bigger cache D NSPredicate only
Q160 A CloudKit save failing with serverRecordChanged means you should: Architecture
A Give up B Merge with the server record and retry C Delete the record D Switch databases
Q161 For Core Data/SwiftData CloudKit mirroring, the model must have: Data & Networking
A Unique constraints on every entity B All attributes optional or with defaults, and no unique constraints C Only string fields D A custom server
Q162 Syncing a handful of small preferences across devices is best done with: Data & Networking
A A full CloudKit schema B NSUbiquitousKeyValueStore C A file in Documents D Keychain
Q163 In Combine, a publisher emits: Concurrency
A Exactly one value B A stream of values over time plus a completion C Only errors D UI views
Q164 To debounce a search field in Combine you use: Concurrency
A throttle then map B debounce(for:scheduler:) C combineLatest D zip
Q165 Which subject replays its latest value to new subscribers? Concurrency
A PassthroughSubject B CurrentValueSubject C Future D Empty
Q166 To deliver values on the main thread for UI updates, add: Concurrency
A subscribe(on: .main) B receive(on: DispatchQueue.main) C DispatchQueue.main.sync D @MainActor to the publisher
Q167 If you don't store the AnyCancellable from sink: Concurrency
A It runs forever B The subscription is cancelled immediately C It leaks D It crashes
Q168 A Combine publisher can be consumed with async/await via: Concurrency
A It can't B its .values AsyncSequence (for await) C Task.detached D sink only
Q169 To add one day to a Date you should: Swift Language
A Add 86400 seconds B Use Calendar.date(byAdding: .day, value: 1, to:) C Add 24*3600 as a Double D Reformat the string
Q170 The modern, locale-aware way to display a date is: Data & Networking
A A cached DateFormatter only B date.formatted(.dateTime...) C String(describing: date) D Manual MM/dd/yyyy
Q171 You should store/transmit timestamps as: Data & Networking
A A localized string B UTC in ISO 8601, applying time zone only at display C Local time without offset D Seconds in the user's calendar
Q172 Hardcoding a date pattern like MM/dd/yyyy or a $ currency prefix is wrong because: Data & Networking
A It's slower B It ignores the user's Locale (order, separators, currency, symbols) C It crashes D It needs more memory
Q173 Regenerable cached files should go in: Data & Networking
A Documents B Caches (or tmp), excluded from backup C the app bundle D UserDefaults
Q174 Swift's native Regex (5.7) advantage over NSRegularExpression is: Swift Language
A It's faster only B Literals + strongly-typed captures C It runs on the GPU D It needs no pattern
Q175 A delegate property should be declared weak to: Architecture
A Improve speed B Avoid a retain cycle C Allow multiple delegates D Enable KVO
Q176 The main downside of using singletons for your services is: Architecture
A They're slow B Hidden global dependencies that hurt testability C They use more memory D They can't hold state
Q177 Dependency injection primarily improves: Architecture
A Binary size B Testability and decoupling (inversion of control) C Launch time D Animation smoothness
Q178 Lifting navigation out of view controllers into a dedicated object is the: Architecture
A Repository pattern B Coordinator/Router pattern C Factory pattern D Adapter pattern
Q179 To make impossible states unrepresentable, model state as: Architecture
A Several Bool flags B An enum with associated values C A dictionary D Global variables
Q180 Wrapping a third-party SDK behind a protocol you own is the: Architecture
A Facade B Adapter pattern C Singleton D Observer
Q181 The biggest single lever on pre-main launch time is usually: Performance
A More threads B Fewer dynamic frameworks (less dyld work) C A bigger app icon D Disabling ARC
Q182 To keep launch fast you should: Performance
A Do all SDK init synchronously at launch B Defer non-essential work until after the first frame C Preload every screen D Parse large files in a static let
Q183 Launch prewarming means you should NOT assume: Performance
A dyld runs B process start == the user opened the app C the binary is loaded D main() runs
Q184 What lets the App Store deliver only the assets/architecture a device needs? CI/CD & Tooling
A On-Demand Resources B App slicing (via asset catalogs) C Dead-code stripping D Prewarming
Q185 To shrink the initial download by deferring optional content, use: CI/CD & Tooling
A Bigger asset catalogs B On-Demand Resources (tagged, downloaded later) C More frameworks D PNG instead of HEIC
Q186 Your true per-device download size is shown by: CI/CD & Tooling
A The .xcarchive size B The App Size Report in App Store Connect C The simulator D Finder
Q187 In SwiftUI, a string literal passed to Text(...) is: SwiftUI
A Always shown verbatim B A LocalizedStringKey looked up for translation C An error D Only English
Q188 The modern, auto-extracting localization format is: SwiftUI
A Localizable.strings only B String Catalogs (.xcstrings) C a plist D JSON
Q189 A sentence like You have 3 messages is best implemented with: SwiftUI
A String concatenation B A single format string with a plural variation C Three separate strings D A switch on count in the view
Q190 Format strings with two arguments should use: Data & Networking
A %@ and %d in fixed order B Positional specifiers %1$@ / %2$d C String addition D No arguments
Q191 For correct right-to-left mirroring you should use: SwiftUI
A left/right constraints B leading/trailing C fixed x offsets D absolute frames
Q192 Pseudolocalization helps you catch, before real translations: Testing
A Memory leaks B Hardcoded strings and truncation/clipping C Network errors D Retain cycles
Q193 To move focus between fields or dismiss the keyboard in SwiftUI, use: SwiftUI
A resignFirstResponder B @FocusState C a Timer D onAppear
Q194 To surface an SMS one-time code in the QuickType bar, set the field's: SwiftUI
A keyboardType = .numberPad only B textContentType = .oneTimeCode C isSecureTextEntry D submitLabel = .done
Q195 Keyboard avoidance in SwiftUI is: SwiftUI
A Always manual B Mostly automatic (manual via notifications in UIKit) C Impossible D Done with a Timer
Q196 Unhandled input/editing actions travel up the: UIKit
A View controller stack B Responder chain C Navigation stack D Run loop
Q197 To replace the system keyboard for a field with your own number pad, set: UIKit
A inputAccessoryView B the field's inputView C keyboardType D becomeFirstResponder
Q198 Reformatting text on every keystroke risks: SwiftUI
A Nothing B Cursor jumps and breaking IME composition (marked text) C A memory leak D A retain cycle
Q199 Adding a .mlpackage to an Xcode project gives you: On-Device AI
A A REST endpoint B A generated, strongly-typed Swift model class C Nothing until runtime download D A Python script
Q200 To run many inferences efficiently you should: On-Device AI
A Loop single prediction() calls B Use batch predictions(from:) C Recreate the model each time D Force cpuOnly
Q201 A model runs partly on CPU even with .all because: On-Device AI
A computeUnits is ignored B Not every op is Neural Engine-compatible (fallback to GPU/CPU) C The ANE is disabled by default D Core ML never uses the ANE
Q202 Fine-tuning a model on the user's own data, privately, uses: On-Device AI
A A server B Updatable models / MLUpdateTask on device C coremltools at runtime D Create ML in the cloud
Q203 To shrink a Core ML model you'd use coremltools to: On-Device AI
A Add layers B Quantize / palettize / prune the weights C Convert to JSON D Increase precision
Q204 Running an image classification Core ML model is easiest with: On-Device AI
A Manual CVPixelBuffer resizing B Vision's VNCoreMLRequest (handles preprocessing) C Metal shaders D URLSession
Q205 In Swift Testing, the macro that stops the test and can unwrap an optional is: Testing
A #expect B #require C XCTAssert D #available
Q206 Running one test body over many inputs uses: Testing
A A for loop in the test B @Test(arguments:) parameterized tests C Multiple suites D Snapshot tests
Q207 The TDD cycle is: Testing
A Write code, then tests, then ship B Red → Green → Refactor C Refactor → test → code D Test only at the end
Q208 The cleanest way to mock a dependency in Swift is: Testing
A A heavy mocking framework B Depend on a protocol and inject a fake/spy struct C Subclass and override randomly D Use a singleton
Q209 UI tests should locate elements by: Testing
A Screen coordinates B accessibilityIdentifier C Localized label text D View tag
Q210 A common cause of flaky tests is: Testing
A Too many assertions B Fixed sleeps / shared state / real network C Using #expect D Small test units
Q211 SwiftUI drag and drop for your own typed payload uses: SwiftUI
A .onDrag with a string B .draggable + .dropDestination on a Transferable type C UIDragInteraction D onTapGesture
Q212 To reorder rows in a List you add: SwiftUI
A .onMove (with edit mode / drag) B .onDelete C .refreshable D .searchable
Q213 The currency for exchanging drag/drop data is: UIKit
A UIView B NSItemProvider (advertising UTTypes) C Data only D JSON
Q214 As the user hovers a drag over a UIKit target, the delegate returns a: UIKit
A Bool only B UIDropProposal (copy/move/forbidden) C UIView D UTType
Q215 Loading dropped data is asynchronous because: SwiftUI
A It's encrypted B Items can be large or generated on demand (possibly cross-app) C SwiftUI requires it D Drops always fail first
Q216 Good drag-and-drop UX should: SwiftUI
A Be the only way to do the action B Be an accelerator with an explicit alternative C Hide all other affordances D Require precise dragging
Q217 some P (opaque) differs from any P (existential) in that some P: Swift Language
A Holds any type at runtime B Is one fixed underlying type, enabling specialization C Always heap-allocates D Can't be returned
Q218 A protocol with an associatedtype historically couldn't be used as: Swift Language
A A generic constraint B A bare existential type directly C A return type via some D An extension target
Q219 some Collection<Int> (Swift 5.7) is enabled by: Swift Language
A Type erasure B Primary associated types C Phantom types D @inlinable
Q220 Array is Equatable only when its Element is — this is: Swift Language
A Type erasure B Conditional conformance C A phantom type D Specialization
Q221 A generic parameter used only for compile-time tagging (no stored value) is a: Swift Language
A Existential B Phantom type C Opaque type D Associated type
Q222 In a hot path, prefer generics over `any` existentials because generics: Swift Language
A Are easier to read B Can be specialized/inlined (no dynamic dispatch) C Use less code D Avoid protocols
Q223 The single most important decision for an offline-first app is: Architecture
A Use the newest API B Make the local store the source of truth C Cache nothing D Sync synchronously on tap
Q224 A smooth image-heavy feed depends most on: Architecture
A Bigger images B Off-main downsampling + caching + stable identity + lazy lists C AnyView D More view models
Q225 Modeling checkout as a state machine helps by: Architecture
A Reducing app size B Making steps and failure states explicit and testable C Avoiding StoreKit D Skipping verification
Q226 Cross-feature navigation in a modular app without import cycles uses: Architecture
A Features importing each other B A router + interface modules C Singletons D Global notifications only
Q227 The recommended way to migrate UIKit → SwiftUI is: Architecture
A A full rewrite B Incrementally, bridging with hosting/representable C Never D Only new apps
Q228 You should add an extra layer or protocol when: Architecture
A Always, up front B A second implementation or a test actually needs it C Never D The file gets long
Q229 UIKit's responder chain, where an unhandled touch event walks from view → view controller → window → app, is an example of which pattern? Architecture
A Command B Chain of Responsibility C Mediator D Visitor
Q230 Why do Swift value types make the Memento pattern nearly free compared to reference types? Architecture
A Structs can't be mutated B Copying a struct is already a safe, independent snapshot; no deep-copy code is needed C Memento requires classes D Swift has no undo support
Q231 XCTestCase's setUp() → test → tearDown() sequence, where the framework calls a fixed order of steps and you fill in the pieces, is the: Architecture
A Strategy pattern B Template Method pattern C Observer pattern D Proxy pattern
Q232 A repository that serves cached responses when fresh and only calls the network when stale, all behind the same protocol callers already use, is best described as a: Architecture
A Factory B Proxy C Composite D Command
Q233 Reaching for a full Visitor pattern instead of switch-on-enum makes the most sense when: Architecture
A The enum has few cases B You're walking a class hierarchy you don't own and need type-safe dispatch without casts C You want less code D Swift enums can't be exhaustively switched
Q234 In Clean Architecture applied to SwiftUI, the dependency rule means: Architecture
A The Data layer can import SwiftUI views directly B Outer layers (Presentation) depend on inner layers (Domain), never the reverse C All layers depend on each other equally D Interactors depend on concrete network types
Q235 The key difference between an Interactor and a typical MVVM ViewModel is: Architecture
A Interactors are faster B An Interactor is stateless and writes results into shared AppState rather than owning its own @Published state C ViewModels can't call repositories D Interactors only run on a background thread
Q236 Injecting a DIContainer via the SwiftUI Environment instead of a global singleton mainly buys you: Architecture
A Faster app launch B The ability to substitute mock dependencies for a scoped subtree in previews and tests C Automatic Codable conformance D Smaller binary size
Q237 The main trade-off of full Clean Architecture ceremony (a protocol + interactor + DI entry for every repository) is: Architecture
A It's always strictly better regardless of app size B It buys testability/consistency at large scale but is often more indirection than a small app needs C It removes the need for any tests D It's required by Apple for App Store approval
Q238 The fastest way to understand a large unfamiliar codebase's architecture is to: Architecture
A Read every file in alphabetical order B Start at the README, entry point, folder structure, composition root, and tests C Only read the view controllers D Search for TODO comments
Q239 A five-screen portfolio app wrapped in full Clean Architecture with a custom DI container most likely signals to an interviewer: Architecture
A Senior-level architectural judgment B Over-engineering relative to the app's actual complexity C Strong SwiftUI performance skills D Nothing — architecture choice is never evaluated
Q240 Before adding a third-party SPM package, the most important non-functional check is: Architecture
A Its total download count B Maintenance signal (recent commits/releases), license, and concurrency-readiness C Whether it has a logo D Whether it's written entirely in Swift