Skip to content
This repository was archived by the owner on Nov 28, 2023. It is now read-only.

DevComments

Vasyl Liutikov edited this page Feb 7, 2018 · 2 revisions

In this repo you could find a project that required task. I paid attention to network staff and fewer details to UI parts. So I hid all networking staff to frameworks (it could be converted to a pod and used in local spec repo) and the app doesn't know how it works, only API provided by the framework. It could be useful for future development when core team work with framework and UI team could work in same time without big issues.

The app required GitHub user so, please, login after the first launch.

Network

By default, most API endpoints work without authentication, but user's email available only for the authenticated user. I used basic auth, but it could be replaced by another implementation UserAdapter. User's registration date available only in user details endpoint, so after loading users' list, I did load user details. Very ofter iOS users use the mobile network, so I added loading only for visible users and prefetch for next possible visible users (UITableViewDataSourcePrefetching API available in modern iOS systems). Also, the app has user' cache with TTL about 30 days.

SearchTerms is a very powerful structure for a search query. I added extra inits witch allow customize user search.

UI

I didn't spend much time on this part and used standard UISplitViewController. Also, the user' list has an index for faster navigation between users. And yes, usernames are ordered by name. I do reorder for all users after the app fetched new users. Differ sometimes provides animation lag, I checked Dwifft and it has +- the same result. I didn't

PS. The project has swiftlint. I didn't add HockeySdk and fastline because they don't any sense in this project.

Clone this wiki locally