Search Your Question

Showing posts with label Capgemini. Show all posts
Showing posts with label Capgemini. Show all posts

Explain NSOPERATION Priority.

Ans : 

All operations may not be equally important. Setting the queuePriority property will promote or defer an operation in an NSOperationQueue according to the following rankings:

public enum NSOperationQueuePriority : Int {
    case VeryLow
    case Low
    case Normal
    case High
    case VeryHigh

}

The operations with high priority will be executed first.

let backgroundOperation = NSOperation()
backgroundOperation.queuePriority = .Low

let operationQueue = NSOperationQueue.mainQueue()
operationQueue.addOperation(backgroundOperation)

What is QOS?

Ans : 

QOS - Quality of Services

A quality-of-service (QoS) class categorizes work to be performed on a DispatchQueue. By specifying the quality of a task, you indicate its importance to your app. When scheduling tasks, the system prioritizes those that have higher service classes.

Because higher priority work is performed more quickly and with more resources than lower priority work, it typically requires more energy than lower priority work. Accurately specifying appropriate QoS classes for the work your app performs ensures that your app is responsive and energy efficient.

Levels of Priority
After an app kicks off and starts a runloop on the main thread, one can begin taking advantage of QoS. QoS breaks out priorities into four different groups. Each one corresponds to common tasks one might find themselves coding in their iOS endeavors.
  • User Interactive: Work that happens on the main thread, such as animations or drawing operations.
  • User Initiated: Work that the user kicks off and should yield immediate results. This work must be completed for the user to continue.
  • Utility: Work that may take a bit and doesn’t need to finish right away. Analogous to progress bars and importing data.
  • Background: This work isn’t visible to the user. Backups, syncs, indexing, etc.


There are five global queues having quality of service level ranging  from high performance to high energy efficiency. 
  1. DispatchQueue.global(qos: .userInteractive) - highest priority
  2. DispatchQueue.global(qos: .userInitiated)
  3. DispatchQueue.global() // default
  4. DispatchQueue.global(qos: .utility)
  5. DispatchQueue.global(qos: .background) - lowest priority 
DispatchQueue.global(qos: .userInteractive).async {
 // Event handling task
}


What is apple enterprise account?

Ans : 

To Develop and Distribute app, there are two types of licence available.

1. Apple Developer
2. Apple Developer Enterprise

Difference : 



Source : LeoLearning