A guide on separating API models from domain models in SwiftUI apps using the Data Transfer Object (DTO) pattern. Covers creating a UserDTO with Codable conformance, handling snake_case JSON keys via CodingKeys, and using a dedicated mapper to convert between DTOs and domain models rather than using API models directly in the app.

2m watch time

Sort: