Swift & SwiftUI Interview Prep – Senior iOS Developers


Here are some of the key questions that came up:

1. What are PassThroughSubject and CurrentValueSubject?
2. Explain Publisher and Subscriber.
3. Difference between @State and @Binding in SwiftUI.
4. What is AnyPublisher?
5. When do we use eraseToAnyPublisher?
6. What is AnyView?
7. What does the @Published property wrapper do?
8. Write a Combine pipeline to fetch data from two different network requests and output only when both complete. (💻 Live Coding Test)
9. What is a Cancellable?
10.Types of operators in Combine.
11. Usage of sink with completion.
12. Explain switchToLatest.
13. Build a 2-screen SwiftUI app (list + detail) that makes an API call using Combine only. (⏱️ 20-min Live Coding Test)
14. Difference between onReceive and onChange modifiers.
15. Coding Exercise:
👉 Given an array of strings, transform it into a new array:
Input → ["a", "b", "c"]
Output → ["c-0", "b-1", "a-2"]
⚡️ Requirement: Solve this using Swift higher-order functions such as map, enumerated, etc.

💡 If you’re preparing for iOS interviews, these are excellent questions to sharpen your fundamentals and practical skills in SwiftUI + Combine.

🤝 What other Swift / SwiftUI interview questions have you faced recently? Let’s share and learn together!

Comments

Popular posts from this blog

what is appDelegate?

Difference Between REST and SOAP Protocols in iPhone

Steps to follow to submitting iPhone/iPad Apps To The Apple App Store