Q1
Explain the differences between `@State`, `@ObservedObject`, and `@EnvironmentObject` in SwiftUI. When would you use each one, and how do they affect view re-rendering?
Why they ask this:* They want to assess your understanding of SwiftUI's reactive data flow and state management patterns, which are critical for building modern iOS apps.
Q2
Walk me through how you would optimize an iOS app that loads a large collection view with thousands of images. What techniques would you implement?
Why they ask this:* This tests your knowledge of performance optimization, memory management, and practical solutions like cell reuse, lazy loading, and image caching—essential skills for real-world apps.
Q3
Describe the difference between `Codable` and manual JSON parsing in Swift. What are the trade-offs, and when would you choose one over the other?
Why they ask this:* They're evaluating your grasp of modern Swift serialization techniques and whether you can make pragmatic architectural decisions based on project requirements.
Q4
How would you implement concurrent network requests using async/await, and what are the potential pitfalls you should avoid?