iOS Interview Questions for Beginners and Experienced Developers -Part 1
Tags: Swift Programming, iOS, Coding, Swift, Interview

iOS Interview Questions for Beginners and Experienced Developers -Part 1 Codecat15 Follow Dec 3 · 4 min read

Photo by fauxels from Pexels

Preparing for interviews has always been a stressful task as we are not very sure what to expect, in this blog post we will explore a few of the commonly asked interview questions.

I have divided the section into three levels based on developer experience, however, I would advise going through all the levels to be best prepared for your interviews.

Once you have completed part 1, you may check out part 2 of the interview questions by clicking here

Wishing you all the best for your next interview round.

Level: Easy

What are value types and reference type in Swift and When to use them? Why does apple prefer to use Value types by default? What’s wrong with using a reference type? Why do we use the mutating keyword? What is the difference between Array and Set? What’s the difference between atomic and non-atomic Explain failiable init? Explain convenience init? What’s a closure? Explain trailing closures? Difference between strong and weak keyword? And when to use them? Explain memory management (ARC) in Swift Explain MVC along with 3 pros and cons Explain the difference between MVC and MVVM Explain pros and cons of MVVM What is API? OR Have you used URLSession class? What does it do? Explain the difference between property wrappers and property observers? Explain the iOS life cycle and 3 delegate method of the AppDelegate What is a protocol and what are the benefits of using a protocol? How to pass data from one view controller to another?

Level: Intermediate

Explain delegate pattern in swift and how will you implement them? What’s the difference between KVO and Delegate? What’s the difference between KVC and KVO? Explain singleton class and the when to use them along with drawbacks of using singleton class What’s the difference between protocol extension and optional protocol? What do you use for fetching records from API and why?

Suggestion: It’s best here not to answer things like “ I am using XYZ because my senior told me to do so” OR “We use ABC because it was already there in the project”. Please answer with more technical reasons than such reasons. When to use guard vs if let in your code? What’s the difference between frames and bounds? Explain serial and concurrent queues? What is SceneDelegate and How is it different from an AppDelegate? Difference between copy and retain Difference between GCD and NSOperation What is REST API? What’s the difference between POST and PUT What’s the most challenging task you faced in your last project and how did you solve it? What value am I adding to the code if I am using protocols?

Level: Pro

Have you ever setup any CI/CD pipeline? If yes then explain the process for a new iOS application? How do you store sensitive information in your app? How do you measure performance of your application? OR your code? What architecture have you used for your last project and why? How will you store records in offline mode and push them back to server? (A suggestion here is to start with a question to the interviewer “I would like to know the details of the application first because there are many ways in which you can do this but different application have different complexities to handle and hence the solution should be based on what the application is trying to achieve when those records are pushed to the server”) Suppose there are 10 threads trying to access the database at the same time for the same table, how will you make sure that a deadlock never occurs in such case. We have an iOS app which we would like to port now in SwiftUI, what will be your strategy? When will you use weak vs unowned in your code? How do you decide when a MVC based project should be shifted to MVVM?

Suggestion: Please do not mention the benefits of MVVM here, try to analyze the project requirements and then answer it.

Mostly a project is hard to maintain because of zero good programming disciplines being followed and the solution can be to implement good programming disciplines than going for a complete re-structure which will be a time consuming process What will be the benefit of switching to RxSwift for a project who is already using MVVM and follows test driven development? What are decomposition techniques that you use in your project? Explain the benefits of Test driven development? What are your parameters of project estimation? How do you estimate a complex module?

Suggestion: Project estimation is based on looking at different complexities the project handles like database, push notification etc, sometimes there are some complex modules which would need you to do some POC i.e. proof of concept work so analyze such pain points which could turn out to be possible impediments for the project also do not forget to include some hours to write unit and integration test for your code) I want to display a PDF in the view from JSON data coming from the server, I don’t want to use any open source library for this or any paid library, how will you achieve this functionality?

I hope all these questions help you out in your interview, in the coming days maybe I will update few of the level with answers as well but for now I hope these questions are helpful for you to achieve your goal.

If you like these questions then please do share it with any of your friends preparing for the interview.

All the best :)