What is the Architecture of Ios?And Explain it?

In this lesson, we will discuss iOS Architecture

I am pretty sure that even a few experienced iOS developers would have a hard time defining the iOS SDK in one sentence. The acronym SDK stands for Software Development Kit. The iOS SDK contains the tools and resources to develop native iOS applications, which means that the SDK enables developers to develop, install, run, and test applications in the simulator and on physical devices.

The two driving forces powering native iOS applications are Swift (or Objective-C) and the native iOS system frameworks. In the previous articles, we explored the Swift programming language. In this article, I want to explore the frameworks that power native iOS applications.

For more information visit:ios app development course

You now know what the iOS SDK is, but what makes an application qualify as a native iOS application? The simple answer is that an iOS application is an application that runs on an iOS device. That's only half the truth, though. What about web applications that run in Safari?

An iOS application is a Cocoa application developed for the iOS platform. Great. What is a Cocoa application? A Cocoa application is a bit harder to define. Is it the language in which the application is written? Not really. Is it the tools with which a Cocoa application is built? No. It is possible to develop a Cocoa application without the help of Xcode.

 

The iOS architecture can be broken down into four distinct layers:

  • Cocoa Touch
  • Media
  • Core Services
  • Core OS


 

iOS Architecture

 

This layered architecture illustrates that level of abstraction, with the higher level layers more abstracted and the lower level layers more fundamental, closely tied to the hardware. It goes without saying that the higher level layers rely on the lower level layers for some of their functionality.

Cocoa Touch Layer : 

In the previous article, I wrote about Cocoa Touch and its relation to Swift and Objective-C. In this article, I would like to discuss Cocoa Touch from a more functional standpoint. How do applications rely on the Cocoa Touch layer? What is the role of Cocoa Touch in the iOS architecture?

The Cocoa Touch layer is the topmost layer of the iOS architecture. It contains some of the key frameworks native iOS applications rely on, with the most prominent being the UIKit framework.

The Cocoa Touch layer defines the basic application infrastructure and provides a number of vital technologies, such as multitasking and touch-based input.

As I mentioned, iOS applications rely heavily on the UIKit framework. Native iOS applications cannot operate if they are not linked against the UIKit and the Foundation frameworks.

The UIKit framework, or UIKit for short, is tailored to the iOS platform. There is an equivalent framework for the OS X platform, the Application Kit framework or AppKit. UIKit provides the infrastructure for graphical, event-driven iOS applications. It also takes care of other core aspects that are specific to the iOS platform, such as multitasking, push notifications, and accessibility.

The Cocoa Touch layer provides developers with a large number of high level features, such as Auto Layout, printing, gesture recognizers, and document support. In addition to UIKit, it contains the Map Kit, Event Kit, and Message UI frameworks, among others.

Media Layer : 

Graphics, audio, and video are handled by the Media layer. This layer contains a number of key technologies, such as Core Graphics, OpenGL ES and OpenAL, AV Foundation, and Core Media.

The Media layer contains a large number of frameworks including the Assets Library framework to access the photos and videos stored on the device, the Core Image framework for image manipulation through filters, and the Core Graphics framework for 2D drawing.

Core Services Layer : 

The Core Services layer is in charge of managing the fundamental system services that native iOS applications use. The Cocoa Touch layer depends on the Core Services layer for some of its functionality. The Core Services layer also provides a number of indispensable features, such as block objects, Grand Central Dispatch, In-App Purchase, and iCloud Storage.

One of the most welcomed additions to the Core Services layer is ARC or Automatic Reference Counting. ARC is a compiler-level feature, introduced in 2011 alongside the release of iOS 5. ARC simplifies the process of memory management in Objective-C.

Memory management is a topic we haven't covered in this series, but it's important that you understand the basics of memory management when developing Cocoa applications. Automatic Reference Counting is a great addition, but it's important that you know what ARC is doing for you.

The Foundation framework, or Foundation for short, is another essential framework for iOS and OS X applications. In the next article, we explore this framework in more detail. The Foundation framework is more than a collection of useful classes, such as NSArrayNSDictionary, and NSDate.

Foundation provides the NSObject root class, which provides a basic interface to the Objective-C runtime, and it also introduces several paradigms, such as policies for object ownership. Like Core Foundation (see below), Foundation makes it possible for the different libraries and frameworks to easily share data and code.

Another important framework of the Core Services layer, and closely tied to the Foundation framework, is the C-based Core Foundation framework, or Core Foundation for short. Like the Foundation framework, it enables the various libraries and frameworks to share data and code.

Core Foundation has a feature, known as toll-free bridging, that enables the substitution of Cocoa objects for Core Foundation objects in function parameters and vice versa.

Core OS Layer : 

Most of the functionality provided by the three higher level layers is built on the Core OS layer and its low level features. The Core OS layer provides a handful of frameworks that your application can use directly, such as the Accelerate and Security frameworks.

The Core OS layer also encapsulates the kernel environment and low level UNIX interfaces to which your application has no access, for obvious security reasons. However, through the C-based libSystem library many low level features can be accessed directly, such as BSD sockets, POSIX threads, and DNS services.

To learn ios course visit OnlineITGuru's ios online training Blog

Comments

Popular posts from this blog

iOS - Objective C Basics

14 must knows for an iOS developer

How to become an IOS developer