Acing the iOS System Design Interviews

Hello again! 🙋🏻♂️
Hope you are doing well. I am well too :)
In this post, I am going to demystify the myth that System Design interviews are tough. Nothing is tough or easy. Moreover it is a common perception that when our brain sees something new, where it requires for you to get out of your comfort, it makes that task feel tough. But once you do it for a few times, it automatically becomes easy.
Now that might look like a normal thing. But we mostly do not realise that it is. Hence I want you to look at the System Design interviews the same way. It’s just that you need to try it couple of times, and eventually you will feel that it is easier than you thought.
Ok now I don’t want to beat around the bush. Let’s jump into the topic. For anyone reading this, please note that this post is applicable for iOS interviews specifically. Hence the title :)
What is System Design?
System Design is a generic term used to design any end to end system. It involves the design decisions on what tools and architectures will you use for the system in hand. The choice of client-side tools, server-side tools and the APIs to connect the two, everything comes under System Design.
But System Design in the context of iOS interviews is a little different. It involves mostly the front-end part + the APIs. Might involve minimal database design as well.
Why do companies have this as part of the interview process?
Companies want to assess candidates based on their ability to take design decisions when it comes to designing their softwares. A candidate who knows the difference between available options and knows what to use when, can definitely build a more optimised, maintainable system.
What kind of questions to expect?
Specifically for iOS, you will be expected to design any of the famous iOS apps. Example, Instagram/Facebook feed, TikTok, Twitter, Uber etc. It can be any existing or non existing app as well. Sometimes companies ask you to design their own existing application. Note that however, the questions are open ended. There is no right or wrong answer.
How to approach the solution?
We’ll take an example of Instagram feed design and go step by step.
- The interviewer will have some expectations in mind. Ask them! Before you start explaining the design, ask clarifying questions to the interviewer and get to know the requirements and edge cases correctly.
Ex: Do you want me to design the comment functionality as well? Should we include the Stories? etc. - Then ask where would he want you to start. Usually they’ll ask you to start with the UX and then go deep into the technical architectural design. But if they are not interested in UX, you can start with the client architecture. Explain them what you’ll use MVC, MVVM, VIPER etc. And where you will keep what files/functionalities.
Ex: What comes in FeedViewController, FeedViewModel, Routers, Network Manager etc. - Whenever you make a decision to use something, be clear on why you are choosing it as opposed to the alternatives. Remember, the ‘Why’ part is the most important.
Ex: I will use delegation to notify the VC about tap of the Like button inside each cell. Reason: It’s a one to one pattern and that’s what we need here. - Usually, the interviewer will ask you questions and will drive the interview the way he/she wants. It is more like a discussion rather than a one way interaction.
Ex: Could you explain me the database schema that you will use for this problem? - Eventually, you will need to also explain the API’s you would like to use to communicate with the server.
Ex: /fetch/feed (GET), /like (PUT), /share/link (GET) and their request response.
Few points before we wrap-up:
- Some interviewers expect you to use a whiteboard to document your design in a clear, modular way.
- Some would want you to write your APIs, databases and file names etc on a normal document.
- Do note that this is just a general outline, based on my personal experience. Hence anything apart from this, you can refer the resources section for a broader view.
That’s it! No big stuff.
The interviewer will ask you to stop once he is satisfied. And give you some feedback. If he doesn’t, ask for it. Because you don’t want to repeat your mistakes, if any.🙃
Don’t forget to 👏🏻 and support if you like my posts. All the best and happy Learning 🧑🏻💻
Feel free to checkout these additional resources for your upcoming interviews:
- Mock interviews https://www.youtube.com/playlist?list=PLrtCHHeadkHptUb0gduz9pxLgvtKWznKj
- Tips https://www.youtube.com/channel/UCRPMAqdtSgd0Ipeef7iFsKw
- Mobile System Design Articles:
https://themobileinterview.com/cracking-the-mobile-system-design-interview/
https://artem-goncharov.medium.com/grokking-the-mobile-system-design-interview-6a06fa94491b