- Core OS ( or Application) Layer: Core OS Layer sits directly on top of the device hardware and is the bottom layer of the iPhone OS stack. In addition to basic operating system services, such as memory management, handling of file systems, and threads, this layer provides low-level networking, access to external accessories, etc.
- Service Layer: Its purpose is to design the services that upper layers or users demand. Among its other essential features are block objects, Grand Central Dispatch, in-app purchases, and iCloud storage. The service layer has been strengthened by the addition of ARC Automatic Reference Counting.
- Media Layer: It handles media like video, audio, graphics, etc. The media layer will allow us to use all graphics, video, and audio technology of the system.
- Cocoa Touch Layer: It is also known as the application layer. This is the place where frameworks are created when applications are built. In addition, it functions as the interface for iOS users to work with the operating system. This includes touch and motion capabilities.
iOS Interview Questions and Answers
Freshers / Beginner level questions & answers
Ques 1. What is iOS?
iOS stands for "iPhone Operating System".
It is the operating system for Apple devices, and it is considered the second most popular mobile operating system globally after Android.
This operating system powers many of Apple's products including the iPhone, iPad, and iPod. iOS is widely praised for its intuitive and user-friendly interface.
Ques 2. What are the features of the iOS Platform?
- The iPhone offers multitasking capabilities. On an iOS device, you can easily switch between apps using the multitasking feature or a multi-finger gesture.
- iOS helps you easily integrate social network interactions with your app by displaying an activity stream and sharing content.
- Apple's iCloud service allows users to store data on the Internet. It offers a high level of encryption and a backup option to ensure the user does not lose data.
- Apple's in-app purchases are available on all platforms, offering users additional services and materials including digital items (iOS, iPad, macOS), subscriptions, and premium content.
- You can see all of your app alerts in the Notification Center in iOS. However, the notification settings can be modified.
- iOS is a closed system. The source code of Apple's apps isn't available for developers, and iPhone and iPad owners can't modify the code on their devices. This makes iOS-powered devices harder to hack.
Ques 3. Explain the Architecture of iOS.
iOS operates in a Layered structure.
iOS Architecture is comprised of four layers, each of which offers a programming framework for creating applications that operate on top of the hardware. Communication will be enhanced by the layers between the Application Layer and the Hardware Layer. A lower-level layer provides the services that all applications require, while an upper-level layer (or high-level layer) provides graphics and interface-related services.
Ques 4. What do you mean by property in iOS?
Properties are basically values that are associated with a class, struct, or enum. They can be thought of as "sub-variables," i.e., parts of another object.
Example:
struct Building {
var name: String = ""
}
var apartment = Building()
apartment.name = "Prestige"
In the above code, we created a structure called Building. One of its properties is called name, a String whose initial value is empty.
Ques 5. Define the classification of Properties in iOS.
Stored Properties: This type of property can be used to store constant or variable values as instances and is usually provided by classes and structures.
class Programmer {
var progName: String
let progLanguage: String
var totalExperience = 0
var secondLanguage: String?
}
Computed properties: These properties can be used to calculate values instead of storing them and are usually provided by classes, enumerations, and structures.
struct Angle {
var degrees: Double = 0
var rads: Double {
get {
return degrees * .pi / 180
}
set(newRads) {
degrees = newRads * 180 / .pi
}
}
}
Ques 6. Tell the difference between atomic and nonatomic properties in iOS.
Atomic Property: It is the default property and ensures a valid value will be returned from the getter or set by the setter. This ensures that only one thread can access the getter/setter of a given property at a time and that all other threads must wait until the first thread releases the getter/setter. Despite being thread-safe, it is not fast, since it ensures that the process is completely completed.
Non-Atomic Property: With non-atomic properties, multiple threads can access the getter/setter method of a given property at the same time, so the potential for inconsistency between values exists. They come with enhanced access, but no guarantee of the return value.
Ques 7. What are different types of iOS Application States?
Ques 8. What is an iOS developer and what are his responsibilities?
Ques 9. Tell the differences between Android and iOS.
Android: It is the mobile operating system for Android devices offered by Google LLC (limited liability company) and is focused on touchscreen mobile devices like smartphones and tablets. Several programming languages were used in its development, including C, Java, C++, and others.
iOS: It is the operating system for Apple devices offered by Apple incorporation and it is considered the second most popular mobile operating system globally after Android. It is primarily designed for Apple mobile devices like the iPhone, iPod Touch, etc. Several programming languages were used in its development, including Objective-C, Swift, C++, and others.
For more differences, please check here.
Ques 10. What are the programming languages used for iOS development?
Programming languages used for iOS development are:
- HTML5
- .NET
- C
- Swift
- Javascript
- Objective-C
Ques 11. Explain the object.
Objects are mainly the variables that are of class types. It can be a function, method, data structure, or variable.
Ques 12. Which framework is used to construct the application’s user interface?
UIKIT framework. It renders drawing models, windows, event handling, and views.
Ques 13. When is the category used?
It is used to add a set of related methods and to add additional methods in the Cocoa framework.
Ques 14. 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.
Ques 15. What are UI Elements in iOS?
The visual elements that we can see in our applications are known as UI elements. Some of these components, such as buttons and text fields, respond to user interactions, while others, such as images and labels, provide information.
Ques 16. What is Objective-C?
Objective-C is the primary programming language for writing applications for OS X and iOS. It’s an object-oriented programming language with a dynamic runtime that’s a superset of the C programming language. Objective-C takes C’s syntax, primitive types, and flow control statements and adds class and process definition syntax.
Ques 17. List class hierarchy of a UIButton until NSObject.
NSObject -> UIResponder -> UIView -> UIControl -> UIButton.
Ques 18. What is MVC? Tell about its implementation in iOS.
MVC (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.
Most helpful rated by users:
- What does KVO stand for?
- Which is the application thread from where UIKit classes should be used?
- What is iOS?
Related differences
Related interview subjects
iOS interview questions and answers - Total 52 questions |
Ionic interview questions and answers - Total 32 questions |
Android interview questions and answers - Total 14 questions |
Mobile Computing interview questions and answers - Total 20 questions |
Xamarin interview questions and answers - Total 31 questions |