SlideShare a Scribd company logo
iOS Basics
JPA Solutions
Agenda
Basics of iOS
Introduction to iOS
 What is iOS
 Architecture
 Design Patterns
Cocoa Touch Framework
 What is Cocoa Touch Framework
 Complete Assortment of Frameworks
iOS Application Design
 MVC
 Core Application Objects
 Application Life Cycle
Introduction to iOS
What is iOS?
iOS (known as iPhone OS before June 2010) is Apple's
mobile operating system. Originally developed for the iPhone, it has
since been extended to support other Apple, Inc. devices such as the
iPod touch, iPad and Apple TV. Apple, Inc. does not license iOS for
installation on third-party hardware.
Architecture
Core OS:
This level contains the kernel, the file system, networking infrastructure,
security, power management, and a number of device drivers. It also has the
libSystem library, which supports the POSIX/BSD 4.4/C99 API specifications and
includes system-level APIs for many services.
Architecture
Core Services:
The frameworks in this layer provide core services, such as string
manipulation, collection management, networking, URL utilities,
contact management, and preferences. They also provide services
based on hardware features of a device, such as the GPS, compass,
accelerometer, and gyroscope. Examples of frameworks in this layer
are Core Location, Core Motion, and system configuration.
Architecture
Media:
The frameworks and services in this layer depend on the Core Services layer and
provide graphical and multimedia services to the Cocoa Touch layer. They include
Core Graphics, Core Text, OpenGL ES, Core Animation, AVFoundation, Core Audio, and
video playback.
Architecture
Cocoa Touch:
The frameworks in this layer directly support applications based in iOS. They include
frameworks such as Game Kit, Map Kit, and iAd.The Cocoa Touch layer and the Core
Services layer each has an Objective-C framework that is especially important for
developing applications for iOS. These are the core Cocoa frameworks in iOS:
Architecture
UIKit:
This framework provides the objects an application displays in
its user interface and defines the structure for application
behavior, including event handling and drawing.
Foundation:
This framework defines the basic behavior of objects,
establishes mechanisms for their management, and provides
objects for primitive data types, collections, and operating-
system services. Foundation is essentially an object-oriented
version of the Core Foundation framework.
Design Patterns
 Model-View-Controller
 Is a way of dividing your code into independent functional areas. The model
portion defines your application’s underlying data engine and is responsible for
maintaining the integrity of that data. The view portion defines the user
interface for your application and has no explicit knowledge of the origin of
the data displayed in that interface. The controller portion acts as a bridge
between the model and view and coordinates the passing of data between
them.
 Block objects
 Block objects are a convenient way to encapsulate code and local stack
variables in a form that can be executed later. Support for block objects is
available in iOS 4 and later, where blocks often act as callbacks for
asynchronous tasks.
 Delegation
 The delegation design pattern is a way of modifying complex objects without
sub classing them. Instead of sub classing, you use the complex object as is
and put any custom code for modifying the behavior of that object inside a
separate object, which is referred to as the delegate object. At predefined
times, the complex object then calls the methods of the delegate object to
give it a chance to run its custom code.
Design Patterns
 Managed memory model
 The Objective-C language uses a reference-counted scheme for
determining when to release objects from memory. When an object is first
created, it is given a reference count of 1. Other objects can then use the
retain, release, or autorelease methods of the object to increase or
decrease that reference count appropriately. When an object’s reference
count reaches 0, the Objective-C runtime calls the object’s cleanup
routines and then deallocates it.
 Threads and concurrent programming
 All versions of iOS support the creation of operation objects and
secondary threads. In iOS 4 and later, applications can also use Grand
Central Dispatch (GCD) to execute tasks concurrently.
Cocoa Touch Framework
Cocoa touch is Apple's name for the collection of frameworks, APIs, and
accompanying runtimes that make up the development layer of iPhone OS. By
developing with the Cocoa touch frameworks you will be writing applications the
same way that iPhone OS itself is written, with controlled access to the
operating system.
 Much of Cocoa Touch is implemented in Objective-C, an object-oriented
language that is compiled to run at incredible speed, yet employs a truly
dynamic runtime making it uniquely flexible. Because Objective-C is a superset
of C, it is easy to mix C and even C++ into your Cocoa Touch applications.
 As your application runs, the Objective-C runtime instantiates objects based on
executing logic — not just in ways defined during compilation. For example, a
running Objective-C application can load an interface (a nib file created by
Interface Builder), connect the Cocoa objects in the interface to your
application code, then run the correct method once the UI button is pressed. No
recompiling is necessary.
Complete Assortment of Frameworks
In addition to UIKit, the Cocoa Touch collection of frameworks
includes everything needed to create world-class iOS apps,
They are,
 3D graphics
 Professional audio
 Networking
 Camera API
 GPS
 System Level Access API
Complete Assortment of Frameworks
Core Animation
Use Core Animation to create rich user experiences from an
easy programming model based on compositing
independent layers of graphics
Core Audio
Core Audio is the professional-grade technology for
playing, processing and recording audio, making it easy
to add powerful audio features to your application
Core Data
Core Data provides an object-oriented data
management solution that is easy to use and
understand, yet is built to handle the data model
needs of any application, large or small.
Complete Assortment of Frameworks
Features List: Frameworks by Category
Below is a small sampling of the available frameworks included in
Cocoa Touch:
Audio and Video
•Core Audio
•OpenAL
•Media Library
•AV Foundation
Graphics and
Animation
•Core Animation
•OpenGL ES
•Quartz 2D
User
Applications
•Address Book
•Core Location
•Map Kit
•Store Kit
Data Management
•Core Data
•SQLite
Networking and Internet
•Bonjour
•WebKit
•BSD Sockets
Features Of Cocoa Application
 Basic application framework
 User-interface objects
 Drawing and imaging
 System interaction
 Performance
 Internationalization
 Text
 Preferences
 Networking
 Printing
 Undo management
 Multimedia
 Data exchange
MVC Architecture
A design pattern in which the model (any data in your program), the
view (what the user sees), and the controller (a layer that handles all
interaction between the view and model) are separated in such a manner that
modifying either the view or model component of your program has no effect
on one another.
MVC Architecture - Model
 A model represents an application’s data and contains the logic for accessing
and manipulating that data.
 Any data that is part of the persistent state of the application should reside in
the model objects.
 The services that a model exposes must be generic enough to support a variety
of clients.
 Model services are accessed by the controller for either querying or effecting a
change in the model state.
MVC Architecture - View
• The view is not dependent on the application logic. It remains same if there is
any modification in the business logic the view is responsible for rendering the
state of the model.
• The presentation semantics are encapsulated within the view, therefore model
data can be adapted for several different kinds of clients.
• The view modifies itself when a change in the model is communicated to the
view. A view forwards user input to the controller.
MVC Architecture - Controller
 Controller accepts and intercepts user requests and controls the business
objects to fulfill these requests.
 An application has one controller for related functionality.
 Controller can also be depends on the type of clients.
MVC Architecture Workflow
MVC - Communication
Core Application Objects
 From the time our application is launched by the user, to the time it exits, the
UIKit framework manages most of the application’s core behavior. For example,
an iOS application receives events continuously from the system and must
respond to those events. Receiving the events is the job of the UIApplication
object, but responding to the events is the responsibility of your custom code.
 Key Objects in iOS:
 UIApplication object
 Application delegate object
 Data model objects
 View controller objects
 UIWindow Object
 View, Control, and layer objects
Core Application Objects
Application Life Cycle
The application life cycle constitutes the sequence of events that
occurs between the launch and termination of your application. In iOS, the user
launches your application by tapping its icon on the Home screen. Shortly after
the tap occurs, the system displays some transitional graphics and proceeds to
launch your application by calling its main function. From this point on, the
bulk of the initialization work is handed over to UIKit, which loads the
application’s main bib file and readies the event loop.
Application Life Cycle
Launching the Application
Moving to the Background
Responding to Interruptions
Resuming Foreground Execution
Responding To App Termination
Although applications are generally moved to the background and
suspended, if any of the following conditions are true, your application is
terminated and purged from memory instead of being moved to the background:
 The application is linked against a version of iOS earlier than 4.0.
 Application is deployed on a device running a version of iOS earlier than 4.0
 The current device does not support multitasking
 The application includes the UIApplicationExitsOnSuspend key in its Info.plist
file

More Related Content

PDF
iOS App Architecture
PDF
Building iOS App Project & Architecture
PDF
Session 1 - Introduction to iOS 7 and SDK
PPTX
Layer architecture of ios (1)
PPTX
PPTX
iOS platform
PPTX
Apple - what's new in iOS 10, watchOS 3 & tvOS 10
PDF
iOS App Architecture
Building iOS App Project & Architecture
Session 1 - Introduction to iOS 7 and SDK
Layer architecture of ios (1)
iOS platform
Apple - what's new in iOS 10, watchOS 3 & tvOS 10

What's hot (20)

ZIP
Between Cocoa and Cocoa Touch: A Comparative Introduction
PDF
Developing Applications on iOS
PDF
I phone programming project report
PDF
ibeacons, Privacy & Customer Segmentation - StreetHawk
PDF
iPhone University Developer Program
PPTX
Apple iOS Technology Market
PDF
Mobile applications chapter 2
PDF
Beginning Real World iOS App Development
PDF
Architecting iOS Project
PPTX
Iphone client-server app with Rails backend (v3)
PPTX
Mobile applications chapter 4
PDF
History of iOS
PPTX
Apple iOS Introduction
PPT
Adobe Flash and Device Central
PPT
Flash for Blackberry, iPhone and Android
PPTX
Android & IOS
PDF
Mobile App Development
PPT
08 10-2013 gtu projects - develop final sem gtu project in i phone
PDF
Никита Корчагин - Introduction to iOS development
PPTX
How to become iPhone developer
Between Cocoa and Cocoa Touch: A Comparative Introduction
Developing Applications on iOS
I phone programming project report
ibeacons, Privacy & Customer Segmentation - StreetHawk
iPhone University Developer Program
Apple iOS Technology Market
Mobile applications chapter 2
Beginning Real World iOS App Development
Architecting iOS Project
Iphone client-server app with Rails backend (v3)
Mobile applications chapter 4
History of iOS
Apple iOS Introduction
Adobe Flash and Device Central
Flash for Blackberry, iPhone and Android
Android & IOS
Mobile App Development
08 10-2013 gtu projects - develop final sem gtu project in i phone
Никита Корчагин - Introduction to iOS development
How to become iPhone developer
Ad

Viewers also liked (18)

PPSX
ANDROID
PPTX
Architecture iOS et Android
DOCX
Android architecture
PDF
Five android architecture
PPTX
Android architecture
PPTX
Android architecture
PPT
Android Architecture
PPTX
Android Overview
PDF
Android Platform Architecture
PPT
iOS Platform & Architecture
PPTX
android architecture
PPTX
Android vs ios System Architecture in OS perspective
PPT
Introduction to Android, Architecture & Components
PDF
Internet of Things
PPTX
The 21 Coolest Internet Of Things Gadgets
PPT
THE INTERNET OF THINGS
PPT
Internet of Things and its applications
PPTX
Internet-of-things- (IOT) - a-seminar - ppt - by- mohan-kumar-g
ANDROID
Architecture iOS et Android
Android architecture
Five android architecture
Android architecture
Android architecture
Android Architecture
Android Overview
Android Platform Architecture
iOS Platform & Architecture
android architecture
Android vs ios System Architecture in OS perspective
Introduction to Android, Architecture & Components
Internet of Things
The 21 Coolest Internet Of Things Gadgets
THE INTERNET OF THINGS
Internet of Things and its applications
Internet-of-things- (IOT) - a-seminar - ppt - by- mohan-kumar-g
Ad

Similar to ios basics (20)

PPT
Ios development
PDF
SpringPeople Introduction to iOS Apps Development
PDF
Cocoa encyclopedia
PPTX
iphone application development
PPTX
iOS for C# Developers - DevConnections Talk
KEY
iPhone OS: The Next Killer Platform
PDF
Password security system for websites
PPTX
Lecture1
PDF
Application for Data Sync Between Different geo Locations
PDF
Session 7 - Overview of the iOS7 app development architecture
PDF
04 Model View Controller
PPT
iPhone Programming
PPT
I Phone Development Presentation
PPTX
iPhone Workshop Mobile Monday Ahmedabad
PDF
Introduction to iPhone Programming
PDF
Free advertising platform for businesses with IOS & Android Apps development
PDF
Free advertising platform for businesses with IOS & Android Apps development
PDF
iOS Development Survival Guide for the .NET Guy
PDF
02 objective-c session 2
PDF
Real-time Text Audio to Video PPT Converter Tablet App
Ios development
SpringPeople Introduction to iOS Apps Development
Cocoa encyclopedia
iphone application development
iOS for C# Developers - DevConnections Talk
iPhone OS: The Next Killer Platform
Password security system for websites
Lecture1
Application for Data Sync Between Different geo Locations
Session 7 - Overview of the iOS7 app development architecture
04 Model View Controller
iPhone Programming
I Phone Development Presentation
iPhone Workshop Mobile Monday Ahmedabad
Introduction to iPhone Programming
Free advertising platform for businesses with IOS & Android Apps development
Free advertising platform for businesses with IOS & Android Apps development
iOS Development Survival Guide for the .NET Guy
02 objective-c session 2
Real-time Text Audio to Video PPT Converter Tablet App

Recently uploaded (20)

PPTX
Institutional Correction lecture only . . .
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Pre independence Education in Inndia.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Pharma ospi slides which help in ospi learning
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Cell Structure & Organelles in detailed.
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
RMMM.pdf make it easy to upload and study
PDF
Classroom Observation Tools for Teachers
Institutional Correction lecture only . . .
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
O5-L3 Freight Transport Ops (International) V1.pdf
TR - Agricultural Crops Production NC III.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Pre independence Education in Inndia.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Microbial disease of the cardiovascular and lymphatic systems
Abdominal Access Techniques with Prof. Dr. R K Mishra
Pharma ospi slides which help in ospi learning
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Module 4: Burden of Disease Tutorial Slides S2 2025
O7-L3 Supply Chain Operations - ICLT Program
01-Introduction-to-Information-Management.pdf
Cell Structure & Organelles in detailed.
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
RMMM.pdf make it easy to upload and study
Classroom Observation Tools for Teachers

ios basics

  • 2. Agenda Basics of iOS Introduction to iOS  What is iOS  Architecture  Design Patterns Cocoa Touch Framework  What is Cocoa Touch Framework  Complete Assortment of Frameworks iOS Application Design  MVC  Core Application Objects  Application Life Cycle
  • 3. Introduction to iOS What is iOS? iOS (known as iPhone OS before June 2010) is Apple's mobile operating system. Originally developed for the iPhone, it has since been extended to support other Apple, Inc. devices such as the iPod touch, iPad and Apple TV. Apple, Inc. does not license iOS for installation on third-party hardware.
  • 4. Architecture Core OS: This level contains the kernel, the file system, networking infrastructure, security, power management, and a number of device drivers. It also has the libSystem library, which supports the POSIX/BSD 4.4/C99 API specifications and includes system-level APIs for many services.
  • 5. Architecture Core Services: The frameworks in this layer provide core services, such as string manipulation, collection management, networking, URL utilities, contact management, and preferences. They also provide services based on hardware features of a device, such as the GPS, compass, accelerometer, and gyroscope. Examples of frameworks in this layer are Core Location, Core Motion, and system configuration.
  • 6. Architecture Media: The frameworks and services in this layer depend on the Core Services layer and provide graphical and multimedia services to the Cocoa Touch layer. They include Core Graphics, Core Text, OpenGL ES, Core Animation, AVFoundation, Core Audio, and video playback.
  • 7. Architecture Cocoa Touch: The frameworks in this layer directly support applications based in iOS. They include frameworks such as Game Kit, Map Kit, and iAd.The Cocoa Touch layer and the Core Services layer each has an Objective-C framework that is especially important for developing applications for iOS. These are the core Cocoa frameworks in iOS:
  • 8. Architecture UIKit: This framework provides the objects an application displays in its user interface and defines the structure for application behavior, including event handling and drawing. Foundation: This framework defines the basic behavior of objects, establishes mechanisms for their management, and provides objects for primitive data types, collections, and operating- system services. Foundation is essentially an object-oriented version of the Core Foundation framework.
  • 9. Design Patterns  Model-View-Controller  Is a way of dividing your code into independent functional areas. The model portion defines your application’s underlying data engine and is responsible for maintaining the integrity of that data. The view portion defines the user interface for your application and has no explicit knowledge of the origin of the data displayed in that interface. The controller portion acts as a bridge between the model and view and coordinates the passing of data between them.  Block objects  Block objects are a convenient way to encapsulate code and local stack variables in a form that can be executed later. Support for block objects is available in iOS 4 and later, where blocks often act as callbacks for asynchronous tasks.  Delegation  The delegation design pattern is a way of modifying complex objects without sub classing them. Instead of sub classing, you use the complex object as is and put any custom code for modifying the behavior of that object inside a separate object, which is referred to as the delegate object. At predefined times, the complex object then calls the methods of the delegate object to give it a chance to run its custom code.
  • 10. Design Patterns  Managed memory model  The Objective-C language uses a reference-counted scheme for determining when to release objects from memory. When an object is first created, it is given a reference count of 1. Other objects can then use the retain, release, or autorelease methods of the object to increase or decrease that reference count appropriately. When an object’s reference count reaches 0, the Objective-C runtime calls the object’s cleanup routines and then deallocates it.  Threads and concurrent programming  All versions of iOS support the creation of operation objects and secondary threads. In iOS 4 and later, applications can also use Grand Central Dispatch (GCD) to execute tasks concurrently.
  • 11. Cocoa Touch Framework Cocoa touch is Apple's name for the collection of frameworks, APIs, and accompanying runtimes that make up the development layer of iPhone OS. By developing with the Cocoa touch frameworks you will be writing applications the same way that iPhone OS itself is written, with controlled access to the operating system.  Much of Cocoa Touch is implemented in Objective-C, an object-oriented language that is compiled to run at incredible speed, yet employs a truly dynamic runtime making it uniquely flexible. Because Objective-C is a superset of C, it is easy to mix C and even C++ into your Cocoa Touch applications.  As your application runs, the Objective-C runtime instantiates objects based on executing logic — not just in ways defined during compilation. For example, a running Objective-C application can load an interface (a nib file created by Interface Builder), connect the Cocoa objects in the interface to your application code, then run the correct method once the UI button is pressed. No recompiling is necessary.
  • 12. Complete Assortment of Frameworks In addition to UIKit, the Cocoa Touch collection of frameworks includes everything needed to create world-class iOS apps, They are,  3D graphics  Professional audio  Networking  Camera API  GPS  System Level Access API
  • 13. Complete Assortment of Frameworks Core Animation Use Core Animation to create rich user experiences from an easy programming model based on compositing independent layers of graphics Core Audio Core Audio is the professional-grade technology for playing, processing and recording audio, making it easy to add powerful audio features to your application Core Data Core Data provides an object-oriented data management solution that is easy to use and understand, yet is built to handle the data model needs of any application, large or small.
  • 14. Complete Assortment of Frameworks Features List: Frameworks by Category Below is a small sampling of the available frameworks included in Cocoa Touch: Audio and Video •Core Audio •OpenAL •Media Library •AV Foundation Graphics and Animation •Core Animation •OpenGL ES •Quartz 2D User Applications •Address Book •Core Location •Map Kit •Store Kit Data Management •Core Data •SQLite Networking and Internet •Bonjour •WebKit •BSD Sockets
  • 15. Features Of Cocoa Application  Basic application framework  User-interface objects  Drawing and imaging  System interaction  Performance  Internationalization  Text  Preferences  Networking  Printing  Undo management  Multimedia  Data exchange
  • 16. MVC Architecture A design pattern in which the model (any data in your program), the view (what the user sees), and the controller (a layer that handles all interaction between the view and model) are separated in such a manner that modifying either the view or model component of your program has no effect on one another.
  • 17. MVC Architecture - Model  A model represents an application’s data and contains the logic for accessing and manipulating that data.  Any data that is part of the persistent state of the application should reside in the model objects.  The services that a model exposes must be generic enough to support a variety of clients.  Model services are accessed by the controller for either querying or effecting a change in the model state.
  • 18. MVC Architecture - View • The view is not dependent on the application logic. It remains same if there is any modification in the business logic the view is responsible for rendering the state of the model. • The presentation semantics are encapsulated within the view, therefore model data can be adapted for several different kinds of clients. • The view modifies itself when a change in the model is communicated to the view. A view forwards user input to the controller.
  • 19. MVC Architecture - Controller  Controller accepts and intercepts user requests and controls the business objects to fulfill these requests.  An application has one controller for related functionality.  Controller can also be depends on the type of clients.
  • 22. Core Application Objects  From the time our application is launched by the user, to the time it exits, the UIKit framework manages most of the application’s core behavior. For example, an iOS application receives events continuously from the system and must respond to those events. Receiving the events is the job of the UIApplication object, but responding to the events is the responsibility of your custom code.  Key Objects in iOS:  UIApplication object  Application delegate object  Data model objects  View controller objects  UIWindow Object  View, Control, and layer objects
  • 24. Application Life Cycle The application life cycle constitutes the sequence of events that occurs between the launch and termination of your application. In iOS, the user launches your application by tapping its icon on the Home screen. Shortly after the tap occurs, the system displays some transitional graphics and proceeds to launch your application by calling its main function. From this point on, the bulk of the initialization work is handed over to UIKit, which loads the application’s main bib file and readies the event loop.
  • 27. Moving to the Background
  • 30. Responding To App Termination Although applications are generally moved to the background and suspended, if any of the following conditions are true, your application is terminated and purged from memory instead of being moved to the background:  The application is linked against a version of iOS earlier than 4.0.  Application is deployed on a device running a version of iOS earlier than 4.0  The current device does not support multitasking  The application includes the UIApplicationExitsOnSuspend key in its Info.plist file

Editor's Notes

  • #16: What follows is a short list of how Cocoa adds value to an application with only a little (and sometimes no) effort on your part: Basic application framework—Cocoa provides the infrastructure for event-driven behavior and for management of applications, windows, and (in the case of Mac OS X) workspaces. In most cases, you won’t have to handle events directly or send any drawing commands to a rendering library. User-interface objects—Cocoa offers a rich collection of ready-made objects for your application’s user interface. Most of these objects are available in the library of Interface Builder, a development application for creating user interfaces; you simply drag an object from the library onto the surface of your interface, configure its attributes, and connect it to other objects. (And, of course, you can always instantiate, configure, and connect these objects programmatically.) Here is a sampling of Cocoa user-interface objects: Windows Text fields Image views Date pickers Sheets and dialogs Segmented controls Table views Progress indicators Buttons Sliders Radio buttons (Mac OS X) Color wells (Mac OS X) Drawers (Mac OS X) Page controls (iOS) Navigation bars (iOS) Switch controls (iOS) Cocoa in Mac OS X also features technologies that support user interfaces, including those that promote accessibility, perform validation, and facilitate the connections between objects in the user interface and custom objects. Drawing and imaging—Cocoa enables efficient drawing of custom views with a framework for locking graphical focus and marking views (or portions of views) as “dirty.” Cocoa includes programmatic tools for drawing Bezier paths, performing affine transforms, compositing images, generating PDF content, and (in Mac OS X) creating various representations of images. System interaction—In Mac OS X, Cocoa gives your application ways to interact with (and use the services of) the file system, the workspace, and other applications. In iOS, Cocoa lets you pass URLs to applications to have them handle the referenced resource (for example, email or websites); it also provides support for managing user interactions with files in the local system and for scheduling local notifications. Performance—To enhance the performance of your application, Cocoa provides programmatic support for concurrency, multithreading, lazy loading of resources, memory management, and run-loop manipulation. Internationalization—Cocoa provides a rich architecture for internationalizing applications, making it possible for you to support localized resources such as text, images, and even user interfaces. The Cocoa approach is based on users’ lists of preferred languages and puts localized resources in bundles of the application. Based on the settings it finds, Cocoa automatically selects the localized resource that best matches the user’s preferences. It also provides tools and programmatic interfaces for generating and accessing localized strings. Moreover, text manipulation in Cocoa is based on Unicode by default, and is thus an asset for internationalization. Text—In Mac OS X, Cocoa provides a sophisticated text system that allows you to do things with text ranging from the simple (for example, displaying a text view with editable text) to the more complex, such as controlling kerning and ligatures, spell checking, regular expressions, and embedding images in text. Although Cocoa in iOS has no native text system (it uses WebKit for string drawing) and its text capabilities are more limited, it still includes support for spellchecking, regular expressions, and interacting with the text input system. Preferences—The user defaults system is based on a systemwide database in which you can store global and application-specific preferences. The procedure for specifying application preferences is different for Mac OS X and iOS. Networking—Cocoa also offers programmatic interfaces for communicating with servers using standard Internet protocols, communicating via sockets, and taking advantage of Bonjour, which lets your application publish and discover services on an IP network. In Mac OS X, Cocoa includes a distributed objects architecture that allows one Cocoa process to communicate with another process on the same computer or on a different one. In iOS, Cocoa supports the capability for servers to push notifications to devices for applications registered to received such notifications. Printing—Cocoa on both platforms supports printing. Their printing architecture lets you print images, documents, and other application content along a range of control and sophistication. At the simplest level, you can print the contents of any view or print an image or PDF document with just a little code. At a more complicated level, you can define the content and format of printed content, control how a print job is performed, and do pagination. In Mac OS X, you can add an accessory view to the Print dialog. Undo management—You can register user actions that occur with an undo manager, and it will take care of undoing them (and redoing them) when users choose the appropriate menu items. The manager maintains undo and redo operations on separate stacks. Multimedia—Both platforms programmatically support video and audio. In Mac OS X, Cocoa offers support for QuickTime video. Data exchange—Cocoa simplifies the exchange of data within an application and between applications using the copy-paste model. In Mac OS X, Cocoa also supports drag-and-drop models and the sharing of application capabilities through the Services menu.