Daily iOS
Architecture

Modularizing a file list feature

You're designing an iOS file and folder list feature with search and pull-to-refresh. To keep it maintainable independent of the UI framework, what module boundaries would you draw between the list, search, and refresh state and the data access?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

A FileListFeature module that knows neither UIKit nor SwiftUI holds a reducer with the list, the query, and the loading phase as one state value, and remote list and local cache access hide behind a FileRepository protocol so the Feature never sees URLSession or SwiftData directly.

Share a question