Ios interview questions


Top most important ios interview questions and answers by Experts:

Here is a list of Top most important ios interview questions and answers by Experts.If you want to download ios interview questions pdf free ,you can register with RVH techguru. Our experts prepared these ios interview questions to accommodate freshers level to most experienced level technical interviews.

If you want to become an expert in ios ,Register for ios online training here.


1. Where can you test Apple iPhone apps if you don’t have the device?
iOS Simulator can be used to test mobile applications. Xcode tool that comes along with iOS SDK includes Xcode IDE as well as the iOS Simulator. Xcode also includes all required tools and frameworks for building iOS apps. However, it is strongly recommended to test the app on the real device before publishing it.
2. Does iOS support multitasking?
iOS 4 and above supports multi-tasking and allows apps to remain in the background until they are launched again or until they are terminated.
3. Which JSON framework is supported by iOS?
SBJson framework is supported by iOS. It is a JSON parser and generator for Objective-C. SBJson provides flexible APIs and additional control that makes JSON handling easier.
4. What are the tools required to develop iOS applications?
 iOS development requires Intel-based Macintosh computer and iOS SDK.
5. Name the framework that is used to construct application’s user interface for iOS.
The UIKit framework is used to develop application’s user interface for iOS. UIKit framework provides event handling, drawing model, windows, views, and controls specifically designed for a touch screen interface.
6. Name the application thread from where UIKit classes should be used?
UIKit classes should be used only from an application’s main thread. Note: The derived classes of UIResponder and the classes which manipulate application’s user interface should be used from application’s main thread.
7. Which API is used to write test scripts that help in exercising the application’s user interface elements?
UI Automation API is used to automate test procedures. Tests scripts are written in JavaScript to the UI Automation API. This in turn simulates user interaction with the application and returns log information to the host computer.
8. Why an app on iOS device behaves differently when running in foreground than in background?
 An application behaves differently when running in foreground than in background because of the limitation of resources on iOS devices.
9. How can an operating system improve battery life while running an app?
An app is notified whenever the operating system moves the apps between foreground and background. The operating system improves battery life while it bounds what your app can do in the background. This also improves the user experience with foreground app.
10. Which framework delivers event to custom object when app is in foreground?
The UIKit infrastructure takes care of delivering events to custom objects. As an app developer, you have to override methods in the appropriate objects to process those events.
11. When an app is said to be in not running state?
An app is said to be in ‘not running’ state when:
– it is not launched.
– it gets terminated by the system during running.
12. Assume that your app is running in the foreground but is currently not receiving events. In which sate it would be in?
 An app will be in InActive state if it is running in the foreground but is currently not receiving events. An app stays in InActive state only briefly as it transitions to a different state.
13. Give example scenarios when an application goes into InActive state?
An app can get into InActive state when the user locks the screen or the system prompts the user to respond to some event e.g. SMS message, incoming call etc.
14. When an app is said to be in active state?
An app is said to be in active state when it is running in foreground and is receiving events.
15. Name the app sate which it reaches briefly on its way to being suspended.
An app enters background state briefly on its way to being suspended.
16. Assume that an app is not in foreground but is still executing code. In which state will it be in?
Background state.
17. An app is loaded into memory but is not executing any code. In which state will it be in?
An app is said to be in suspended state when it is still in memory but is not executing any code.
18. Assume that system is running low on memory. What can system do for suspended apps?
In case system is running low on memory, the system may purge suspended apps without notice.
19. How can you respond to state transitions on your app?
On state transitions can be responded to state changes in an appropriate way by calling corresponding methods on app’s delegate object.
For example:
applicationDidBecomeActive method can be used to prepare to run as the foreground app.
applicationDidEnterBackground method can be used to execute some code when app is running in the background and may be suspended at any time.
applicationWillEnterForeground method can be used to execute some code when your app is moving out of the background
applicationWillTerminate method is called when your app is being terminated.
20. List down app’s state transitions when it gets launched.
Before the launch of an app, it is said to be in not running state.
When an app is launched, it moves to the active or background state, after transitioning briefly through the inactive state.
21. Who calls the main function of you app during the app launch cycle?
During app launching, the system creates a main thread for the app and calls the app’s main function on that main thread. The Xcode project’s default main function hands over control to the UIKit framework, which takes care of initializing the app before it is run.
22. What is the use of controller object UIApplication?
Controller object UIApplication is used without subclassing to manage the application event loop.
It coordinates other high-level app behaviors.
It works along with the app delegate object which contains app-level logic.

23. Which object is create by UIApplicationMain function at app launch time?
The app delegate object is created by UIApplicationMain function at app launch time. The app delegate object’s main job is to handle state transitions within the app.
24. How is the app delegate is declared by Xcode project templates?
 App delegate is declared as a subclass of UIResponder by Xcode project templates.
25. What happens if IApplication object does not handle an event?
In such case the event will be dispatched to your app delegate for processing.
26. Which app specific objects store the app’s content?
Data model objects are app specific objects and store app’s content. Apps can also use document objects to manage some or all of their data model objects.
27. Are document objects required for an application? What does they offer?
Document objects are not required but are very useful in grouping data that belongs in a single file or file package.
28. Which object manage the presentation of app’s content on the screen?
 View controller objects takes care of the presentation of app’s content on the screen. A view controller is used to manage a single view along with the collection of subviews. It makes its views visible by installing them in the app’s window.
29. Which is the super class of all view controller objects?
UIViewController class. The functionality for loading views, presenting them, rotating them in response to device rotations, and several other standard system behaviors are provided by UIViewController class.
30. What is the purpose of UIWindow object?
The presentation of one or more views on a screen is coordinated by UIWindow object.
31. How do you change the content of your app in order to change the views displayed in the corresponding window?
To change the content of your app, you use a view controller to change the views displayed in the corresponding window. Remember, window itself is never replaced.
32. Define view object.
Views along with controls are used to provide visual representation of the app content. View is an object that draws content in a designated rectangular area and it responds to events within that area.
33. You wish to define your custom view. Which class will be subclassed?
Custom views can be defined by subclassing UIView.
34. Apart from incorporating views and controls, what else an app can incorporate?
Apart from incorporating views and controls, an app can also incorporate Core Animation layers into its view and control hierarchies.
35. What are layer objects and what do they represent?
Layer objects are data objects which represent visual content. Layer objects are used by views to render their content. Custom layer objects can also be added to the interface to implement complex animations and other types of sophisticated visual effects.
36. 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
37. 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.
38. 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.
39. 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.
NSString, NSArray values cannot be altered after initialization.
40. 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.
41. 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.
42. 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
49. 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.
50. 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.
51. 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.
52. 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
53. 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.
54. 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.
55. 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.
56. 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.
57. Enlist Frameworks for Cocoa.
The Frameworks developed for Cocoa are listed as follows:
1. Foundation
2. Application Kit
58. 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.
59. 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.
60. 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.
61. 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.
62. 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.
63. 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.
64. 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.
65. 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.
66. 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.
67. 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.
68. 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.
69. 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.
70. 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).

We will continuously update  ios interview questions and answers in this site with real time scenarios by ios experts.You can request for ios interview questions and answers pdf  in the Contact us form.