InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Write the difference between assign and retain keywords. |
Answer»
Example: if (object != object) { [object release]; object = nil; object = object; }Here, Assign will generate a setter that assigns the value to the instance variable directly, RATHER than copying or retaining it.
Example: if (object != object) { [object release]; object = nil; object = [object retain]; }A retain message prevents an object from being deallocated until you are done using it. |
|
| 2. |
What do you mean by the SpriteKit and SceneKit framework in the context of game development? |
|
Answer» SpriteKit: This framework is designed to make it easier and faster for GAME developers to CREATE animated 2D assets/objects in casual games. With it, you can DRAW shapes, particles, text, images, and videos in two dimensions. SceneKit: It is an iOS framework inherited from OS X, which helps to create 3D graphics. With SceneKit, you can build 3D animated scenes and effects for your iOS games and APPS. |
|
| 3. |
State the difference between App ID and Bundle ID? |
Answer»
|
|
| 4. |
Write different ways to achieve concurrency in iOS? |
|
Answer» Concurrency means "running multiple tasks simultaneously". Concurrency allows iOS devices to HANDLE background tasks (such as downloading or processing data) while maintaining a responsive user interface. In iOS, you can manage concurrent tasks using Grand Central Dispatch (or GCD), and Operations (formally known as NSOperation). In order to achieve concurrency, iOS provides three WAYS as follows:
|
|
| 5. |
What is the framework that is utilized to build an application's interface for iOS? |
|
Answer» Contrary to the Foundation framework that defines classes, protocols, and FUNCTIONS for both iOS and OS X development, UIKit is specifically designed for iOS development. In iOS, the USER interface and graphical infrastructure of the application are developed using UIKit. It includes:
|
|
| 6. |
Which programming languages are used for iOS development? |
|
Answer» IOS DEVELOPMENT is done using the following programming LANGUAGES:
|
|
| 7. |
State the difference between Cocoa and Cocoa Touch. |
||||||||
|
Answer» Cocoa and Cocoa Touch are two of Apple's widely used application frameworks used for building applications. However, they differ in the following ways:
|
|||||||||
| 8. |
What is ARC (Automatic Reference Counting)? |
|
Answer» In the Swift programming language, automatic reference counting (ARC) is used to manage apps' MEMORY usage. It initializes and deinitializes system resources, thereby releasing memory reserved by a CLASS instance when it no longer needs it. ARC keeps track of how many PROPERTIES, constants, and variables currently refer to each class instance. When there is at least one active reference to an instance, ARC will not deallocate that instance. The use of ARC concepts is an essential part of iOS development. Functions of ARC -
|
|
| 9. |
Explain what is GCD (Grand Central Dispatch) in iOS. |
|
Answer» Grand Central Dispatch (GCD) is a low-level API that enables USERS to RUN concurrent tasks (occurring simultaneously) by managing threads in the background. Grand Central Dispatch is Apple's SOLUTION to build concurrency and parallelism into iOS applications, so multiple background tasks can be run concurrently in the background without affecting the main thread. It was introduced in iOS 4 to avoid the tedious process of serial execution of tasks. |
|
| 10. |
What do you mean by deep linking in iOS? |
|
Answer» Deep links are links that SEND users directly to an app directly instead of a website or store USING URI (Uniform resource locator) or universal links. The URL scheme is a well-known method of having deep links, but Universal Links are Apple's new approach to connecting your web page and your app under the same link. Deep linking involves not only creating a clickable link that opens up your app, but ALSO a smart one that navigates to the resource you desire. Users are directed straight to in-app locations using these links, which saves them the time and effort of finding those pages themselves thus IMPROVING their user experience tremendously. Explanation: If you use the URL fb://, you may open the Facebook app. However, if you use fb://profile/33138223345, you will open Wikipedia's profile in the Facebook app. |
|
| 11. |
State the difference between Android and iOS. |
||||||||||||||||
|
Answer» 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. Difference between iOS and Android -
|
|||||||||||||||||
| 12. |
What is an iOS developer and what are his responsibilities? |
|
Answer» An iOS developer is a programmer or software engineer who designs and develops APPLICATIONS that run Apple's iOS on iOS devices. Ideally, the iOS developer should be skilled in two PROGRAMMING languages i.e., Objective-C and Swift. Main Responsibilities of an iOS Developer
|
|
| 13. |
What are different types of iOS Application States? |
|
Answer» During the course of its execution, an iOS application GOES through a series of states. Each of these states is REFERRED to as an application's lifecycle state. Below are the five possible states for an iOS app:
|
|
| 14. |
Can you explain the difference between atomic and nonatomic properties? What is the default for synthesized properties? |
|
Answer» 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. |
|
| 15. |
What do you mean by property in iOS? |
|
Answer» 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 Icecream { var flavor: String = ""} var choco = Icecream() choco.flavor = "Chocolate Icecream"In the above code, we created a structure called Icecream. One of its properties is called flavor, a String whose initial value is empty. Classification of Properties
Example: class Programmer { var progName: String let progLanguage: String var totalExperience = 0 var secondLanguage: String?}Above, the Programmer class defines four stored properties: progName, progLanguage, totalExperience, and secondLanguage. These are all stored properties since they can contain values that are part of the instance of the class. The above example shows properties with and without default values, as well as an optional one.
Example: struct Angle { var degrees: Double = 0 var rads: Double { get { return degrees * .pi / 180 } set(NEWRADS) { degrees = newRads * 180 / .pi } }}As mentioned above, the angle structure has a stored property called degrees for storing angles in degrees. Moreover, angles can also be expressed in radians, so the Angle structure contains a Rads property, which is a computed property. |
|
| 16. |
Explain the Architecture of iOS. |
|
Answer» 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.
|
|