Mock-API has become essential in modern iOS Development. This article will explain how we organized our codebase to work with fake JSON files at BiTaksi.

Demonstration of a single mock API. Seriously, this fast!!

In the end:

  • You will have a client-side API layer that responds with any JSON response you specified for the exact URLs that you use in your code.
  • This means you won’t have to change a single line in your actual files!
  • And more importantly, this layer will not be delivered in production binary
  • You will just add a JSON file of the response, edit it just a little bit with mock instructions, and mock…


Photo by cottonbro from Pexels

You have just started coding your brand new iOS project. You chose one of the popular architectures like MVVM, MVP, or VIPER. You have set up the basic structure of your project and everything was working perfectly fine until you needed to use UITableView at some point. “Where should I register my table cells?”. “Which place is more suitable to populate cells?”. “Is it ViewModel’s responsibility to create cells for the TableView?”. If you are asking similar questions or just curious to hear about a different approach to handle UITableView methods, I might have a solution for you

Before starting…

Feridun ERBAŞ

Senior iOS Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store