IOS interview questions for freshers/IOS Interview Questions and Answers for Freshers & Experienced

What is meant by Enumerations or Enum?

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

What do you understand by Memento Pattern?

A design pattern in which you can save stuff somewhere. This externalized state can be later restored without violating encapsulation and maintaining the privacy of data. iOS has specialized implementations of the pattern and uses it as a part of State Restoration.

What is the lazy property in swift?

When the property is called for the first time, an initial value of the lazy stored properties is calculated. In many situations, lazy properties come handy to developers.

What do you know about TVMLKit?

TVMLKit is the glue between JavaScript, TVML, and the native tvOS application.

What are the three significant benefits of guard statement?

The benefits are:

1. There are no nested if let statements
2. An early exit out of the function using return or using break
3. Guard statement safely unwrap optionals.

What is the difference between ‘bundle ID’ and ‘app ID’?

The bundle ID is specified in Xcode, and it defines each App. A single project can have multiple targets and can output multiple apps. Use: it is branded multiple ways and has both free/lite and full/pro versions.

App ID is used to identify one or more apps from a single development team. It is a two-part string with a period(.) separating Team ID and bundle IF search string. The bundle ID search string is supplied by the developer, while Apple supplies the Team ID.

From where should UIKit classes be used?

UIKit classes should be used from the application’s main thread only.

When an app is launched, what are its state transitions like?

Before launch, an app is not said to be running. After a brief transition through the inactive state, it moves to the background or the active state when it is launched.

What do you understand by iBeacons?

iBeacon is the technology standard by Apple that allows mobile apps to listen from signs from beacons and react accordingly. This technology allows Mobile Apps to understand their position and deliver hyper-contextual content to users based on their location. The underlying technology is Bluetooth Low Energy.

List class hierarchy of a UIButton until NSObject.

NSObject->UIResponder_>UIView->UIControl->UIButton.

Give the difference between nonatomic and atomic properties. Which is preferred

Atomic properties always return a fully initialized object. However, it comes at the cost of performance. If there is a property that you know has no risk on initializing value, then set it to nonatomic can gain a bit of performance.

What is the use of application:willFinishLaunchingWithOptions and application:didFinishLaunchingWithOptions?

Both of these methods are present in AppDelegate.swift file and are used to add functionality to the App when the App is going to be launched.

Specify the three rendering options for JSONSerialization.

The rendering options are:

1. MutableLeaves: Lead strings in the JSON object graph are created as variable strings’ instances.
2. allowFragments: The parser allows top-level objects that are not array or dictionaries’ instances.
3. MutableContainers: Dictionaries and arrays are not constants but variable objects.

What is a tuple in swift?

A temporary container for multiple values is called a tuple. It is a list comma-separated type and is enclosed in parentheses.

What is meant by QOS in app development?

QOS stands for Quality of Service.

Give the use of KVC or Key-value coding.

KVC is used to access a property or value with the help of a string.

Which JSON framework is supported by iOS (iPhone OS)?

1. SBJson framework is supported by iOS. It is a JSON parser and generator for Objective-C (Objective-C is the primary programming language we use when writing software for OS X and iOS. It is a superset of the C programming language and provides object-oriented capabilities and a dynamic runtime).

2. SBJson provides flexible APIs and additional control that makes JSON handling easy.

Which is the application thread from where UIKit classes should be used?

Unless it’s stated, use UIKit classes only from your application’s main thread or main dispatch queue. This restriction applies in particular to classes derived from UIResponder or that require modifying the user interface of your app in some way.

What is the difference between Synchronous & Asynchronous tasks?

Synchronous can also be defined as In order. When you perform the synchronous operation, all that follows must wait for the operation to complete before proceeding.
In contrast, “asynchronous” can also be defined as “out of order.” When you do something asynchronously, you can run the following code right away, and the asynchronous process will happen someday. It could be run on a separate thread from the rest of the code. It could easily be rescheduled on the same thread at a later date and you can notify you when it is done.

What is made up of NSError object?

There are three parts of NSError object a domain, an error code, and a user info dictionary. The domain is a string that identifies what categories of errors this error is coming from.

What are the essential certificates for issuing and developing apps, either Android or iOS?

The certificate types are:

1. Development Certificate
2. Distribution Certificate
3. Development and Distributing Certificates

Give the use of KVC or Key-value coding.

KVC is used to access a property or value with the help of a string.

What is ‘assign’ in iOS?

In iOS, ‘assign’ is used to create an orientation from one object to the other without raising the retain count of the source object.

Why is ‘reuseIdentifier’ used?

The ‘reuseIdentifier’ is used to group all the similar rows from UITableView.

How can you reduce the size of the App?

The three different methods to reduce app size are:

1. Bit code
2. On-demand Resource
3. App Slicing

What is the difference between retaining and copy?

Retaining an object means increasing the retain count by one. The instance of the object is kept in memory till its retain count drops to zero. A reference to the instance is stored, and the same is shared with anyone who retained it. At the same time, copy means that the object will be cloned with duplicated value, but it cannot be shared with anyone else.

What do you understand by category? When is it used?

A category is a way to add additional methods to a class without extending it. It is used to add a collection of related methods and additional methods to built-in classes in the Cocoa Frameworks.

Out of viewDidLoad and viewDidAppear, which should be used to load data from a remote server to display in the view?

It is dependent on the data’s use case. If data is static and is not likely to change, it can be loaded in viewDidLoad and cached. Whereas, if data changes regularly, use viewDidAppear to load it.

What is a protocol, and how to define it?

Like an interface in Java, the protocol defines a list of optional and required methods that a class can/must implement to adopt the protocol. Any class can define a protocol, and other classes can send protocol method-based messages to the class without knowing its type.

What is MVC? Tell about its implementation in iOS.

MVC or Model View Controller is a design pattern that defines how logic will be separated when the user interface is implemented. In iOS, UIView is the base class provided by Apple for all views, and UIViewController is provided to support the Controller, which listens to events in a View and updates it when data changes.

How can you respond to state transitions on your app?

State transitions can be responded to state changes in an appropriate way by calling corresponding methods on the app’s delegate object.

For example:

* applicationDidBecomeActive( ) method: To prepare to run as the foreground app.

* applicationDidEnterBackground( ) method: To execute some code when the app is running in the background that may be suspended at any time.

* applicationWillEnterForeground( ) method: To execute some code when the app is moving out of the background.

* applicationWillTerminate( ) method: Called when the app is being terminated.

What do you understand by dynamic dispatch?

The process of selecting which implementation of a polymorphic operation to call at run time is called Dynamic dispatch. It is used when we need to invoke our methods like the object method.

What is @synthesize in Objective-C?

synthesize generates getter and setter methods for your property.

What is @dynamic in Objective-C?

We use dynamic for subclasses of NSManagedObject. @dynamic tells the compiler that getter and setters are implemented somewhere else.

Why do we use synchronized?

synchronized guarantees that only one thread can be executing that code in the block at any given time.

What is Dynamic Dispatch?

Dynamic Dispatch is the process of selecting which implementation
of a polymorphic operation that’s a method or a function to call at run time. This means, that when we wanna invoke our methods like object method. but Swift does not default to dynamic dispatch.

What’s Code Coverage?

Code coverage is a metric that helps us to measure the value of our unit tests.

What’s Completion Handler?

Completion handlers are super convenient when our app is making an API call, and we need to do something when that task is done, like updating the UI to show the data from the API call. We’ll see completion handlers in Apple’s APIs like dataTaskWithRequest and they can be pretty handy in your own code.

How to Prioritize Usability in Design ?

Broke down its design process to prioritize usability in 4 steps:

* Think like the user, then design the UX.
* Remember that users are people, not demographics.
* When promoting an app, consider all the situations in which it could be useful.
* Keep working on the utility of the app even after launch.

What’s the difference between the frame and the bounds?

The bounds of a UIView is the rectangle, expressed as a location (x,y) and size (width, height) relative to its own coordinate system (0,0).
The frame of a UIView is the rectangle, expressed as a location (x,y) and size (width, height) relative to the superview it is contained within.

What is Regular expressions?

Regular expressions are special string patterns that describe how to search through a string.

What is TVMLKit?

TVMLKit is the glue between TVML, JavaScript, and your native tvOS application.

What is Platform limitations of tvOS?

First, tvOS provides no browser support of any kind, nor is there any WebKit or other web-based rendering engine you can program against. This means your app can’t link out to a web browser for anything, including web links, OAuth, or social media sites.

Second, tvOS apps cannot explicitly use local storage. At product launch, the devices ship with either 32 GB or 64 GB of hard drive space, but apps are not permitted to write directly to the onboard storage.

What is Functions?

Functions let us group a series of statements together to perform some task. Once a function is created, it can be reused over and over in your code. If you find yourself repeating statements in your code, then a function may be the answer to avoid that repetition.

What is ARC?

ARC (Automatic Reference Counting) is a compiler-level feature that defines the process of managing the lifetime of objects in objective-C.

Define Cocoa/Cocoa touch?

It is used for building software codes to run on iOS for the iPad and iPhone. Cocoa Touch is written in the objective-C language and has a different set of graphical control elements to Cocoa.

What is the difference between atomic and nonatomic synthesized properties?

Atomic:

Default behavior
Not fast
Make certain the process is completed entirely by CPU

Nonatomic:

Not default behavior
Faster
Not able to deal with multiple requests at the same time

What is Operator Overloading?

The process of adding new operators and changing existing ones to do various things is known as operator overloading.

+, *, and / symbols are known as operators.

When is an app said to be in not running the state?

It is said when it is not launched or gets terminated by the system while running.

When would you say that an app is in an active state?

An app is said to be in an active state when it is accepting events and running in the foreground.

Search
R4R Team
R4R provides IOS Freshers questions and answers (IOS Interview Questions and Answers) .The questions on R4R.in website is done by expert team! Mock Tests and Practice Papers for prepare yourself.. Mock Tests, Practice Papers,IOS interview questions for freshers,IOS Freshers & Experienced Interview Questions and Answers,IOS Objetive choice questions and answers,IOS Multiple choice questions and answers,IOS objective, IOS questions , IOS answers,IOS MCQs questions and answers Java, C ,C++, ASP, ASP.net C# ,Struts ,Questions & Answer, Struts2, Ajax, Hibernate, Swing ,JSP , Servlet, J2EE ,Core Java ,Stping, VC++, HTML, DHTML, JAVASCRIPT, VB ,CSS, interview ,questions, and answers, for,experienced, and fresher R4r provides Python,General knowledge(GK),Computer,PHP,SQL,Java,JSP,Android,CSS,Hibernate,Servlets,Spring etc Interview tips for Freshers and Experienced for IOS fresher interview questions ,IOS Experienced interview questions,IOS fresher interview questions and answers ,IOS Experienced interview questions and answers,tricky IOS queries for interview pdf,complex IOS for practice with answers,IOS for practice with answers You can search job and get offer latters by studing r4r.in .learn in easy ways .