Top 20 iOS interview Questions — Part 1
Interview is most import part for everyone to get job in your dream company. I found few easy tips to prepare for iOS developer interview.
General Questions:
- Tell me about yourself?
- What are the challenges you faced in the project?
- Tell me about your role in your project?
- Explain the architecture of your project?
Answer all the question confidently. Your first impression is best impression in your interview.
Questions on Swift:
- Differentiate ‘app ID’ from ‘bundle ID’. Explain why they are used?
An App ID
is a two-part string used to identify one or more apps from a single development team.
The bundle ID
defines each App and is specified in Xcode.
2. What are the ways to create UIView?
- Using Storyboard
- Using XIB
- Creating views programatically.
To know more about this click here
3. What is dependency manager?
4. Difference b/n cocoapod and carthage?
Dependency manager are used install and manage third party libraries into your app.
To know more about dependency manager in swift click here
5. How you’re handling ADA in your app and why it is important?
You can design your apps in such a way that every one can use that app, including people with vision, learning or hearing disabilities through accessibility.
To know more about dependency manager in swift click here
6. Difference between class and struct?
class is reference type and struct is value type.
To know more about dependency manager in swift click here
7. What is ARC? What is MRC?
Now swift use ARC to automatically allocating and deallocating memory. In this method, You don’t need to use release and retain.
MRC: use MRC to manually allocating and deallocating memory using retain
and release
keyword
8. What are memory management issues?
- Freeing or overwriting data when object is in use. It causes crash or data corruption.
- Not freeing up the object if it is not in use. It leads memory leak.
- App crashes
9. What is memory leak? Why it Occur?
When allocated memory for object is not freed even though object is never going to be used again, it is known as memory leak.
10. Explain about memory management in swift
Read this blog to know about memory management.
11. What are Object’s Lifetime?
- Allocation: Takes memory from a stack or heap.
- Initialization:
init
code runs. - Usage: The object is used
- Deinitialization:
deinit
code runs. - Deallocation: Returns memory to a stack or heap.
12. What is closure and write a syntax for the same?
13. What are the type of Closures?
Read this blog for closure and syntax
14. What are different type of initializers in swift?
15. what is failable initializer in swift?
Read this blog for inializers type and syntax in swift.
16. How can you pass data between view controllers?
- using property
- using functions.
- using init method
- using segues
- using closures
- using delegates
- using NotificationCenter
- using Singleton
To know more about passing data between view controllers click here
17. What is Escaping Closures, Non-Escaping Closures and Autoclosures?
Read this blog for closures
18. What are Blocks?
Blocks are same as closures in swift
19. Why capture list in closures are weak?
To avoid retain cycle.
20. Which data structure used for memory allocation in swift?
Heap and stack.
We can find more advanced technical questions and some other topics in my next blog. Even i’l try to cover tips and preparation for system test. follow me on Medium for more updates on the swift topics.
I hope you find this blog helpful. If you enjoyed it, feel free to hit the clap button below 👏 to help others find it! and follow me on Medium. Thanks for reading. ❤❤❤❤.