IOS Interview Questions and Answers

Here are 40+ commonly asked IOS interview questions and answers which will definitely help you out in interviews.

1. Enlist the Latest IOS Development Patform?

The recent iOS Development platforms are as follows:
iOS 9.2 beta 2 Build version: 13C5060d
IOS 9.1 Build Version: 13B143

2. Explain Fast Enumeration.

Fast enumeration is a iOS Programming Language feature that enables you to enumerate over the contents of a collection. It will also make your code execute your code faster due to internal implementation which gets reduced message sending overheads and increased pipelining potential.

3. Explain ARC.

ARC represents Automatic Reference Counting. It is a Compiler level feature that simplifies the process of managing the lifetimes of Objects in Objective – C. ARC evaluates the Lifetime requirements of Objects and automatically includes appropriate Methods to be called during Compilation.

IOS Interview Questions and Answers

Image Source

4. Explain Mutable and Immutable Types in Objective C Programming Language.

Mutable Types means you can modify the Contents later when you feel the need. However, when an Object is marked as Immutable, it implies that the data cannot be modified later after it has been initialized. Therefore, the stored values are Constant here.

Example:
NSString, NSArray values cannot be altered after initialization.

5. What is Garbage Collection?

Garbage Collection is a Memory Management feature. It manages the allocation and release of the memory to your applications. When the garbage collector performs a collection, it checks for objects in the managed heap that are not executed by the applications.

6. Explain xib.

.xib is a file extension that is associated with Interface Builder files. It is a graphics software that is used to test, develop and design the User Interfaces of different software products. Such extension files also contains development time format files that includes interface files created with the interface builder softwares.

7. Which Programming Languages are used for iOS Development?

The languages used for iOS development are as follows:
1. Objective-C
2. .NET
3. C
4. HTML5
5. JavaScript
6. Swift

8. Explain App ID.

It is primarily used to identify one or more apps from a Unique Development team. It consists of a string divided into two parts. The string includes a Team ID and a Bundle ID Search String with a separator as a period. The Team ID is allocated by Apple and is different for every development team. A Bundle ID Search String is supplied by the App Developer.

9. Explain usage of struct.

struct is a Datatype in C Programming Language that enables encapsulation of other pieces of data into a single cohesive unit. It is similar to an object but in C Programming Language.

10. What is an Object?

Objects are essentially the variables that are of Class types. Objects are basic Run-Time entities in an Object oriented system. They may represent a place, a bank account or a person.

11. Enlist the methods to achieve Concurrency in iOS.

The following listed are the methods to achieve concurrency functionality in iOS:
1. Threads
2. Dispatch Queues
3. Operation Queues

12. What is Cocoa?

Cocoa is an Application Development Environment for Mac OS X Operating System and iOS. It includes Compilations of a Runtime System, Object-Oriented Software Libraries and an Integrated Development Environment.

13. What is a Framework?

It is basically a conceptual structure or a scheme with an intension to support the expansion of the structure into something useful. A Framework is a layered structure indicating what kind of programs can or should be built and how they would interact. Frameworks includes actual programs that mentions programming interfaces and programming tools for working with the frameworks.

14. Explain keywords alloc and new.

The alloc keyword is used to create a New Memory Location in the System. However, it does not initialize it. In case of New keyword, it also helps to create a New Memory Location in the system. However, it can initialize the Contents unlike the alloc keyword.

15. What are Selectors in Objective-C?

A Selector in Objective C can be used to refer the name of a method when it is used in a Source-Code message to an Object. It also refers to the unique identifiers that can replace the Name when the Source Code is being Compiled. All the methods that have the same name have the same selector.

16. Enlist Frameworks for Cocoa.

The Frameworks developed for Cocoa are listed as follows:
1. Foundation
2. Application Kit

17. What is Bundle ID?

The Bundle ID uniquely defines every iOS Application. It is specified in Xcode. It is a Search String which is supplied by the Application Developer to match either the Bundle ID of a Single Application or a Set of Bundle IDs for a Group of Applications.

18. What is a Class?

The entire set of data of an object can be made a user-defined data type using a class. Objects are basically variables of Class type. Once a Class has been defined, it is possible to create multiple Objects of its type. A Class is a collection of Objects of similar type.

19. Explain the difference between Inheritance and Category.

Category enables to add methods only. It does not allow the inclusion of Data Members unlike Inheritance where both the Data and Methods can be added. Category includes Complete Application in its Scope whereas Inheritance’s scope is only within that particular File.

20. Explain App Bundle.

During iOS application development, Xcode packages it as a bundle. A Bundle is a file directory that combines related resources together in one place. It contains the Application Executable File and supports Resource Files such as Localized Content, Image Files and Application Icons.

21. What is Swift?

Swift is a programming language for development of applications for OS X, iOS, watchOS, and tvOS. These applications are developed using C and Objective-C. It does not have the constraints of C Programming. It has features for easier development and provides more flexibility.

22. What is a Protocol in Objective-C Programming Language?

A Protocol is used to define a list of required optional methods that a class needs to implement. If a class adopts a protocol, it must implement all the needed methods in the protocols it adopts. It is identical to an Interface in Java and also to a purely Virtual Class in C++. Cocoa uses protocols to support interprocess communication through Objective-C messages.

23. Explain Formal Protocols.

Formal Protocols enables defining an Interface for a Set of Methods without any implementation. It is useful with DistributedObjects as they allow defining a protocol for communication between objects.

24. What is Polymorphism?

It enables a methods to exhibit different behaviours under different instances. The task of creating a Function or an Operator behave differently in different instances is known as Operator Overloading which is an implementation of Polymorphism.

25. Differentiate between Release and Pool Drain.

The release keyword is used to free a memory location in the system which is not being utilized. The drain keyword is used to release the NSAutoreleasePool.

26. What is a Collection?

A Collection is a Foundation Framework Class that is used to Manage and Store the group of Objects. The primary role of a Collection is to store Objects in the form of either a Set, a Dictionary or an Array.

27. Explain the significance of AutoRelease.

AutoRelease: When you send an Object AutoRelease message, it gets added to the Local AutoRelease Pool. When the AutoRelease Pool gets destroyed, the Object will receive a Release
message. The Garbage Collection functionality will destroy the Object if it has the RetainCount as Zero.

28. What is the First Responder and Responder Chain.

A Responder Chain is a hierarchy of Objects that can respond to the events received. The first object in the ResponderChain is called the First Responder.

29. Explain Web Services?

The Web Services are the Application Components which enables communication using Open Protocols. These Web Services are Self – Describing and Self – Contained. Web Services can be found out by using UDDI. The base for development of Web Services functionality is Extensible Markup Language (XML).

30. Explain the difference between Cocoa and Cocoa Touch?

Cocoa is an Application Framework that enables development of Applications in Mac OS X Environment. It is basically a combination of two Frameworks i.e., Appkit Framework and Foundation Framework. Cocoa Touch is an Application Framework for iPod Touch. Iphone and iPad. It includes the Foundation Framework and UIKit Framework.

31. Explain plist.

Plist represents Property Lists. It is a key-value store for the Application to Save and Retrieve persistent data values. This is specifically used for iPhone development. It is basically and XML File.

32. Explain IPA.

IPA represents iOS App Store Package. It has an .ipa extension which represents iPhone application archive file that stores an iPhone application. Every file is compressed with a Binary for the ARM architecture and can only be installed on an iPhone, ipad or an iPod Touch. It is mostly encrypted with Apple’s FairPlay DRM Technology.

33. Which JSON Framework is supported by iOS?

SBJSON is the framework that is supported by iOS. It is a generator and a JSON Parser for Objective-C. SBJSON provides flexible APIs and also makes JSON handling easier.

34. Explain Inheritance.

Inheritance is an Object Oriented Programming concept. It allows to develop a New Class that is reusable and can extend the behaviour that is defined in another class.

35. How is it possible to improve Battery Life during execution of an Application?

An application is notified whenever the Operating System transfers the application between Background and Foreground. It helps in extended battery life by determining the exact functionalities in the background and thereby also helps in a better User Experience with the Foreground Application.

36. Does iOS supports Multi-Tasking functionality?

Multi-Tasking functionality is supported from iOS versions 4 and the later ones. Multi-Tasking is a feature that enables applications to remain in the background until it is re-launched or terminated.

37. What is Xcode?

Xcode is a combination of Software Development Tools developed by Apple for developing applications. It is an Integrated Development Environment (IDE). It is primarily used for development of iOS and OS X applications.

38. Explain Layer Objects.

Layer Objects are Data Objects that represent the Visual Content. They are used to render the Content. Layer Objects can be customized and these custom layer objects are used to implement Complex Animations and other types of sophisticated Visual Effects.

39. What framework is used to construct application’s iOS User Interface?

The UIKit framework is the Framework that is used to develop application’s User Interface for iOS. UIKit framework provides Views, Drawingg Model, Controls, Event Handling, Windows specifically designed for a touch screen interface.

40. Explain Interfaces.

Interfaces enables defining features as small groups of closly related properties, methods, and events. It defines the events, properties and methods that classes can implement.

41. Enlist Frameworks for Cocoa Touch.

The Frameworks developed for Cocoa Touch are listed as follows:
1. Foundation
2. UIKit

42. How can you declare a variable in Swift?

Var num = 42

43. What is the Maximum byte-size for a push notification to Apple Server?

The maximum memory size is 256 Bytes to send a push Notification to Apple Server.

So this was the list of some important IOS interview questions and answers. If you found any information incorrect or missing in above list then please mention it by commenting below.

9 thoughts on “IOS Interview Questions and Answers”

  1. Well, you got most of them right. This set of questions would mark the interviewer as a very junior person who doesn’t quite get iOS.

    For instance, .net is not a native programming language for iOS. C++ is far more common, and is natively supported.

  2. Thanks for this list of questions. It’s great that they have short and precise answers. You cover a wide variety of iOS topics, if someone needs to test the Objective-C knowledge.

  3. Really, excellent interview Q/A, for freshers in iOS. It’s helpful. But please keep it upto-date as per swift newer version.

  4. www.bolauser.com/

    This is a really good tip particularly to those fresh to the blogosphere.
    Brief but very precise information… Appreciate your sharing this
    one. A must read article!

Leave a Comment

Your email address will not be published. Required fields are marked *