Cocoa Touch Layer in iPhone

The Cocoa Touch Layer

It is the top layer of a iOS stack and it contains the frameworks that are most commonly used by iPhone application developers. Cocoa Touch is primarily written in Objective-C.

It provides the following frameworks for iPhone app development.

UIKit Framework

This framework is required for the user interface environment. In the Xcode library file it is represented as "UIKit.framework" and in the Xcode Objective-C class we import it like #import "<UIKit/UIkit.h>" .

 Some of the key features of UIKit are as follows:

  • User interface creation and management, for example: text fields, buttons, labels, colors, fonts etc.
  • Application lifecycle management
  • Application event handling example: touch screen user interaction
  • Multitasking
  • Wireless Printing
  • Data protection using an encryption algorithm
  • Cut, copy, and paste functionality on the UI
  • Web and text content presentation and management
  • Data handling
  • Inter-application integration
  • Push notification in conjunction with the Push Notification Service
  • Local notifications (a mechanism whereby an application running in the background can gain the user's attention)
  • Accessibility
  • Accelerometer, battery, proximity sensor, camera and photo library interaction
  • Touch screen gesture recognition
  • File sharing
  • Bluetooth based peer to peer connectivity between devices
  • Connection to external displays

Map Kit Framework

This framework is required for representing the map on the UI . In the Xcode library file it is represented as "MapKit.framework" and in the Xcode Objective-C class we import it like #import "<MapKit/MapKit.h>".

 Some of the key features of UIKit are as follows:

  • Get a map of a specific area.
  • To generate driving directions to get you to your intended destination.
  • Provides a programming interface that enables you to build map-based capabilities into your own applications.
  • Display scrollable maps for any location.
  • Display the map corresponding to the current geographical location of the device.
  • Annotate the map in a variety of ways.

Push Notification Service

It allows applications to notify users of an event even when the application is not currently running on the device. As an introduction to this service, it has most commonly been used by news-based applications. Typically when there is breaking news the service will generate a message on the device with the news headline and provide the user the option to load the corresponding news app to read more details. This alert is typically accompanied by an audio alert and vibration of the device. In simple words it is a multi way communication or we can say with this we can send a massage from one object to more than one object,

Message UI Framework

This framework is required for mailing services. In the Xcode library file it is represented as "MessageUI.framework" and in the Xcode Objective-C class we import it like:
 #import "<MessageUI/MessageUI.h>".

The Message UI framework provides everything you need to allow users to compose and send email messages from within your application. The user interface elements are how the user enters the email addressing information and message content. Alternatively, this information may be pre-defined within your application and then displayed for the user to edit and approve prior to sending.

Address Book UI Framework

A key function of the iPhone is as a communications device and the digital assistant should not be too much of a surprise or that an entire framework is dedicated to the integration of the address book data into your own applications. The primary purpose of the framework is to enable you to access, display, edit and enter contact information from the iPhone address book from within your own application. In the Xcode library file it is represented as  "AddressUI.framework".

Game Kit Framework

The Game Kit framework provides peer-to-peer connectivity and voice communication between multiple devices and users allow those running the same app to interact. When this feature was first introduced it was anticipated by Apple that it would primarily be used in multi-player games (hence the choice of name) but the possible applications for this feature clearly extend far beyond games development.

In the Xcode library file it is represented as  "GameKit.framework" and in the Xcode Objective-C class we import it like:
 #import "<GameKit/GameKit.h>"

iAd Framework

It is represented as "iAd.framework".The purpose of the iAd Framework is to allow developers to include banner advertising within their applications. All advertisements are served by Apple's own ad service.

Event Kit UI Framework

This framework was introduced with iOS 4 and  it is provided to allow the calendar events to be accessed and edited from within an application.

Accounts Framework

In the Xcode library file it is represented as "Accounts.framework". iOS 5 introduces the concept of system accounts. It provides the account information for other services to be stored on the iOS device and accessed from within application code.The purpose of the Accounts Framework is to provide an API allowing applications to access and manage these system accounts.

Twitter Framework

In the Xcode library file it is represented as "Twitter.framework" and in the Xcode Objective-C class we import it like:
 #import "<Twitter/Twitter.h>"

The Twitter Framework allows Twitter integration to be added to applications. The framework operates in conjunction with the Accounts Framework to gain access to the user's Twitter account information.

Facebook Framework

The Facebook Framework allows Facebook integration to be added to applications. The framework operates in conjunction with the Accounts Framework to gain access to the user's Facebook account information.


Similar Articles