Interview Questions

Here are some of the most common questions you'll be asked during job interviews, along with detailed responses for how I would answer each one. You can work through them one by one if you want, or just pick out specific topics that interest you. Either way, I recommend you start with the introduction video to get a summary before diving in further.

Openers

Good interviewers usually start with a handful of open-ended questions to help you relax, and to get a better idea of which areas deserve more detailed questioning.

Interview questions: Introduction

3:54

1. Interview questions: Introduction

Getting ready for a job interview is tough work, so I’ve prepared a whole bunch of common questions and answers to help give you a jump start. But before you get into them, let me explain the plan in more detail…

What features of recent iOS versions were you most excited to try?

2:03

2. What features of recent iOS versions were you most excited to try?

To get right to the point, if none of SwiftUI, Swift Charts, widgets, or SF Symbols interest you, you might be in the wrong career.

Can you talk me through some interesting code you wrote recently?

1:39

3. Can you talk me through some interesting code you wrote recently?

If I could make one question required in all iOS developer job interviews, it would be this one, because it’s a fantastic way to help folks relax, and lets them cherry pick whatever code they think will be most of interest.

What do you think is a sensible minimum iOS deployment target?

2:44

4. What do you think is a sensible minimum iOS deployment target?

You can go for a simple “current version minus 1” answer here, but it won’t do you much good – talk about specific features you care about, or perhaps even specific bugs that got fixed.

Do you have any favorite Swift newsletters or websites you read often?

1:40

5. Do you have any favorite Swift newsletters or websites you read often?

This question is really two separate things in one: are you the kind of person who actively keeps learning about what’s happening in Swift, and do you try to be part of the community?

How do you stay up to date with changes in Swift?

1:59

6. How do you stay up to date with changes in Swift?

This is particularly important in the world of Apple development because all their major operating systems change every year, Swift sees significant changes two or three times a year, and new devices are shipping regularly.

What open source projects have you contributed to?

1:54

7. What open source projects have you contributed to?

This question comes up a lot, but I’m always wary of it because it places a lot of emphasis on unpaid work out of hours, which particularly affects people who already have extra responsibilities caring for children or elders.

What process do you take to perform code review?

2:10

8. What process do you take to perform code review?

This sounds like it ought to be straightforward, but usually there’s an ulterior motive here: are you able to work well as part of a team?

Have you ever filed bugs with Apple? Can you walk me through some?

1:54

9. Have you ever filed bugs with Apple? Can you walk me through some?

This is another one of my favorite questions to ask folks, because it’s a subtle way to gauge a number of things at the same time without sounding aggressive – after all, it’s Apple’s bugs we’re talking about, rather than the interviewee’s!

Language

These questions focus on the core Swift language, rather than any additional frameworks.

What are the main differences between classes and structs in Swift?

3:56

1. What are the main differences between classes and structs in Swift?

This seems like a simple question, but a truly great answer means not only knowing the differences, but also knowing why they matter – anyone can remember a bunch of bullet points, but it takes more thought to explain what it all means in practice.

What is the difference between an array and a set?

2:20

2. What is the difference between an array and a set?

A great answer here needs to follow the same pattern you’ll seen in other questions: give a specific, technical answer first, then move up to discuss how this affects the kind of code we write.

What is the difference between the Float, Double, and CGFloat data types?

3:36

3. What is the difference between the Float, Double, and CGFloat data types?

This question is partly technical, partly about keeping up with Swift, and partly about application, and and I suggest you tackle it in that order.

When using arrays, what’s the difference between map() and compactMap()?

2:33

4. When using arrays, what’s the difference between map() and compactMap()?

This question is really trying to get a grip on your knowledge of functional programming, without getting into the murkier territory of functors, monads, and category theory.

What are property observers?

1:50

5. What are property observers?

The technical answer here feels a bit like Swift 101, but as with so many good answers the real value comes when you’re able to describe places where you use them and where they can cause problems.

What does the final keyword do, and why would you want to use it?

2:59

6. What does the final keyword do, and why would you want to use it?

This is crying out for an example, so once you get the basic answer out of the way back it up with some actual code example where final is the right choice.

What is the difference between weak and unowned?

1:36

7. What is the difference between weak and unowned?

Broken record alert: explain the fundamental technical difference between the two, try to provide an opinion on which you think works better, then provide some kinds of examples of where each might work well.

What problem does optional chaining solve?

2:01

8. What problem does optional chaining solve?

Swift’s optionals are a real power feature of the language, but without direct compiler support they would be quite onerous. Optional chaining is one part of that support, so be prepared to answer exactly what part it plays.

Apart from the built-in ones, can you give an example of property wrappers?

2:17

9. Apart from the built-in ones, can you give an example of property wrappers?

Anyone with even a modicum of SwiftUI experience can name things like @State and @ObservedObject, but this question specifically asks you not to mention the built-in ones so this is more about thinking what property wrappers actually add to our projects.

What are generics and why are they useful?

2:22

10. What are generics and why are they useful?

This is the kind of question that helps distinguish between junior developers and intermediate developers, so take your time to answer it and if possible leverage your full range of knowledge to explain any extra details.

Frameworks

The questions here test your knowledge about using popular Apple frameworks, including SwiftUI and UIKit.

What are the advantages and disadvantages of SwiftUI compared to UIKit?

2:27

1. What are the advantages and disadvantages of SwiftUI compared to UIKit?

This is another example of a question where exclusively picking one over the other makes you look inexperienced – software development is often fuzzy, and acknowledging that complexity is a mark of experience rather than a weakness.

What is UserDefaults good for? What is UserDefaults not good for?

2:17

2. What is UserDefaults good for? What is UserDefaults not good for?

UserDefaults is the simplest way of storing user data, which makes it appealing for beginners, but also useful for even experienced developers who need a sensible place to stash away user preferences. However, it has downsides, and it’s important you’re familiar with them if you want to answer this question well.

What is the purpose of size classes?

2:04

3. What is the purpose of size classes?

Whether you use UIKit or SwiftUI, size classes are Apple’s broad-stroked approach to providing information about the available space for our UI.

What is the purpose of NotificationCenter?

2:09

4. What is the purpose of NotificationCenter?

Apple’s NotificationCenter class implements the observer pattern from the Gang of Four book on design patterns, allowing any number of objects be notified when a specific event happens. But to answer this question well, you need to go beyond theory and focus on when it’s actually used.

What does the @Published property wrapper do?

1:52

5. What does the @Published property wrapper do?

A great answer should introduce property wrappers, then explain what @Published does, give some examples, compare it against @State, then bring in any extra real-world knowledge you can add around nuances or complexities.

How can an observable object announce changes to SwiftUI?

2:54

6. How can an observable object announce changes to SwiftUI?

Getting observable objects right is one of the keys to having a smooth experience with SwiftUI, but getting them wrong is a sure-fire recipe for massive performance problems no matter what platform you’re writing for.

How does CloudKit differ from Core Data?

1:49

7. How does CloudKit differ from Core Data?

Although Apple has done a great deal of work to bring these two powerhouse frameworks closer together, they still fundamentally work in entirely different ways, and providing a good comparison might take more thought than you expect.

Architecture

Here we'll explore bigger questions about the kinds of larger choices you'll make when planning your app design.

Can you explain MVVM, and how it might be used on Apple's platforms?

2:38

1. Can you explain MVVM, and how it might be used on Apple's platforms?

As with so many good interview answers, you should aim to provide a succinct summary first, then expand on your answer with some specifics and examples, and finally get into more nuanced territory based on your real-world experiences.

How would you explain dependency injection to a junior developer?

2:46

2. How would you explain dependency injection to a junior developer?

There’s a quote from James Shore that I absolutely love, and I always start with it when introducing this concept to folks: “Dependency injection is a 25-dollar term for a 5-cent concept.”

How would you explain protocol-oriented programming to a new Swift developer?

2:12

3. How would you explain protocol-oriented programming to a new Swift developer?

Try to resist the temptation to get sucked into hype when answering this question: focus on the facts, compare POP with OOP as clearly as you can, then try to bring in some relevant real-world experiences that you have.

Can you give some examples of where singletons might be a good idea?

2:23

4. Can you give some examples of where singletons might be a good idea?

This sounds like a trick question because so many people rail against singletons, but the real challenge is actually providing a good answer – places where singletons actually work.

When would you choose an environment object over an observed object?

1:59

5. When would you choose an environment object over an observed object?

This might sound like a trivial property wrappers question testing your factual knowledge, but really it’s an architectural decision: what are the advantages and disadvantages of each, and when do they matter?

Tools

These questions explore your knowledge of testing, profiling, and more.

How much experience do you have testing with VoiceOver?

2:42

1. How much experience do you have testing with VoiceOver?

This is one of those questions that sounds simple, but gives you a huge amount of scope to explore various tangents based on your own area of expertise.

How do you create your UI layouts – storyboards or in code?

2:06

2. How do you create your UI layouts – storyboards or in code?

Unless either you or your interviewer is deeply opinionated, this question is not about making you argue the case for one rather than the other, but instead to give you scope to discuss the relative pros and cons of each.

How familiar are you with XCTest? Have you ever created UI tests?

2:08

3. How familiar are you with XCTest? Have you ever created UI tests?

If you don’t already have some experience with this, start getting some now. If you do have some experience, remember to keep your answer pragmatic: there are ups and downs with every approach.

How would you identify and resolve a retain cycle?

2:45

4. How would you identify and resolve a retain cycle?

This is a two-part question, and it’s a tricky one because ideally you’ll explain the problem, outline your approach, and provide a real-world example of you doing all that in practice.

What steps do you take to identify and resolve crashes?

2:05

5. What steps do you take to identify and resolve crashes?

Crashes are inevitable, at least when you’re in development, so learning how to find the source of a problem and getting it resolved is a key skill for any developer.

What steps do you take to identify and resolve performance issues?

2:54

6. What steps do you take to identify and resolve performance issues?

This is a brilliant question to ask, because it gives the interviewee the scope to pick their own area of expertise and delve into it, and it’s also a brilliant question to answer because you’re in control – you get to direct the conversation!