Use Foundation correctly in modern Swift — Codable encoding/decoding with JSONEncoder/JSONDecoder, dates with Date/Calendar and the FormatStyle API, files and paths with URL/FileManager, UserDefaults, Measurement/units, and Data, typed NotificationCenter messages, and #bundle. Use when parsing or producing JSON, formatting dates/numbers/currency, reading or writing files, persisting small key-value settings, or working with URLs on any Apple platform (iOS 26+, macOS 26+, watchOS 26+).