Octopus iOS Technical Challenge

A lite search app that allows users to search for an cats gifs and images.

Implementation & Architecture

This task was implemented using Swift and UIKit. The app follows an MVVM-C architecture leveraging protocols and extensions to adhere to the SOLID principles.
The app also makes use of other design patterns such as the view factory pattern to properly intiate view controllers as well as coordinators that manage navigation within the app.

The app’s networking layer communicates with the The Cat API (https://docs.thecatapi.com), to cats images and gifs.

Unit Tests

This task does not contain any unit tests as there isn’t much business or navigation logic. Potentially there are small things that can be tested such as the cats’ category filtering. This filtering along with the catImageViews() could be moved to a separate helper file to allow for testing as they are currently private and inaccessible for testing.

The architecture allows us to easily mock objects such as the networking service layer (thanks to protocols and dependency injection) for testing. With a more complex app that can contain navigation logic, unit tests can be written for the coordinators to check if the correct screens are being presented.


View Github