iOS interview Questions and Answers(Basic)

Dipika Kansara
4 min readSep 9, 2021

According to my personal Experience I have shared the list of iOS Interview Questions and Answers for beginners.I hope these iOS interview questions and answers are useful and will help you to get the best job.

  1. Question: What is Swift?

Swift is developed by Apple Inc. for OS X , iOS, WatchOS and TVOS.Swift is a powerful and intuitive programming language for iOS, iPadOS, macOS, tvOS, and watchOS. Writing Swift code is interactive and fun, the syntax is concise yet expressive, and Swift includes modern features developers love. Swift code is safe by design, yet also produces software that runs lightning-fast.

2. Question: What are the advantages of swift?

  • Swift can support dynamic libraries and tuples.
  • it allows struct, class and enum.
  • No semicolons are required in swift. (I love this part in Swift😁)

3. Question: What is cocoa and CocoaTouch?

  • Cocoa: Basically Cocoa is for OS X and include Foundation and Appkit.
  • CocoaTouch: it is for iOS and includes only UIKit.

4. Question: What are the basic datatype in swift?

Int, Double, Bool, String, Array, Dictionary

5. Question: What is difference between Let and Var?

Let : it is immutable variable. The use of let variable is we can declare constant variable and it cannot be change once initialize.

Var : it is Mutable variable. The use of var is we can declare variant variable and it can be change after initialization.

6. Question: What is Plist?

Plist stands for Property list. The meaning of Property list is dictionary of value and Key that can be stored in our file system with .plist file extension.

7. Question: What is Dictionary?

Dictionary is an unordered collection of Key Pair value and each value is associated with unique ID.

8. Question: What is difference between Array and NSArray?

Array : it is value type Array. It can hold only one type of data.

NSArray : it is immutable reference type. It can hold diffrent type of data.

9. Question: What are the ways unwrap optionals?

Guard Statement, Force unwrapping(using “!”), Optional binding, Nil coalescing operator.

10. Question: What is CoreData?

CoreData is a framework which provided by Apple. The use of CoreData to Handling Model Layer, To filter, Modify Data, To save Data and To track Data.

11. Question: What is difference between Structure and Class?

Class : Class is reference type and Class has specified inheritance and class can inherit from other class. We can declare a class with Superclass. The Class have type Casting. Class can be deinitialized.

Struct : Structure and Class are seems similar when we declare, But Structure is value type and Struct doesn’t have type casting, inheritance and Superclass.

Similar points of Struct and Class:

  • Both structs and classes can define properties to store values, and they can define functions
  • They can define subscripts to provide access to values with subscript syntax
  • They can define initializers to set up their initial state, with init()
  • They can be extended with extension (this is important!)
  • They can conform to protocols, for example to support Protocol Oriented Programming
  • They can work with generics to provide flexible and reusable types

12. Question: What is Protocols?

A protocol defines a blueprint of methods, properties, and other requirements that suit a particular task or piece of functionality. The protocol can then be adopted by a class, structure, or enumeration to provide an actual implementation of those requirements.

13. Question: What does “? ? ” mean?

it is nil coalescing operator and We can use default value for variable.

14. Question: Which are the ways of achieving concurrency in iOS?

The three ways to achieve concurrency in iOS are:

  • Threads
  • Dispatch queues
  • Operation queues

15. Question: Which is SpireKit and SceneKit?

Spirekit: it is a framework for easy development of animated 2D objects.

SceneKit: it is a framework inherited from OS X that assists with 3D graphics rendering.

16. Question: What is the difference between Strong and Weak?

  • Strong: Through the life of the object, the reference count will be increased and the reference will be maintained
  • Weak: It can be said as a non-strong reference that means it refers to the fact that we are referring to an object but not adding to its reference count. It’s often used to establish a parent-child relationship. The parent has a strong connection with the infant, but the child has only a small connection with the parent.

16. Question: What is MVC?

MVC stands for “Model View Controller”.MVC is a design pattern for the consists of three interconnected components which described below.

Model — A model is where the data is stored.

View — The classes in view are reusable as they don’t have any domain-specific logic.

Controller — with delegation patterns, the controller act as a communication between the model and view.

17. Question: What is meaning of Enum or Enumerations?

A class type containing a group of related items under the same umbrella, but it is impossible to create an instance of it.

18. Question: Give the importance of ‘?’ in Swift?

At the time of property declaration, the question mark ‘?’ is used to make a property optional.

19. Question: What is Defer in Swift?

The keyword ‘defer’ affords a code block executed in the situation while execution is exiting the present scope.

20. Question: What is Reuse-identifier?

If you want to group all the similar rows together from UITableView, ‘reuseIdentifier’ is used.

--

--