Daily iOS
Networking

Fetching, sorting, and showing a JSON list (live coding)

This is a senior iOS virtual onsite, live coding. You have to build, without searching, an app that fetches a list of content from a public JSON API, parses it, and shows it sorted by title or by date. With the sort requirement, what do you have to pay special attention to about the sort key's type and string comparison?

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

Decode dates as Date, not String (dateDecodingStrategy), and compare those; compare titles with localizedStandardCompare so case, numbers, and locale are handled.

Share a question