Implement API in iOS Developing with Mockoon Before The Real API is Ready

Satrio Wicaksono
2 min readAug 29, 2020

iOS Developing is a part of the working frontend team in a project. We as frontend teams need an API to make our app works with integration data properly. Without backend has not created API for us, we do nothing and only prepare screens by screens in our app with unworthy interaction users.

Commonly in the project, there is a team with the responsibility to design the response API which will be followed by backend team and it will be consumed by frontend later. It’s the part I would share with all of you as frontend teams especially iOS Developer. There is a hacky way or tuning your working on development when you got the standard design of response from API even though API has not been ready for us.

We can start early to implement the API with the complying standard design of the response we got by Mockoon. Mockoon is a tool to help us creating the dummy response as our machine is a fake API server. Actually, there are several kinds of tools like Mockoon did. But I would introduce this tool due to I already used it in currently my project. You can take a look at https://mockoon.com as the official link to learn of it further

Mockoon

You can try to implement the API through Mockoon. Implement the response API with set a JSON format on Mockoon as the dummy response. Set the HTTP Method of API whether POST, PUT, GET and etc, set the path of your API, set HTTP status whether 200, 300, 400, or 500 as simulating get status of the response to handling error or success response. Moreover, Mockoon provided the feature to simulate how long the API will give a response in case we need to implement timeout logic handling when we are calling the API.

After I introduced it, hopefully, we can be easier to implement API in our project before real API is ready. So after we implemented API through Mockoon, perhaps when backend has created the real API one, we only repoint base URL where the real API base URL suppose to be. Happy coding!

--

--