iOS persistence interview questions
Choosing storage, UserDefaults, Keychain, Core Data, SwiftData, files, migrations and safe data cleanup.
– interview-ready · 10 questions in this topic
– of 10 tried
Saved on this device. Interview-ready means you got it right on two different days. Guesses and hints count for less.
Questions
- Choosing the right storagePick the fix
- Using UserDefaults correctlyPick the fix
- Storing secrets in the KeychainFill the blank
- The Core Data stackOrder the steps
- Core Data and threadingPick the fix
- SwiftDataFill the blank
- Reading and writing filesPick the fix
- Rolling out a breaking schema changeOrder the steps
- Feature flags that change stored dataPick the fix
- What to remove on logoutPick the fix
Practise this topic
Flashcards · 14
Flip, then say if you knew it. Needs JavaScript; every answer is also on its question page.
Quick quiz · 10 questions
One exercise per question, checked as you go. Needs JavaScript.
Mock interview · 2 sets
Timed, out loud, then tick what you covered. Needs JavaScript.
Quick facts
Recall the answer first, then tap Show to check.
NSUbiquitousKeyValueStore
Syncs small key-value data through iCloud, up to 1 MB and 1,024 keys.
@AppStorage
A SwiftUI property wrapper over UserDefaults that updates views when the value changes.
Keychain persistence
Keychain items can survive deleting the app, so don't rely on deletion to clear them.
NSFetchedResultsController
Watches a Core Data fetch and reports changes for driving lists.
Printable cheat sheet · Review your weak spots in this topic