Frequently Asked Interview Questions And Answers For iOS Freshers

50,000+ Students Trained, 19+ Our Offices, 18+ Courses Offered,

Job Guarantee + Job Satisfaction, 2000+ Company Tie Ups For Placements

iOS Interview Questions

Fundamentals question:

  1. What are Functions in swift ?
Ans:   Functions are piece of code bundled in a body to perform a specific task. Programming languages comes with Predefined functions. Also one can create functions of own, which are known as User defined functions. Functions may or may not return values and have zero or more parameters.
  1. What is Protocol in swift ?
Ans:  Protocols are entity which contains declaration of required and optional functions in its body. Protocols are used to pass multiple inheritance and also used if we want our class or structure to must contain specific functions implemented in it.  
  1. What is difference between Objective c and Swift?
Ans:  Objective c and Swift both are programming languages used to develop App for Apple Devices. Swift is new language introduced by Apple in 2014, with various changes compared to Obejctive C. eg. Project developed using Swift has single file with .swift extension where as Objective C has separate files with extensions .h and .m . Swift is less error prone compared to Objective C as it has eliminated the need of various symbols like semicolon,brackets etc.
  1. What is the Difference between let and var keyword in Swift ?
Ans:   Let  is used for declare variable as constant and var is use for declare variable as variant so that  if we declares variable as constant we cannot change value of variable  and if we declares variable as var then we can change value according to our requirements .
  1. What is the Use of SQL Joins?
Ans: At times we want to retrieve data from more than one table writing single query, we use joins. SQL has various types of joins like Inner,Outer(Left,Right,Full),Cross etc.
  1. Kits required for Gaming Development using IOS?
Ans: Metal,SceneKit,SpriteKit,ReplayKit,GameplayKit,Model I/O etc.
  1. What is the Difference betweenNSArray and NSMutable Array?
Ans :NSArray is immutable array, means it does not allow modification at run time. Whereas NSMutable array as name suggest allows modifications of elements at runtime.NSMutable Array comes with various predefined methods which helps in modifying elements.
  1. How to Define Delegate in swift?
Ans: Delegates provide with the optional methods, which can be used to achieve certain data or task at certain actions happen. Delegates are not mandatory to be implemented, but are used when to respond at certain actions.
  1. What is the difference between Strong and Weak reference in iPhone Application ?
Ans: Strong :  Declaring  instance of a class or property of class makes it strong by default.  When we pass reference of such object to another object,it says that it can’t be deference or deallocated from memory as it holds strong reference to other objects. Weak: In order to create weak , we use weak keyword. Weak references may have nil value and thus are liable to be deallocated from the memory.  
  1. What is View Controller life cycle of iPhone Application ?
Ans:  When we run the iPhone application first Call theUIViewController methods follows a sequence –
  1. ViewDidLoad
  2. ViewWillAppear
  3. ViewDidAppear
  4. ViewWillDisAppear
  5. ViewDidDisAppear
  6. What are Constructors in swift ?
Ans: Constructors are special type of functions having same name as class or init() in swift. Constructors are used to initialize members of the class as soon as the instance of the class is created, as constructor gets invoked by itself when class instance in created. Same as functions, constructors can also be overloaded, but unlike functions constructors do not return value.
  1. What is Auto Layout and Size Class in iPhone Application?
Ans : Auto Layout : Auto Layout is used while designing the interface as it is used to define the    relationship between the UIView and other controls.  Various options are available Align,Sizing,ResolveConstraints,Spacing.. Size Class: Size class is used in app to make it run on any apple device without any issues with the height n width of the controls due to change in screen size.  Various size classes are available such as Compact-Compact,Regular-Regular,Regular-Compact,Compact-Regular,Compact-Any,Compact-Regular-Any,Any-Compact,Any-Regular,Any-Any.
  1. Explain the OOPS Features?
Ans: Object Oriented Programming System comes with various features like Encapsulation,Abstraction,Inheritence,Class,Objects,Polymorphism… Class: In oops based languages, class act as a model or a template for an object. Class contains properties and functions which are required by object. Class is also used to share the common properties and functions with other classes. Object :Object is basically an instance of the class. Object consist attributes (data members) and member functions. Polymorphism: Polymorphism means single object exists in more than one form. We can implement polymorphism in program by using concept of Function Overloading where we declare more than one function with same name but different parameters, which also referred as Function Signatures. Encapsulation: Encapsulation refers to process where we declare all the member functions and data members into single body, which can be achieved using class. Abstraction: Abstraction is a feature where we hide the features from other class or where we prevent other classes to access some the features of the class. Such is achieved using Access modifiers.
  1. What is the difference between Primary Key and Foreign Key in SQL?
Ans: Primary Key : Primary Key is a constraint which is applied to the column of table, in order to keep data in that column unique and also not null. By applying primary key onto the table, clustered index is also created based on that primary key column. Primary Key can be applied to one column of the table only. Foreign Key:Foreign key is constraint applied to the column of the table in order to create relationship between the two or more tables. In order to maintain data integrity we apply relationship between the tables. Table can have more than one column marked as Foreign key and one table can relate to more than one table.
  1. What are Tuples and Dictionary in Swift ?
Ans: Tuples:  Tuples are used to store more than one value under single name. They are used in order to store more than one value which are connected with each other. For Ex. Width and Height of UIControl,Coordinates of User Location etc. We can store more than one values with different data types in tuples. Dictionary : Dictionary is used at times to store data in Key Value pair. It is used at times when we want to label the values stored with some meaningful titles.
  1. What are 3rd party libraries using in iPhone Application Development?
Ans: 3rd Party Library : 3rd party libraries are set of files which are made available to developers in order to integrate some services into the application. For ex. In order to create custom controls, we require some classes and functions to achieve the controls.  
  1. Which Class used to get User Location in iPhone Application?
Ans:  In order to get user’s current location we use Core Location library where we get CLLocationManager class. CLLocationManager Delegate protocol is also used if we want to implement some more methods related to Location.
  1. What are Cocoapods in iPhone application Development?
Ans:  Cocoapods are referred as Dependency manager. As said, in order to integrate some services into our App, we need to have some libraries included in our project, it can be achieved by either including SDK related to it or by installing pods for same. Pods basically help us to download the related libraries over internet and add them into the project by using commands to download pods.
  1. What is the use of PList and Userdefault in iPhone Application?
Ans: UserDefault:  Userdefault is used to store data in key value pair. It is generally used to store data related to user preference or we can say to store user settings such as emailed,password,default color for app etc. Data stored using user default is available across the app, and remains permanently stored. PList:  PList file comes with an extension of .plist. It is another way of storing data in key value pair. We can store data in PList using Array,Dictionaries. Comparing PList with Userdefault, we can use Plist to store more data.
  1. What is the difference between XML and Json?
Ans: XML: XML stands for Extensible markup Language. XML is platform independent data format which can be then used to pass same to other platforms in order to share data with other apps.Data in XML format consists of user defined elements which also known as tags. JSON :Json stands for Javascript Object Notation, it is also data format which is used to read or write data and pass same to other applications or server etc. Json comes in format of Array and Objects. Json is also platform independent.
  1. What is WebService and WebAPI?
Ans : WebService :Web service is an application or we can say it is an service available over internet,Which can be integrated into our app in order to get benefit of that service . Web services uses SOAP protocol in order to transfer data into other app. WEBApi :WebApi is an API(Application Programming Interface) which is accessed over internet or we can say HTTP. WebApi is also used in order to pass data to other applications in JSON or XML format.
  1. What is the differencebetween ViewDidLoad and WillAppear?
Ans: ViewDidLoad:  View DidLoad is invoked at time when view is loaded in the ViewController. It happens once only. It is called when view is loaded in memory. ViewWillAppear: View WillAppear gets invoked everytime the view is about to appear. It can be used for ex. To load the data inside the controls or view before it is visible to user.
  1. Which techniques use to store data in iPhone Application?
Ans: We can store data using SQLite,CoreData,UserDefault,Plist
  1. What is Navigation Controller and AppDelegate Class in iPhone Application?
Ans: Navigation Controller: Navigation Controller is used when we want to navigate between view controllers or in other words it is used to push new view controller. AppDelegate:Appdelegate is an object which takes care of app when app enters into certain state. For ex. When app goes into background or when we want app to react on certain notifications, methods  inappdelegate is used.
  1. What isthe use of Notifications in iPhone application?
Ans:  Notifications is a way of providing some information to user in form of banner,alert,badge etc. Reminder App, Alarm, To-Do List are some which contains functionality of notifications. Notifications can be received when app is in background. Also we can get notification in foreground. We can add actions to Notifications which are displayed as alert to make them interactive.
  1. What is firebase?
Ans   Firebase is Google mobile platform that Providesdifferent services like online storages, notification services and analytics   services
  1. What is Memory lick in iOS ?
Ans : A memory leak occurs when a given memory space cannot be recovered by the system because it is unable to tell if this memory space is actually in use or not. One of the most common problems that generate memory leaks in iOS is retain cycles. This occurs when we make circular references between two or more objects
  1. What is memory management & ARC in iOS ?
Ans   Memory management in a Cocoa application that doesn’t use garbage collection is based on a reference counting model. When you create or copy an object, its retain count is 1. Thereafter other objects may express an ownership interest in your object, which increments its retain count. The owners of an object may also relinquish their ownership interest in it, which decrements the retain count. When the retain count becomes zero, the object is deallocated or destroyed 29What  isCore data in iPhone Application ? Ans Core Data is an object graph and persistence framework provided by Apple. It allows data organized by the relational entity–attribute model to be serialized into XML, binary, or SQLite stores.
  1. Which method isrequired to implement UITableviewin iPhone Application?
AnsWe required to implement below UITableView Discourse method – Data sources method – 1  number of section 2  number of rows 3  tableviewcellforrow 31   What is  WWDC ? Ans. it is   worldwide developer conferences in which all  new update and technologies are announces by Apple INC  like  New iOS,swift ,Xcode 32.What is  1x , 2x , 3x Icon for iPhone Application ? Ansit is icon set that will display according to devices like 5,6,7 33What  isUserdefault in iPhone Application Development ? Ans  it is also permanents storages of iphone it is basically used to transfer value from one viewcontroller to another viewcontroller .

PracticalQuestions :

1 .How to Call soap web services that contain json data inside xml  and create custom design and display parse data on it
  1. Call googleapi that contains lat and long and plot into google map
  2. Hoe to Call web api that take user id and password asper script request Header  and then           pass it parameter in body  ?
4 . If we place 2 tableview on single View than how can we show different -2 data in both tableview ?
  1. ifvari=5;
Than I=”deepak ” Is it valid otnot ?
  1. Write down syntax of tuple ?
  2. ifwe want to print array value in reverse order than how can we do it ?
  3. How can we create the object of any UIControl?
  4. Write down the sql query for inner join ?
  5. How can we add Scrollview as a subview of UIView

Tips & Tricks

Latest Blog

Which country is better for Indian Students for Study Abroad?17th November, 2018

Canada is among the top destinations for students who choose to study abroad. Students prefer Canada

How to migrate to Canada?17th November, 2018

If you have considered moving to Canada, either you already are on the path to apply for a PR throug

Study Abroad with Minimum finance17th November, 2018

For many Indian students aspiring for high-quality education abroad, scholarships become a great h

How to Become a Good Designer?8th October, 2018

Graphic, Web, Animation, VFX, UI, UX There are plethora of options for a designer to make an amaz

Is Digital Marketing a Right Career For You?2nd October, 2018

Digital Marketing is an industry in itself that is growing rapidly since its inception. And since th

Our Events

Gyanmanjari Institute Of Technology Industrial Visits on 30th June 2018

Gyanmanjari Institute Of Technology Industrial Visits on 30th June at TOPS Technologies TOPS Techno

Android, Laravel, Python, Java and iOS Workshop at TOPS Technology

Android, Laravel, Python, Java and iOS Workshop at TOPS Technology We are happy to share that once

Project Documentation Workshop at TOPS Technologies

Project Documentation Workshop TOPS Technologies have organized “Project documentation” worksho

Final Year Project Documentation Workshop

Final Year Project Documentation Workshop Project Documentation, Project Definition, project Submis

Industrial Visit in the month of March and April at TOPS Technologies

Industrial Visits in the month of March and April at TOPS Technologies TOPS Technologies always bel