← iOS Development (Swift) learning pathiOS Development (Swift) · Module 9 of 10
Storage and device features
Persist data and use device capabilities.
📖 Key ideas
- UserDefaults (and @AppStorage) for small settings.
- SwiftData (iOS 17+) or Core Data for structured local data.
- Keychain for passwords and tokens.
- Camera, photos, location need Info.plist usage descriptions and permission.
- Push notifications via APNs.
💡 Real-life example: Keychain is a bank locker for secrets; UserDefaults is a notebook for preferences.
UserDefaultsSmall key-value storage
SwiftDataModern persistence framework
KeychainSecure credential storage
APNsApple Push Notification service