Question:- Explain the different types of iOS Application States.
Answer:- ou will experience a few app states while using the application. There are five states in the ios application as follows. • Not Running The application is in the Not running state, if the app is not launched yet or if the application is not visible on the screen or also there is the possibility that the application is terminated by the user or by OS. • Inactive An inactive state occurs when the application is not receiving events but the app is running in the background. An app transitions to a different state. when the user locks the screen or the system prompts the user to respond to some event such as a phone call or SMS message is the only time it stays inactive. • Active In an ios application, Active State is the main executive state. In this state, the app is running in the foreground and the UI is accessible. • Background Before being suspended most of all apps enter this state. If an app requests extra execution time then that will remain in this state for some more time. Also, an application will be launched directly into the background enters this background state instead of the inactive state • Suspended In a suspended state the application does not execute any code. The system purges suspended apps without any notice to make more space for the foreground app when a low-memory condition occurs.
Question:- What is Dynamic Dispatch?
Answer:- At runtime, Dynamic Dispatch determines which implementation of a polymorphic procedure, such as a method or a function, to call. This means that when we want to call our methods, such as object methods, we must use this syntax. Swift, on the other hand, does not use dynamic dispatch by default.
Question:- What is GCD?
Answer:- The GCD stands for Grand Central Dispatch. It is a low-level API that allows you to manage multiple concurrent operations. It will assist you in increasing the responsiveness of your app by deferring computationally intensive tasks to the context. It’s a simpler concurrency model than locks and threads to deal with.
Question:- What are the advantages of the Realm framework?
Answer:- • To handle all of the work, only a small amount of code is needed. • Available in both Object C and Swift. • SQLite and Core Data have slower performance. • Database files can be shared easily between iOS and Android devices. • There is no fee, no charge. • There is no limit to the data amount that can be stored. • Regardless of huge data sets or massive storage, consistent speed and consistency
Question:- What are the different ways to specify the layout of elements in UIView?
Answer:- Here are a few common ways to specify the layout of elements in UIView: Using InterfaceBuilder, we can add a XIB file to our project, layout elements within it, and then load XIB in our application code (either automatically, based on naming conventions, or manually). Also, using InterfaceBuilder, we can create a storyboard for our application. We can write our own code to use NSLayoutConstraints and have elements in a view arranged by Auto Layout. We can create CGRects describing the exact coordinates for each element and pass them to UIView’s (id)initWithFrame:(CGRect)frame method.
Question:- What is SpriteKit and what is SceneKit?
Answer:- SpriteKit is a platform for creating animated 2D objects quickly and easily. SceneKit is a platform for 3D graphics rendering that was inherited from OS X. SpriteKit, SceneKit, and Metal are expected to boost a new generation of mobile games that push the boundaries of what the powerful GPUs in iOS devices can do.
Question:- Differentiate between a frame and a bound?
Answer:- A UIViews bounds are a rectangle with a size (width, height) and position (x,y) relative to its own coordinate system (0,0). A UIViews frame is a rectangle with a scale (width, height) and position (x,y) relative to the superview it is located within.
Question:- How to Prioritize Usability in Design?
Answer:- To prioritize usability, the design process has broken down into 4 steps: • Consider the user’s perspective when designing the user experience. • Users, not demographics, are what you should focus on. • Consider all of the scenarios in which an app might be useful when promoting it. • Even after the app has been released, continue to improve its functionality.
Question:- Explain iBeacons?
Answer:- Apples introduction of Bluetooth low-energy (BLE) wireless technology, iBeacon, is a new way for iPhones and other iOS users to receive location-based information and services.
Question:- Describe managed object context and its function.
Answer:- A managed object context (represented by an instance of NSManagedObjectContext) is a temporary scratchpad in an application for a (presumably) related collection of objects. These objects collectively represent an internally consistent view of one or more persistent stores. A single-managed object instance exists in one and only one context, but multiple copies of an object can exist in different contexts. The key functions of the managed object context include the following: • Life-cycle management: Here, the context provides validation, inverse relationship handling, and undo/redo. • Notifications: It refers to context posts’ notifications at various points that can be optionally monitored elsewhere in our application. • Concurrency: Here, the Core Data uses thread (or serialized queue) confinement to protect managed objects and managed object contexts.
Question:- Why is the design pattern very important?
Answer:- Design patterns are important in software design because design patterns are reusable solutions to many common problems. They’re models for writing code that’s simple to comprehend and reuse. The most popular design trends in Cocoa are as follows: • Creational: Singleton. • Structural: Decorator, Adapter, Facade. • Behavioral: Observer, and, Memento
Question:- What is Concurrency?
Answer:- Concurrency is a fancy term for “running several tasks at the same time.” On iOS devices, concurrency is commonly used to allow you to run tasks such as downloading or processing data in the background while keeping your user interface sensitive.
Question:- Mention various ways to achieve concurrency in iOS?
Answer:- Mainly, there are 3 ways to achieve concurrency in iOS. There are: • Grand Central Dispatch • OperationQueue • Threads
Question:- What is meant by deadlock?
Answer:- A deadlock is a situation that occurs when at least two threads are locked on a different resource, and both are waiting for the other resource to finish its job. And no one is able to unlock the resource it is guarding.
