Skip to content

bolteu/iOS-interview-assessment-3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assessment

Task

The project contains a working character browser that loads data from the Rick and Morty API. The current implementation lives inside a single massive ViewController.swift.

Your job is to refactor this code so it is production-ready.

The app must continue to work after your changes — pagination, caching, image loading, and date formatting should all remain functional.

This is how the app currently behaves, and this behavior must stay the same after refactoring:

  1. On launch, a list of characters loads and displays in a table view
  2. Each cell shows: avatar image, name, status with a colored indicator, species, and a formatted creation date (e.g. "Nov 4, 2017")
  3. Scrolling to the bottom automatically loads the next page of characters
  4. Previously loaded data is available from cache on subsequent launches (even before the network responds)
  5. If a network request fails, the user sees an error and can retry

Notes

  • You can use any tools and any libraries (even Google), but no AI-assisted tools

Time

60 minutes

Expectations

The final solution should demonstrate:

  • Separation of concerns — extract business logic out of ViewController into a ViewModel (or equivalent), keep the view controller focused on UI only
  • Dedicated networking layer — isolate API calls behind a protocol-based service so the live API can be swapped for a mock without touching the UI
  • Clear state management — loading / loaded / error / empty states are explicit and easy to reason about
  • Working app — the app must compile and behave exactly as originally designed

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages