Main image of article iOS Developer Interview Questions: Mastering the Trickier Ones
More than a decade after the launch of the original iPhone, iOS is now a mature development environment. Thousands of developers regularly build, release, and update iOS apps for a dizzying universe of functions. This popularity is very good news for those tech pros who want to make a living within this ecosystem; but it also means they’ll have to work extra-hard to make themselves stand out when answering iOS developer interview questions. There are two languages that developers use to code in iOS: Objective-C, Apple’s longtime programming language, and Swift, the newer language designed to replace it. Knowing Swift is essential to landing an iOS job; and if the company hiring you has any legacy code, Objective-C will come in useful, as well. In addition to that knowledge base, what else do candidates need to land an iOS job? Paulo Michels, EVP of engineeringat ArcTouch, a San Francisco, Calif.-based mobile and blockchain developer, and Rob Pope, co-founder and CTO of Dogtown Media, a mobile media development company in Venice Beach, Calif., are interested in candidates who not only have deep knowledge of iOS, but also understand the degrees of nuance necessary to code creatively in the space. They've offered these iOS developer interview questions to help you better handle a hiring manager's or recruiter's queries:

"How would you avoid retain cycles when using closures/blocks in Swift?"

Michels and Pope have found that a surprising number of candidates don't have a good answer for this (important) question. What you should say: "Closures can cause retain cycles because they have a strong reference to the object that uses them." The answer should also mention the use of "[unowned self]" or "[weak self]." Why you should say it: "Even though Apple greatly improved memory management with the introduction of ARC," Michels said, "having a clear understanding of retain cycle and how to avoid it is a must for every developer."

"What are the different ways to specify layout of elements in UIView?"

Michels has observed that most candidates only describe their own preferred approach. But whether it's XIBs and storyboards, or layout in code, he needs to know you're not committed to one path. What you should say: By giving a description of the pros and cons of each approach, you'll show your flexibility if your future team chooses different paths. For example, Michels said that understanding the challenges of using storyboards in large projects, and related problems with merge conflicts, is a big indicator of the candidate's experience. Why you should say it: "UI layout is a very important aspect of iOS app development, and probably one of the most important skills a good developer must have," Michels added. "Making proper use of the available tools will determine a candidate's ability to design a scalable app architecture. Also, a clear understanding of auto-layout and implementing responsive layouts is critical."

"Describe managed object context and its function."

When asking iOS developer interview questions, both Pope and Michels often hear candidates give a brief description of what managed object context is, and what it's used for. That narrow an answer doesn’t provide any insight. What you should say: Show that you understand how managed object context works behind the scenes, with a focus on object lifecycle and multi-threading. Your answer should illustrate the key to a robust implementation of core data-based storage. Why you should say it: "The core data framework and managed object context may look simple and straightforward at first," Michel's noted, "but it can easily introduce obscure bugs when misused. Having a deeper understanding of how managed object context works is mandatory for any developer using core data."

"What long-running tasks can iOS support in the background?"

Pope has found that his candidates nearly all talk about Bluetooth accessories and location services. What you should say: "I don’t expect people to recount the Apple documentation verbatim, but three to four out of the nine types of background tasks would be good enough for me," Pope said. "There aren't many developers who have used VOIP functionality, for example. But I expect senior candidates to have used location services, BLE and audio playback, and I would love to hear how they have used some of this in the real world." Why you should say it: It demonstrates that the developer has worked on, or at least experimented with a broad range of iOS functionality. Mobile clients regularly ask for functionality that iOS doesn't provide and the developer needs to understand the limits of the operating system. Among all iOS developer interview questions, that's what makes this one particularly crucial.

"Explain what GCD is, and when and how you would use it."

Michels has noted that less-experienced candidates don't associate the Grand Central Dispatch (GCD) framework with frequently-used APIs such as "dispatch_sync" and "dispatch_async". What you should say: "It's expected that candidates can at least explain the use of methods ‘dispatch_sync,’ ‘dispatch_async,’ and how queues work," Michels said. "We also expect that candidates will mention the use of the ‘main_queue’ to run code that makes UI updates. A senior candidate should explain that internally queues are implemented as thread pools." Why you should say it: Proper handling of multi-threading is a crucial part of nearly every app, and a very important aspect in the design of responsive and robust apps.

"When would you use a third-party library or SDK in your development?"

It's common for candidates to answer that a third-party library or SDK is used to speed up development. What you should say: Pope’s advice: "I use them sparingly when I feel that the library has a long history, is current, well-supported, and exceeds the functionality that is required." Why you should say it: As new iOS versions and devices are released, maintaining applications in the medium- to long-term creates challenges. You don’t want to compound the issue by adding a third-party library, and its attendant features, which will cease to be supported. Keep that in mind the next time you're interviewing for an app-related job, and the iOS developer interview questions drift in the direction of libraries and SDKs.