YouTube Icon

Interview Questions.

Top 100+ Cocoa Api Interview Questions And Answers - May 28, 2020

fluid

Top 100+ Cocoa Api Interview Questions And Answers

Question 1. What Is Cocoa?

Answer :

Cocoa is an utility surroundings and a collection of object orientated additives to expand OSX and iOS Apps.
Cocoa apps are broadly speaking evolved using Objective C & Swift language.
Objective C is based totally out of ANSI C as a consequence ANSI C code can be mixed with Objective C code even as developing a Cocoa Application.
Cocoa Applications also can encompass C++ code.
Cocoa has 3 center frameworks:

Foundation Framework (Part of the middle service layer).
App Kit Framework (Application Frameworks).
Core Data Framework.
Question 2. What Does Cocoa Offer?

Answer :

Event Driven Behavior – Cocoa offers the infrastructure for event driven conduct.

It allows control utility, windows and workspaces

Has a wealthy library of person interface objects to be had in Interface builder. UI Objects may be dragged dropped from the interface builder or can be produced from code. Some pattern UI items are (buttons, tables, views, home windows, panels, drawers, segmented manage and so on).

Supports the subsequent:

Drawing and imaging
Interaction with document machine and workspaces
Concurrency, multithreading , lazy loading and so forth
Internationalization
Different text illustration
Maintains software options
Networking, communication with servers
Printing support, primary printing to superior printing options consisting of pagination and content formatting
Handles Undo and Redo control
Audio and Video the use of QuickTime framework
Data exchange the use of Copy Paste and Drag Drop
Document based structure (similar to word or excel)
Script-ability, i.E Applications responding to instructions emitted from Apple Scripts (e.G: Play, Pause songs in iTunes using Apple Scripts).
CSS3 Interview Questions
Question three. What Are The Different Layers Of The Mac Osx?

Answer :

The Mac OSX is layered into the subsequent:

User Experience:

Aqua
Dashboard
Spotlight
Accessibility
Application Frameworks:

Carbon
Java
Applet
Graphics and Media (Application Services):

Core Animation
Core Image
Core Video
QuickTime
OpenGL
Quartz
Core Audio
Core Services:

Carbon Core
Launch Services
Core Foundation
Foundation
Question four. What Is The Main Development Environment For Cocoa?

Answer :

XCode and Interface Builder (For UI Development the usage of drag and drop from an item library).
Applications also can be built the use of a text editor and building the application from command line the use of make files and use the gdb debugger to debug the software from command line.
Using XCode and Interface builder it's miles very smooth to design, manage, construct and debug software program products.
CSS3 Tutorial
Question 5. What Is Xcode?

Answer :

XCode is the engine that powers Apple’s incorporated improvement environment (IDE) for OSX and iOS.

Using XCode developers can:

Create and Manage Projects,
Specify systems and goals, Dependencies and Build Configurations
Build the task
Debug the venture
Can construct code written in C, C++, and Objective C
Create image consumer interface.
Manage Source Code the use of subversion & git.
HTML five Interview Questions
Question 6. What Are The Compiling Options In Xcode?

Answer :

GCC : The GNC C Compiler (gcc)
LLVM: GCC (Low degree virtual gadget compiler). Provides beyond optimization instances.
Clang: Fast compile times and diagnostics
Question 7. What Is Interface Builder?

Answer :

Interface builder is a graphical device for developing person interfaces.

Has the subsequent design element:

Nib Files /XIB files:incorporates the gadgets performing on a consumer interface in an archived shape.
Objects Library: Contains a list of UI Objects.
Inspector: Used for configuring the gadgets of a consumer interface.
Connection Panel: connects stores to moves.
HTML 5 Tutorial IPHONE APPS Interview Questions
Question eight. What Are The Performance Tools Available For Cocoa Application Development?

Answer :

Instruments : Instruments can be used to reveal the following

CPU Usage
Disk Reads and Writes
Memory Statistics
Thread interest
Network information etc
Shark: Traces feature calls and graphs memory allocation.

Big Top: Graphs overall performance traits.

Spin Control: Gathers information approximately what the utility became doing when the rainbow spinner appeared.

Malloc Debug: Shows how a good deal reminiscence the utility is ingesting and which features allotted huge amounts of reminiscence. Also allows locate leaks with the aid of locating allocated reminiscence that is not referenced everywhere within the software.

Quartz Debug: enables debug packages that do massive quantities of drawing and imaging.

Question nine. What Are The Primary Cocoa Frameworks Required To Build A Cocoa Application?

Answer :

There are two predominant frameworks required for building Cocoa Applications:

Mac OSX Cocoa Applications– Appkit Framework and Foundation Framework.
IOS Apps – UIKit Framework and Foundation Framework.
IOS Interview Questions
Question 10. What Is Foundation Framework; Specify Some Of Its Features?

Answer :

The Foundation framework defines a base layer of instructions that may be used for any type of Cocoa software.

Foundation framework is designed for:

Define simple item behavior and introduce consistent conventions for such things as reminiscence management, object mutability, and notifications.
Supporting internationalization and localization with (amongst other things) package era and Unicode strings.
For supporting item endurance.
For supporting item distribution.
Providing a few measure of running-machine independence to guide portability.
Providing item wrappers or equivalents for programmatic primitives, such as numeric values, strings, and collections. It also presents utility training for getting access to underlying system entities and services, such as ports, threads, and report structures.
The foundation elegance hierarchy is rooted at NSObject Class together with NSObject and NSCopying protocols
The Foundation Framework is logically grouped into Categories.

Value Objects:

Encapsulates values of primitive information types including strings, integers , floats, dates and many others
NSNumber instantiates numbers that consists of integers, floats, doubles
NSDate, NSTimeZone, NSCalendar, NSDateComponents affords items that constitute times, dates, calendar and locales
Collections:

NSArray, NSDictionary, NSSet together with the mutable variations
Operation System Services:

File System and URL NSFileManager. NSFileHandle, NSURL and many others
Concurrency NSThread, NSOperation, NSOperationQueue
Interprocess Communication – NSPipe
Networking – NSNetService, NSNetServiceBrowser
Notifications

Archiving and Serialization

XML Processing – NSXML

Predicates and Expressions – NSPredicate, NSCompoundPredicate, NSComparisonPredicate.

Spotlight Queries NSMetadataItem. NSMetadataQuery.

IPHONE APPS Tutorial
Question eleven. What Is Appkit Framework; Specify Some Of Its Features?

Answer :

Appkit framework is wanted for implementing graphical, event -driven user interface in OSX like window, buttons, panels, menus, scroller, textual content discipline, desk views and so forth.

The root of the Appkit framework is the NSResponder class.

Appkit is divided ordinarily into these regions:

User Interface Classes
Global Application Object – NSApplication
Windows and Views – NSWindow, NSView
Controller Classes – NSObjectController, NSArrayController, NSDictionaryController, NSTreeController
Panels (Dialogs) – NSPanel
Menus and Cursors – NSMenu, NSMenuItem, NSCursor
Grouping and Scroll Views – NSBox, NSScrollView, NSSplitView and many others
Tables and Outline Views
Text and Fonts – NSFont, NSFontManager.

Graphics and Colors – NSImage, NSColor, NSColorPanel. NSColorWell, NSGraphicsContext, NSBezierPath and many others.

Printing and Faxing (NSPrinter, NSPrintPanel, NSPageLayout, NSPrintInfo).

Document and File System Support NSFileWrapper, NSFileManager.

Sharing Data with other programs – NSPasteBoard.

Drag & Drop.

Spell Check – NSSpellServer.

Swift Programming Interview Questions
Question 12. What Is The Basic Difference Between The Foundation And The Appkit Framework?

Answer :

Foundation (Foundation. Framework):

Root Object
Classes representing basic facts types such as strings and byte arrays.
Collection of instructions for storing different Objects.
Classes representing machine information which includes dates.
Classes representing Communication Ports.
Application Kit (AppKit.Framework):

Graphical, event-pushed user interface- Windows, panels, buttons, menus, scrollers, textual content fields etc.
Communication with hardware devices and screen buffers.
Event handling, application and file management.
Integrate and control fonts, hues, printing and so on.
CSS3 Interview Questions
Question thirteen. What Are The Root Classes In Cocoa?

Answer :

The root class does not inherit from some other elegance and all other training inherit from the foundation magnificence.

The root elegance often accesses and interacts with the goal C runtime.

Cocoa has two root lessons:

NSObject
NSProxy (important in the disbursed item architecture)
IOS Tutorial
Question 14. State Some Of The Important Classes In Cocoa?

Answer :

NSNumber: Can instantiate item that carries integers, floats or doubles.

NSDate: For storing streams of bytes, writing information items to the record system and studying from them.

NSDate: Displaying dates, instances in many formats. Time modifications based totally on time zones.

NSString: Different illustration of man or woman strings consisting of UTF-8 etc.

NSAttributedString: Supports strings with attributes inclusive of font and many others.

NSArray: Ordered collection of objects, uses 0 primarily based indexing.

NSDictionary: Managing key value pairs, Dictionaries are unordered and need to comprise unique keys.

NSSet: Similar to NSArray but unsorted. Contains distinct items.

NSFileManager: Used for file operations.

NSThread: Used for creating multithreaded packages.

NSOperation & NSOperationQueue : To carry out a couple of operations (concurrent & Non-Concurrent) in precedence and dependence order.

NSXMLParser: To technique XML Data.

NSXML: Used to symbolize a XML document as a hierarchical tree.

Question 15. What Is Core Data?

Answer :

Core Data is a cocoa framework that provides infrastructure for handling object graphs & continual garage.
Core Data saves version items to a continual keep and fetches.
Central concept of Core Data is managed item. A controlled item is a version object this is an example of NSManagedObject.
Managed Context – All controlled objects should be registered inside the managed object context. The context allows an software to feature objects to the graph and eliminate them from it.
Objective C Interview Questions




CFG