1. Explain me 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.

2. 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.

3. Explain me what is 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.

4. What is difference between "protocol" and "delegate"?

protocol is used the declare a set of methods that a class that "adopts" (declares that it will use this protocol) will implement.
Delegates are a use of the language feature of protocols. The delegation design pattern is a way of designing your code to use protocols where necessary.

5. 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.

6. Explain 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.

7. What is 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.

8. What is autorealease pool?

Every time -autorelease is sent to an object, it is added to the inner-most autorelease pool. When the pool is drained, it simply sends -release to all the objects in the pool.
Autorelease pools are simply a convenience that allows you to defer sending -release until "later". That "later" can happen in several places, but the most common in Cocoa GUI apps is at the end of the current run loop cycle.

9. 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.

10. 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).

Download Interview PDF

11. Explain difference between coredata & sqlite?

There is a huge difference between these two. SQLLite is a database itself like we have MS SQL Server. But CoreData is an ORM (Object Relational Model) which creates a layer between the database and the UI. It speeds-up the process of interaction as we dont have to write queries, just work with the ORM and let ORM handles the backend. For save or retrieval of large data, I recommend to use Core Data because of its abilities to handle the less processing speed of IPhone.

12. 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.

13. 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.

14. 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.

15. Explain 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.

16. What are the Application lifecycle in iOS?

ApplicationDidFinishLaunchingWithOption -ApplicationWillResignActive- ApplicationDidBecomeActive-ApplicationWillTerminate

17. What is synchronized() block in objective c? what is the use of that?

The @synchronized()directive locks a section of code for use by a single thread. Other threads are blocked until the thread exits the protected code.

18. What is the meaning of "weak" keyword?

*Weak - weak reference you signify that you don't want to have control over the object's lifetime. The object you are referencing weakly only lives on because at least one other object holds a strong reference to it. Once that is no longer the case, the object gets destroyed and your weak property will automatically get set to nil.

19. 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.

20. 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.

21. 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.

22. 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.

23. 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

24. How to start a thread?

- (void)performSelectorInBackground:(SEL)aSelector withObject:(id)arg on NSObject
NSThread* evtThread = [ [NSThread alloc] initWithTarget:self
selector:@selector( saySomething )
object:nil ];
[ evtThread start ];

25. How to find the memory leaks in MRC?

By using -
1. Static analyzer.
2. Instrument

Download Interview PDF

26. What is Objective c?

*Objective-C is a reflective, object-oriented programming language which adds Smalltalk-style messaging to the C programming language. strictly superset of c.

27. Explain me how to parse JSON?

By using NSJSONSerialization.
For example : NSArray *jsonArray = [NSJSONSerialization JSONObjectWithData: data options: NSJSONReadingMutableContainers error: &e];

28. What is "Protocol" on objective c?

A protocol declares methods that can be implemented by any class. Protocols are not classes themselves. They simply define an interface that other objects are responsible for implementing. Protocols have many advantages. The idea is to provide a way for classes to share the same method and property declarations without inheriting them from a common ancestor

29. 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.

30. 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.

31. Explain me how to parse xml?

Using NSXMLParser.
Create xml parser object with xml data, set its delegate , and call the parse method with parserObject.
Delegate methods getting called :
☛ – parserDidStartDocument:
☛ – parserDidEndDocument:
☛ – parser:didStartElement:namespaceURI:qualifiedName:attributes:
☛ – parser:didEndElement:namespaceURI:qualifiedName:
☛ – parser:didStartMappingPrefix:toURI:
☛ – parser:didEndMappingPrefix:
☛ – parser:resolveExternalEntityName:systemID:
☛ – parser:parseErrorOccurred:
☛ – parser:validationErrorOccurred:
☛ – parser:foundCharacters:
☛ – parser:foundIgnorableWhitespace:
☛ – parser:foundProcessingInstructionWithTarget:data:
☛ – parser:foundComment:
☛ – parser:foundCDATA:

32. Explain me what is "Delegate"?

A delegate is an object that will respond to pre-chosen selectors (function calls) at some point in the future., need to implement the protocol method by the delegate object.

33. What is meaning of "synthesize" keyword?

ask the compiler to generate the setter and getter methods according to the specification in the declaration

34. 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.

35. Explain 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.

36. Explain steps for using coredata?

NSFetchedResultsController - It is designed primarily to function as a data source for a UITableView

37. Please explain what is difference strong and weak reference?

complier with be responsible for lifetime of object which is declared as strong. for weak object - compiler will destroy object once strong reference that hold weak object get destroyed.

38. What is meaning of "nonatomic" keyword?

In non atomic no such guaranty that value is returned from variable is same that setter sets. at same time

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. 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.

Download Interview PDF

41. Do you know 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.

42. Explain me 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.

43. How to start a selector on a background thread?

- (void)performSelectorInBackground:(SEL)aSelector withObject:(id)arg on NSObject

44. What manual memory management? How it work?

In Manual memory management developers is responsible for life cycle of object. developer has to retain /alloc and release the object wherever needed.

45. What is meaning of "readOnly" keyword?

Declare read only object / declare only getter method

46. What is "notification"?

provides a mechanism for broadcasting information within a program, using notification we can send message to other object by adding observer .

47. How declare methods in Objective c? and how to call them?

- (return_type)methodName:(data_type)parameter_name : (data_type)parameter_name

48. Enlist Frameworks for Cocoa Touch?

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

49. 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.

50. 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.

51. What are the ViewController lifecycle in iOS?

loadView - viewDidLoad-viewWillAppear-viewDidAppear - viewDisappear - viewDidUnload

52. Tell me what is fast enumeration?

for(id object in objets){
}

53. What is property in Objective c?

Property allow declared variables with specification like atomic/nonatmic, or retain/assign

54. How can you declare a variable in Swift?

Var num = 42

55. How to use reusable cell in UITableview?

By using dequeReusableCellWithIdentifier

Download Interview PDF

56. What is the "interface" and "implementation"?

interface declares the behavior of class and implementation defines the behavior of class.

57. What is meaning of "assign" keyword?

Specifies that the setter uses simple assignment. Uses on attribute of scalar type like float,int.

58. What is iPhone screen size?

320X480

59. What is meaning of "copy" keyword?

copy object during assignment and increases retain count by 1

60. Explain difference between nil and Nil?

Nil is meant for class pointers, and nil is meant for object pointers

61. How to deal with SQLite database?

Dealing with sqlite database in iOS:
☛ 1. Create database : sqlite3 AnimalDatabase.sql
☛ 2.Create table and insert data in to table :
CREATE TABLE animals ( id INTEGER PRIMARY KEY, name VARCHAR(50), description TEXT, image VARCHAR(255) );

INSERT INTO animals (name, description, image) VALUES ('Elephant', 'The elephant is a very large animal that lives in Africa and Asia', 'http://dblog.com.au/wp-content/elephant.jpg');

☛ 3. Create new app --> Add SQLite framework and database file to project
☛ 4. Read the database and close it once work done with database :
// Setup the database object
sqlite3 *database;

// Init the animals Array
animals = [[NSMutableArray alloc] init];

// Open the database from the users filessytem
if(sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) {
// Setup the SQL Statement and compile it for faster access
const char *sqlStatement = "select * from animals";
sqlite3_stmt *compiledStatement;
if(sqlite3_prepare_v2(database, sqlStatement, -1, &compiledStatement, NULL) == SQLITE_OK) {
// Loop through the results and add them to the feeds array
while(sqlite3_step(compiledStatement) == SQLITE_ROW) {
// Read the data from the result row
NSString *aName = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)];
NSString *aDescription = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 2)];
NSString *aImageUrl = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 3)];

// Create a new animal object with the data from the database
Animal *animal = [[Animal alloc] initWithName:aName description:aDescription url:aImageUrl];

// Add the animal object to the animals Array
[animals addObject:animal];

[animal release];
}
}
// Release the compiled statement from memory
sqlite3_finalize(compiledStatement);

}
sqlite3_close(database);

62. What is use of UIApplication class?

The UIApplication class implements the required behavior of an application.

63. What is iPad screen size?

1024X768

64. What compilers apple using?

The Apple compilers are based on the compilers of the GNU Compiler Collection.

65. What is the use of "dynamic" keyword?

Instructs the compiler not to generate a warning if it cannot find implementations of accessor methods associated with the properties whose names follow.

66. What is latest mac os version?

Mac- Mountain Lion

67. What is meaning of "retain" keyword?

Specifies that retain should be invoked on the object upon assignment. takes ownership of an object

68. What is meaning of "atomic" keyword?

"atomic", the synthesized setter/getter will ensure that a whole value is always returned from the getter or set by the setter, only single thread can access variable to get or set value at a time

69. What is latest Xcode version?

Xcode- 4.6.2

70. What are the features is IOS 6?

☛ 1. Map :beautifully designed from the ground up (and the sky down)
☛ 2. Integration of Facebook with iOS
☛ 3. Shared photo streams.
☛ 4. Passbook - boarding passes, loyalty cards, retail coupons, cinema tickets and more all in one place
☛ 5. Facetime - on mobile network as wifi
☛ 6. changed Phone app - *remind me later,*reply with message.
☛ 7. Mail - redesigned more streamline interface.
☛ 8. Camera with panorama .

Download Interview PDF

71. Explain what is storyboard?

With Storyboards, all screens are stored in a single file. This gives you a conceptual overview of the visual representation for the app and shows you how the screens are connected. Xcode provides a built-in editor to layout the Storyboards.
☛ .storyboard is essentially one single file for all your screens in the app and it shows the flow of the screens. You can add segues/transitions between screens, this way. So, this minimizes the boilerplate code required to manage multiple screens.
☛ Minimizes the overall no. of files in an app.

72. Explain difference between sax parser and dom parser?

SAX (Simple API for XML):
☛ Parses node by node
☛ Doesn't store the XML in memory
☛ We can not insert or delete a node
☛ Top to bottom traversing

DOM (Document Object Model):
☛ Stores the entire XML document into memory before processing
☛ Occupies more memory
☛ We can insert or delete nodes
☛ Traverse in any direction

73. 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

74. 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.

75. Explain Inheritance?

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

76. 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.

77. 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.

78. 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.

79. 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.

80. 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.

81. 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.

82. What happens if the methods doesn't exist?

App will crash with exception unrecognized selector sent to instance.

83. How to download something from the internet?

By Using NSURLConnection , by starting connection or sending synchronous request.

84. Explain me what is ARC? How it works?

Automatic reference counting (ARC) If the compiler can recognize where you should be retaining and releasing objects, and put the retain and release statement in code.

85. What is block in objective c?

Blocks are a language-level feature added to C, Objective-C and C++, which allow you to create distinct segments of code that can be passed around to methods or functions as if they were values. Blocks are Objective-C objects, which means they can be added to collections like NSArray or NSDictionary. They also have the ability to capture values from the enclosing scope, making them similar to closures or lambdas in other programming languages.

Download Interview PDF

86. What is difference between "assign" and "retain" keyword?

☛ Retain -Specifies that retain should be invoked on the object upon assignment. takes ownership of an object
☛ Assign - Specifies that the setter uses simple assignment. Uses on attribute of scalar type like float,int.

87. Who invented Objective c?

Broad cox and Tom Love

88. What is latest iOS version?

IOS - 6.1.3

89. Explain me 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.

90. What is 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.

91. Explain me 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.

92. Enlist Frameworks for Cocoa?

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

93. 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

94. Explain 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.

95. Explain difference between release and autorelease?

release - destroy the object from memory,
autorelease - destroy the object from memory in future when it is not in use.

96. What is synchronous web request and asynchronous?

In synchronous request main thread gets block and control will not get back to user till that request gets execute.
In Asynchronous control gets back to user even if request is getting execute.

97. what is use of NSOperation? how NSOperationque works?

An operation object is a single-shot object-that is, it executes its task once and cannot be used to execute it again. You typically execute operations by adding them to an operation queue An NSOperationQueue object is a queue that handles objects of the NSOperation class type. An NSOperation object, simply phrased, represents a single task, including both the data and the code related to the task. The NSOperationQueue handles and manages the execution of all the NSOperation objects (the tasks) that have been added to it.

98. What is the meaning of "strong"keyword?

*strong -o "own" the object you are referencing with this property/variable. The compiler will take care that any object that you assign to this property will not be destroyed as long as you (or any other object) points to it with a strong reference.

99. What is Category in Objective c?

A category allows you to add methods to an existing class-even to one for which you do not have the source.

100. What is "Push Notification"?

to get the any update /alert from server .

Download Interview PDF

101. Explain "private", "Protected" and "Public"?

☛ private - limits the scope class variable to the class that declares it.
☛ protected - Limits instance variable scope to declaring and inheriting classes.
☛ public - Removes restrictions on the scope of instance variables

102. What is Cococa and cocoa touch?

Cocoa is for Mac App development and cocoa touch is for apples touch devices - that provide all development environment