You are on page 1of 42

What's New in iOS

General

2010-08-17
IOS is a trademark or registered trademark of
Apple Inc. Cisco in the U.S. and other countries and is used
© 2010 Apple Inc. under license.
All rights reserved. Intel and Intel Core are registered trademarks
of Intel Corportation or its subsidiaries in the
No part of this publication may be reproduced, United States and other countries.
stored in a retrieval system, or transmitted, in
any form or by any means, mechanical, OpenGL is a registered trademark of Silicon
electronic, photocopying, recording, or Graphics, Inc.
otherwise, without prior written permission of Simultaneously published in the United States
Apple Inc., with the following exceptions: Any and Canada.
person is hereby authorized to store Even though Apple has reviewed this document,
documentation on a single computer for APPLE MAKES NO WARRANTY OR REPRESENTATION,
personal use only and to print copies of EITHER EXPRESS OR IMPLIED, WITH RESPECT TO
THIS DOCUMENT, ITS QUALITY, ACCURACY,
documentation for personal use provided that MERCHANTABILITY, OR FITNESS FOR A PARTICULAR
the documentation contains Apple’s copyright PURPOSE. AS A RESULT, THIS DOCUMENT IS
PROVIDED “AS IS,” AND YOU, THE READER, ARE
notice. ASSUMING THE ENTIRE RISK AS TO ITS QUALITY
AND ACCURACY.
The Apple logo is a trademark of Apple Inc.
IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT,
Use of the “keyboard” Apple logo INDIRECT, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES RESULTING FROM ANY
(Option-Shift-K) for commercial purposes DEFECT OR INACCURACY IN THIS DOCUMENT, even
without the prior written consent of Apple may if advised of the possibility of such damages.
constitute trademark infringement and unfair THE WARRANTY AND REMEDIES SET FORTH ABOVE
competition in violation of federal and state ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL
OR WRITTEN, EXPRESS OR IMPLIED. No Apple
laws. dealer, agent, or employee is authorized to make
any modification, extension, or addition to this
No licenses, express or implied, are granted warranty.
with respect to any of the technology described Some states do not allow the exclusion or limitation
in this document. Apple retains all intellectual of implied warranties or liability for incidental or
property rights associated with the technology consequential damages, so the above limitation or
exclusion may not apply to you. This warranty gives
described in this document. This document is you specific legal rights, and you may also have
intended to assist application developers to other rights which vary from state to state.
develop applications only for Apple-labeled
computers.
Every effort has been made to ensure that the
information in this document is accurate. Apple
is not responsible for typographical errors.
Apple Inc.
1 Infinite Loop
Cupertino, CA 95014
408-996-1010

App Store is a service mark of Apple Inc.


iTunes Store is a registered service mark of
Apple Inc.
Apple, the Apple logo, Bonjour, Instruments,
iPhone, iPod, iPod touch, iTunes, iWork,
Keychain, Mac, Mac OS, Macintosh, Objective-C,
Quartz, Safari, and Xcode are trademarks of
Apple Inc., registered in the United States and
other countries.
iPad is a trademark of Apple Inc.
Java is a registered trademark of Oracle and/or
its affiliates
Contents

Introduction 7

Organization of This Document 7


Getting the iOS SDK 7

iOS 4.1 9

Game Center 9
Framework Enhancements 9
AV Foundation 9
Assets Library 10
Core Text 10
System Configuration 10
UIKit 10

iOS 4.0 11

Multitasking 11
Integration Technologies 12
Local Notifications 12
Event Kit 12
Core Motion 12
Data Protection 13
Core Telephony 13
iAd 13
Graphics and Multimedia 13
High-Resolution Screen Support 13
Quick Look Framework 14
AV Foundation 14
Assets Library 15
Image I/O 15
Core Media 15
Core Video 15
Core Services 15
Block Objects 15
Grand Central Dispatch 16
Accelerate Framework 16
Xcode Tools 16
Xcode Improvements 16
UI Automation API 17
Framework Enhancements 17
UIKit Framework Enhancements 17

3
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
Foundation Framework Enhancements 18
OpenGL ES Enhancements 19
Game Kit Enhancements 19
Core Location Enhancements 19
Map Kit Enhancements 20
Message UI Enhancements 20
Core Graphics Enhancements 20
ICU Enhancements 21
Inherited Improvements 21

iOS 3.2 23

User Interface Changes 23


Popovers 23
Split Views 24
Custom Input Views 24
External Display Support 24
Gesture Recognizers 25
Improved Text Support 25
Core Text 25
Text Input Support 26
Custom Font Support 26
ICU Regular-Expression Support 26
File and Document Support 26
File-Sharing Support 27
Document Support 27
PDF Generation 28
Xcode Tools 28
API Changes 28
UIKit Framework Changes 28
Media Player Framework Changes 29
Core Animation Changes 29
MapKit Framework Changes 30
Foundation Framework Changes 30

iOS 3.1 31

Video Editing Support 31


Core Animation Enhancements 31
Instruments 31

iOS 3.0 33

Apple Push Notification Service 33


Cut, Copy, and Paste 33
Accessory Support 34

4
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
In App Purchase Support 34
Peer to Peer Support 34
Maps API 35
iPod Library Access 35
Audio Recording and Management 35
Core Data 36
In App Email 36
Streaming Video 36
Safari Features 37
Shared Keychain Items 37
Accessibility Support 37
Compass Support 38
OpenGL ES 2.0 38
Additional Enhancements 38
UIKit Framework Enhancements 38
Foundation Framework Enhancements 39
Core Audio Enhancements 39
API Changes 40

Document Revision History 41

5
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
6
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
Introduction

This document provides information about features that were introduced in different versions of iOS and
that affect the development of iOS applications. This document describes only features that affect the
development of iOS applications. It does not include user-level features unless there is an aspect of the feature
that affects application development. It also does not specifically address minor OS updates that include
only bug fixes (and no new features). For additional information about a specific release, you should also see
the corresponding release notes.

In addition to describing the new features for each iOS release, this document attempts to provide insight
as to how and when you might use those features in your own software. Wherever possible, this document
also provides links to other Apple conceptual and reference documentation for that feature. For a complete
list of features you can use in your iOS applications, see iOS Technology Overview.

Organization of This Document

This document includes the following articles:

■ “iOS 4.1” (page 9) describes the new and updated features in iOS 4.1.
■ “iOS 4.0” (page 11) describes the new and updated features in iOS 4.0.
■ “iOS 3.2” (page 23) describes the new and updated features in iOS 3.2.
■ “iOS 3.1” (page 31) describes the new and updated features in iOS 3.1.
■ “iOS 3.0” (page 33) describes the new and updated features in iOS 3.0.

Getting the iOS SDK

Development of iOS applications requires an Intel-based Macintosh computer and an up-to-date version of
Mac OS X. You must also download and install the iOS SDK. For information about how to get the iOS SDK,
go to the iOS Dev Center.

Organization of This Document 7


2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
Introduction

8 Getting the iOS SDK


2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 4.1

This article summarizes the developer-related features introduced in iOS 4.1. This version of the operating
system runs on iPhone and iPod touch only and does not run on iPad. In addition to describing the new
features, this article lists the documents that describe those features in more detail.

Note: iOS 4.1 does not support iPad. It runs only on iPhone and iPod touch devices. You must use a different
version of the iOS SDK to develop iPad applications.

For the latest updates and information, you should also see iOS 4.1 Release Notes. For the list of API differences
between the iOS 4.1 and earlier versions of iOS, see iOS 4.1 API Diffs.

Game Center

Game Center is an extension to the Game Kit framework that provides support for the following features:

■ Aliases allow users to create their own online persona. Users log in to Game Center and interact with
other players anonymously through their alias. Players can set status messages as well as mark specific
people as their friends.
■ Leaderboards allow your application to post user scores to Game Center and retrieve them later. You
might use this feature to show the best scores among all users of your application.
■ Matchmaking allows you to create multiplayer games by connecting players who are logged into Game
Center. Players do not have to be local to each other to join a multiplayer game.
■ Achievements allows you to record the progress a player has made in your game.

The preceding features all contribute towards the experience users see in the Game Center application. For
information about the classes of the Game Kit framework, see Game Kit Framework Reference.

Framework Enhancements

The following existing frameworks and technologies include additional incremental changes. For a complete
list of new interfaces, see iOS 4.1 API Diffs.

AV Foundation
The AV Foundation framework includes the following enhancements:

■ A new AVQueuePlayer class for playing a sequence of AVPlayerItem objects.

Game Center 9
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 4.1

■ A new AVAssetReader class for reading samples from media files.


■ A new AVAssetWriter class for writing samples to a data file and optionally compressing them.

For more information about the classes of the AV Foundation framework, see AV Foundation Framework
Reference.

Assets Library
The Assets Library framework includes new methods to save images to a user’s photo album. These new
methods are declared in the ALAssetsLibrary class.

Core Text
The Core Text framework includes new functions for managing fonts. For more information about the functions
available in the Core Text framework, see Core Text Reference Collection.

System Configuration
The System Configuration framework contains new interfaces for identifying captive networks. For more
information about the functions available in the System Configuration framework, see System Configuration
Framework Reference.

UIKit
The UIKit framework includes the following enhancements:

■ Additional constants for the UIImagePickerController class that allow you to obtain additional
information about an image.
■ A decimal keyboard type that you can use for text entry. You can specify this keyboard type using the
UIKeyboardTypeDecimalPad constant.

For more information about the classes of the UIKit framework, see UIKit Framework Reference.

10 Framework Enhancements
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 4.0

This article summarizes the developer-related features introduced in iOS 4. This version of the operating
system runs on iPhone and iPod touch only and does not run on iPad. In addition to describing the new
features, this article lists the documents that describe those features in more detail.

Note: iOS 4 does not support iPad. It runs only on iPhone and iPod touch devices. You must use a different
version of the iOS SDK to develop iPad applications.

For the latest updates and information, you should also see iOS 4.0 Release Notes. For the list of API differences
between the iOS 4 and earlier versions of iOS, see iOS 4.0 API Diffs.

Multitasking

Applications built using iOS SDK 4 or later (and running in iOS 4 and later) are no longer terminated when
the user presses the Home button; instead, they now shift to a background execution context. For many
applications, this means that the application enters a suspended state of execution shortly after entering the
background. Keeping the application in memory avoids the subsequent launch cycle and allows an application
to simply reactivate itself, which improves the overall user experience. And suspending the application
improves overall system performance by minimizing power usage and giving more execution time to the
foreground application.

Although most applications are suspended shortly after moving to the background, applications that need
to continue working in the background may do so using one of the following techniques:

■ An application can request a finite amount of time to complete some important task.
■ An application can declare itself as supporting specific services that require regular background execution
time.
■ An application can use local notifications to generate user alerts at designated times, whether or not
the application is running.

Regardless of whether your application is suspended or continues running in the background, supporting
multitasking does require some additional work on your part. Background applications can still be terminated
under certain conditions (such as during low-memory conditions), and so applications must be ready to exit
at any time. This means that many of the tasks you used to perform at quit time must now be performed
when your application moves to the background. This requires implementing some new methods in your
application delegate to respond to application state transitions.

For more information on how to handle the new background state transitions, and for information on how
to continue running in the background, see iOS Application Programming Guide.

Multitasking 11
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 4.0

Integration Technologies

The following sections describe the technologies you can use to enhance your application’s user experience.

Local Notifications
Local notifications complement the existing push notifications by giving applications an avenue for generating
the notifications locally instead of relying on an external server. Background applications can use local
notifications as a way to get a user’s attention when important events happen. For example, a navigation
application running in the background can use local notifications to alert the user when it is time to make a
turn. Applications can also schedule the delivery of local notifications for a future date and time and have
those notifications delivered even if the application is not running.

The advantage of local notifications is that they are independent of your application. Once a notification is
scheduled, the system manages the delivery of it. Your application does not even have to be running when
the notification is delivered.

For more information about using local notifications, see Local and Push Notification Programming Guide.

Event Kit
The Event Kit framework (EventKit.framework) provides an interface for accessing calendar events on a
user’s device. You can use this framework to get existing events and add new events to the user’s calendar.
Calendar events can include alarms that you can configure with rules for when they should be delivered. In
addition to using Event Kit for creating new events, you can use the view controllers of the Event Kit UI
framework (EventKitUI.framework) to present standard system interfaces for viewing and editing events.

For more information about the classes and methods of these frameworks, see Event Kit Framework Reference
and Event Kit UI Framework Reference.

Core Motion
The Core Motion framework (CoreMotion.framework) provides a single set of interfaces for accessing all
motion-based data available on a device. The framework supports accessing both raw and processed
accelerometer data using a new set of block-based interfaces. For devices with a built-in gyroscope, you can
retrieve the raw gyro data as well as processed data reflecting the attitude and rotation rates of the device.
You can use both the accelerometer and gyro-based data for games or other applications that use motion
as input or as a way to enhance the overall user experience.

For more information about the classes and methods of this framework, see “Motion Events” in Event Handling
Guide for iOS.

12 Integration Technologies
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 4.0

Data Protection
Applications that work with sensitive user data can now take advantage of the built-in encryption available
on some devices to protect that data. When your application designates a particular file as protected, the
system stores that file on-disk in an encrypted format. While the device is locked, the contents of the file are
inaccessible to both your application and to any potential intruders. However, when the device is unlocked
by the user, a decryption key is created to allow your application to access the file.

Implementing data protection requires you to be considerate in how you create and manage the data you
want to protect. Applications must themselves be designed to secure the data at creation time and to be
prepared for changes in access to that data when the user locks and unlocks the device.

For more information about how to add data protection to the files of your application, see “Implementing
Standard Application Behaviors” in iOS Application Programming Guide.

Core Telephony
The Core Telephony framework (CoreTelephony.framework) provides interfaces for interacting with
phone-based information on devices that have a cellular radio. Applications can use this framework to get
information about a user’s cellular service provider. Applications interested in cellular call events can also be
notified when those events occur.

For more information about using the classes and methods of this framework, see Core Telephony Framework
Reference.

iAd
You can use iAd (iAd.framework) to deliver banner-based advertisements from your application.
Advertisements are incorporated into standard views that you integrate into your user interface and present
when you want. The views themselves work with Apple’s ad service to automatically handle all the work
associated with loading and presenting the ad content and responding to taps in those ads.

For more information about using iAd in your applications, see iAd Framework Reference.

Graphics and Multimedia

The following sections describe the new graphics and media-related technologies you can incorporate into
your applications.

High-Resolution Screen Support


For the most part, applications running on devices with high-resolution screens should work with little or
no modifications. The coordinate values you specify during drawing or when manipulating views are all
mapped to a logical coordinate system, which is decoupled from the underlying screen resolution. Any
content you draw is automatically scaled as needed to support high-resolution screens. For vector-based

Graphics and Multimedia 13


2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 4.0

drawing code, the system frameworks automatically use any extra pixels to improve the crispness of your
content. And if you use images in your application, UIKit provides support for loading high-resolution variants
of your existing images automatically.

For detailed information about how to support high-resolution screens, see “Supporting High-Resolution
Screens” in iOS Application Programming Guide.

Quick Look Framework


The Quick Look framework (QuickLook.framework) provides a direct interface for previewing the contents
of files your application does not support directly. This framework is intended primarily for applications that
download files from the network or that otherwise work with files from unknown sources. After obtaining
the file, you use the view controller provided by this framework to display the contents of that file directly
in your user interface.

For more information about the classes and methods of this framework, see Quick Look Framework Reference.

AV Foundation
The AV Foundation framework (AVFoundation.framework) is for applications that need to go beyond the
music and movie playback features found in the Media Player framework. Originally introduced in iOS 3.0,
this framework has been expanded in iOS 4 to include significant new capabilities, substantially broadening
its usage beyond basic audio playback and recording capabilities. Specifically, this framework now includes
support for the following features:

■ Media asset management


■ Media editing
■ Movie capture
■ Movie playback
■ Track management
■ Metadata management for media items
■ Stereophonic panning
■ Precise synchronization between sounds
■ An Objective-C interface for determining details about sound files, such as the data format, sample rate,
and number of channels

The AV Foundation framework is a single source for recording and playing back audio and video in iOS. This
framework also provides much more sophisticated support for handling and managing media items.

For more information about the classes and methods of the AV Foundation framework, see AV Foundation
Framework Reference.

14 Graphics and Multimedia


2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 4.0

Assets Library
The Assets Library framework (AssetsLibrary.framework) provides a query-based interface for retrieving
a user’s photos and videos. Using this framework, you can access the same assets that are nominally managed
by the Photos application, including items in the user’s saved photos album and any photos and videos that
were imported onto the device. You can also save new photos and videos back to the user’s saved photos
album.

For more information about the classes and methods of this framework, see Assets Library Framework Reference.

Image I/O
The Image I/O framework (ImageIO.framework) provides interfaces for importing and exporting image
data and image metadata. This framework is built on top of the Core Graphics data types and functions and
supports all of the standard image types available in iOS.

For more information about the functions and data types of this framework, see Image I/O Reference Collection.

Core Media
The Core Media framework (CoreMedia.framework) provides the low-level media types used by AV
Foundation. Most applications should never need to use this framework, but it is provided for those few
developers who need more precise control over the creation and presentation of audio and video content.

For more information about the functions and data types of this framework, see Core Media Framework
Reference.

Core Video
The Core Video framework (CoreVideo.framework) provides buffer and buffer pool support for Core Media.
Most applications should never need to use this framework directly.

Core Services

The following sections describe the new lower-level technologies and features you can incorporate into your
applications.

Block Objects
Block objects are a C-level language construct that you can incorporate into your C and Objective-C code. A
block object is essentially an anonymous function and the data that goes with that function, something
which in other languages is sometimes called a closure or lambda. Blocks are particularly useful as callbacks
or in places where you need a way of easily combining both the code to be executed and the associated
data.

Core Services 15
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 4.0

In iOS, blocks are commonly used in the following scenarios:

■ As a replacement for delegates and delegate methods


■ As a replacement for callback functions
■ To implement completion handlers for one-time operations
■ To facilitate performing a task on all the items in a collection
■ Together with dispatch queues, to perform asynchronous tasks

For an introduction to block objects and how you use them, see A Short Practical Guide to Blocks. For more
information about blocks, see Blocks Programming Topics.

Grand Central Dispatch


Grand Central Dispatch (GCD) is a BSD-level technology that you use to manage the execution of tasks in
your application. GCD combines an asynchronous programming model with a highly optimized core to
provide a convenient (and more efficient) alternative to threading. GCD also provides convenient alternatives
for many types of low-level tasks, such as reading and writing file descriptors, implementing timers, monitoring
signals and process events, and more.

For more information about how to use GCD in your applications, see Concurrency Programming Guide. For
information about specific GCD functions, see Grand Central Dispatch (GCD) Reference.

Accelerate Framework
The Accelerate framework (Accelerate.framework) contains interfaces for performing math, big-number,
and DSP calculations, among others. The advantage of using this framework over writing your own versions
of these libraries is that it is optimized for the different hardware configurations present in iOS-based devices.
Therefore, you can write your code once and be assured that it runs efficiently on all devices.

For more information about the functions of the Accelerate framework, see Accelerate Framework Reference.

Xcode Tools

The following sections describe the improvements to the Xcode tools and the support for developing iOS
applications.

Xcode Improvements
Xcode 3.2.3 introduces automatic device and provisioning-profile management in the Organizer window.
With automatic device provisioning enabled, you can install applications on your device for debugging and
testing without having to log in to your team portal to register the device and download a provisioning
profile

16 Xcode Tools
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 4.0

Note: You still need to log in to your team portal to create provisioning profiles with specific application IDs
for in-app purchase and push notifications. However, once created, those provisioning profiles will also be
managed by Xcode if automatic device provisioning is enabled.

For more information about using Xcode, see iOS Development Guide.

UI Automation API
The Instruments application now provides support for automating the testing of your iOS applications. The
built-in Automation instrument works from scripts (written in JavaScript) that you provide to drive the
simulation of events in your application. These synthetic events are generated with the help of the accessibility
interfaces built into iOS and integrated into all existing UIKit views. You can use this instrument to improve
your testing process and deliver more robust applications.

For information about how to use the Automation instrument, see Instruments User Guide. For information
about the JavaScript objects and commands you use in your scripts, see UI Automation Reference Collection.

Framework Enhancements

The following existing frameworks and technologies include additional incremental changes. For a complete
list of new interfaces, see iOS 4.0 API Diffs.

UIKit Framework Enhancements


The UIKit framework includes the following enhancements:

■ The UIApplication class and UIApplicationDelegate protocol include new methods for scheduling
local notifications and for supporting multitasking.
■ Drawing to a graphics context in UIKit is now thread-safe. Specifically:
❏ The routines used to access and manipulate the graphics context can now correctly handle contexts
residing on different threads.
❏ String and image drawing is now thread-safe.
❏ Using color and font objects in multiple threads is now safe to do.

■ The UIImagePickerController class includes methods for programmatically starting and stopping
video capture. It also includes options for selecting which camera you want to use on a device and for
enabling a built-in flash.
■ The UILocalNotification class supports the configuration of local notifications; see “Local
Notifications” (page 12).
■ The UIView class includes new block-based methods for implementing animations.
■ The UIWindow class has a new rootViewController property that you can use to change the contents
of the window.

Framework Enhancements 17
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 4.0

■ Media applications can now receive events related to the controls on an attached set of headphones.
You can use these events to control the playback of media-related items.
■ Several new accessibility interfaces help you make some UI elements more accessible and allow you to
customize your application experience specifically for VoiceOver users:
❏ The UIAccessibilityAction protocol makes it easy for VoiceOver users to adjust the value of
UI elements, such as pickers and sliders.
❏ UIPickerViewAccessibilityDelegate protocol enables access to the individual components
of a picker.
❏ UIAccessibilityFocus protocol allows you to find out when VoiceOver is focused on an element,
so you can help users avoid making unnecessary taps.
❏ The UIAccessibilityTraitStartsMediaSession trait allows you to prevent VoiceOver from
speaking during a media session that should not be interrupted.
❏ New interfaces in UIAccessibility protocol allow you to specify the language in which labels
and hints are spoken, and provide announcements that describe events that don't update application
UI in way that would be perceptible to VoiceOver users.

■ The UINib class provides a way to instantiate multiple sets of objects efficiently from the same nib file.

For information about the classes of the UIKit framework, see UIKit Framework Reference.

Foundation Framework Enhancements


The Foundation framework includes the following enhancements:

■ Most delegate methods are now declared in formal protocols instead of as categories on NSObject.
■ Block-based variants are now available for many types of operations.
■ There is new support for creating and formatting date information in NSDate and NSDateFormatter.
■ The NSDateComponents class added support for specifying time zone and quarter information.
■ There is support for regular-expression matching using the NSRegularExpression, NSDataDetector,
and NSTextCheckingResult classes.
■ The NSBlockOperation class allows you to add blocks to operation queues.
■ You can use the NSFileManager class to mark files as protected; see “Data Protection” (page 13).
■ The NSFileWrapper class allows you to work with package-based document types.
■ The NSOrthography class describes the linguistic content of a piece of text.
■ The NSCache class provides support for storing and managing temporary data.
■ The URL-related classes have been updated so that you can now pipeline URL requests and set request
priorities.

For information about the classes of the Foundation framework, see Foundation Framework Reference.

18 Framework Enhancements
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 4.0

OpenGL ES Enhancements
The OpenGL ES framework includes the following enhancements:

■ The APPLE_framebuffer_multisample extension enables full-scene anti-aliasing.


■ The EXT_framebuffer_discard extension can be used to improve the performance of applications
that use depth buffers or multisample framebuffers.
■ The APPLE_texture_max_level and EXT_shader_texture_lod extensions provide more control
over texture sampling.
■ The OES_vertex_array_object (http://www.khronos.org/registry/gles/extensions/OES/OES_vertex_ar-
ray_object.txt) API allows caching of vertex array state, to decrease driver overhead.
■ The OES_depth_texture extension enables rendering real-time shadows using shadow maps.
■ The OES_texture_float (http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt)
and OES_texture_half_float (http://www.khronos.org/registry/gles/extensions/OES/OES_tex-
ture_float.txt) extensions adds texture formats with floating point components to enable High Dynamic
Range rendering.
■ The APPLE_rgb_422 (http://www.opengl.org/registry/specs/APPLE/rgb_422.txt) extension enables
texturing from some common video formats.
■ Performance of texture creation and modification has been significantly improved.
■ Driver performance has been generally improved.

Game Kit Enhancements


The Game Kit framework includes a beta implementation of a centralized service called Game Center. This
service provides game developers with a standard way to implement the following features:

■ Aliases allow users to create their own online persona. Users log in to Game Center and interact with
other players anonymously through their alias. Players can set status messages as well as mark specific
people as their friends.
■ Leader boards allow your application to post scores to Game Center and retrieve them later.
■ Matchmaking allows players to connect with other players with Game Center accounts.

Important: GameCenter is available to developers only in iOS 4. It is introduced as a developer-only feature


so that you can provide feedback as you implement and test Game Center features in your applications.
However, Game Center is not a user feature in iOS 4 and you should not deploy applications that use it to
the App Store.

For information about the classes of the Game Kit framework, see Game Kit Framework Reference.

Core Location Enhancements


The Core Location framework now supports the following features:

Framework Enhancements 19
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 4.0

■ A location monitoring service that tracks significant changes using only cellular information. This solution
offers a lower-power alternative for determining the user’s location.
■ The ability to define arbitrary regions and detect boundary crossings into or out of those regions. This
feature can be used for proximity detection regardless of whether the application is running.

For information about the classes of the Core Location framework, see Core Location Framework Reference.

Map Kit Enhancements


The Map Kit framework includes the following enhancements:

■ Support for draggable map annotations


■ Support for map overlays

Draggable map annotations make it much easier to reposition those annotations after they have been added
to a map. The Map Kit framework handles most of the touch events associated with initiating, tracking, and
ending a drag operation. However, the annotation view must work in conjunction with the map view delegate
to ensure that dragging of the annotation view is supported.

Map overlays provide a way to create more complex types of annotations. Instead of being pinned to a single
point, an overlay can represent a path or shape that spans a wider region. You can use overlays to layer
information such as bus routes, election maps, park boundaries, and weather maps on top of the map.

For information about the functions and types of the Map Kit framework, see Map Kit Framework Reference.

Message UI Enhancements
The Message UI framework includes a new MFMessageComposeViewController class for composing SMS
messages. This class manages a standard system interface for composing and sending SMS messages. In
contrast with sending SMS messages using a specially formatted URL, this class allows you to create and
send the message entirely from within your application.

For more information about the classes of the Message UI framework, see Message UI Framework Reference.

Core Graphics Enhancements


The Core Graphics framework includes the following enhancements:

■ The ability to embed metadata into PDF files using the CGPDFContextAddDocumentMetadata function
■ Support for creating color spaces using an ICC profile
■ Graphics context support for font smoothing and fine-grained pixel manipulation

For information about the functions and types of the Core Graphics framework, see Core Graphics Framework
Reference.

20 Framework Enhancements
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 4.0

ICU Enhancements
The International Components for Unicode (ICU) libraries were updated to version 4.4. ICU is an open-source
project for Unicode support and software internationalization. The installed version of ICU includes only a
subset of the header files that are part of the broader ICU library. Specifically, iOS includes only the headers
used to support regular expressions.

For more information about using the functions of the ICU 4.4 library, see the documentation at http://site.icu-
project.org/.

Inherited Improvements

Although iOS 3.2 does not run on iPhone and iPod touch devices, many of the features introduced in that
version of the operating system are also supported in iOS 4. Specifically, iOS 4 supports:

■ Custom input views


■ Connecting external displays
■ File-sharing support
■ Gesture recognizers
■ Core Text for text layout and rendering
■ Text input through integration with the keyboard
■ Custom fonts
■ ICU Regular Expressions
■ Document types
■ PDF generation
■ Xcode Tools changes
■ UIKit framework changes
■ Media Player framework changes
■ Core Animation changes
■ Foundation framework changes

What is not supported are new controls and classes designed specifically for iPad. For more information
about these features, see their descriptions in “iOS 3.2” (page 23).

Inherited Improvements 21
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 4.0

22 Inherited Improvements
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.2

This article summarizes the developer-related features introduced in iOS 3.2. This version of the operating
system runs on iPad only and many of the corresponding features were designed specifically for that device.
In addition to describing the features, this article lists the documents that describe those features in more
detail.

Note: iOS 3.2 does not support iPhone and iPod touch devices. It runs only on iPad. You must use a different
version of the iOS SDK to develop iPhone applications.

For the latest updates and information, you should also see iOS SDK Release Notes for iOS 3.2. For the list of
differences between iOS 3.2 and earlier versions of iOS, see iOS 3.2 API Diffs.

User Interface Changes

Applications running on iPad have several new options for presenting content and receiving input from the
user. For information and guidelines about how to use these new features, be sure to consult iPad Human
Interface Guidelines.

Popovers
Popovers are floating views that reside above your application’s window and help you organize the contents
of your user interface. Popovers help to eliminate the clutter that might occur in applications that need to
display important controls or information in an unobtrusive way that does not distract from the main content.

The benefit of using a popover is that:

■ It appears only in response to specific user interactions and is dismissed automatically when the user
taps outside of its bounds. This behavior makes the popover less obtrusive to the user.
■ It typically covers only a small portion of the screen and so does not obscure as much of the underlying
content as a modal view might.

For more information about using popovers in your application, see “Views and View Controllers” in iPad
Programming Guide.

User Interface Changes 23


2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.2

Split Views
The UISplitViewController class is a new container view controller that you use to manage two
side-by-side content views. These content views are typically used to create a master-detail interface, whereby
selecting an item in one view causes the other view to display detailed information about the selection. The
views themselves are managed by view controllers that you provide.

The split view controller coordinates any interactions between your view controllers and the system. For
example, when the user rotates the device, the split view controller rotates both view controllers together,
forwarding any needed notifications to both of them.

For more information about split views, including how to use them in your applications, see “Views and View
Controllers” in iPad Programming Guide.

Custom Input Views


Instances of the UIResponder class now support the ability to display custom input and accessory views
when they become the first responder. Now, you can provide input views for any of your custom views and
have them presented automatically by the system. (Previously, the keyboard was the only supported input
view, and it was supported only by text view and text field objects.)

In addition to input views, you can also provide a custom accessory view to display above the input view.
Accessory views are commonly used to provide additional buttons and controls when the keyboard is
displayed. The explicit support now provided by responder objects makes it easy to animate your accessory
views into position.

For more information about how to configure and use custom input and accessory views, see “Custom Text
Processing and Input” in iPad Programming Guide and the UIResponder Class Reference.

External Display Support


An iPad can be connected to an external display through a set of supported cables. When connected, the
associated screen can be used by the application to display content. Information about the screen, including
its supported resolutions, is accessible through the interfaces of the UIKit framework. You also use that
framework to associate your application’s windows with one screen or another.

■ The UIScreen class provides support for retrieving screen objects for all available screens (including
the device’s main screen). Each screen object contains information about the properties of the screen
itself, including the dimensions that correctly take into account the size and pixel aspect ratio of the
screen.
■ The UIScreenMode class provides information about one particular size and pixel aspect ratio setting
of a screen.
■ Windows (represented by the UIWindow class) can now be assigned to a specific screen.

For more information about the support offered by these classes, see the individual class descriptions in UIKit
Framework Reference.

24 User Interface Changes


2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.2

Gesture Recognizers
Gesture recognizers are objects that you attach to views and use to detect common types of gestures. After
attaching it to your view, you tell it what action you want performed when the gesture occurs. The gesture
recognizer object then tracks the raw events and applies the system-defined heuristics for what the given
gesture should be. Prior to gesture recognizers, the process for detecting a gesture involved tracking the
raw stream of touch events coming to your view and applying potentially complicated heuristics to determine
whether the events represented the given gesture.

UIKit now includes a UIGestureRecognizer class that defines the basic behavior for all gesture recognizers.
You can define your own custom gesture recognizer subclasses or use one of the system-supplied subclasses
to handle any of the following standard gestures:

■ Tapping (any number of taps)


■ Pinching in and out (for zooming)
■ Panning or dragging
■ Swiping (in any direction)
■ Rotating (fingers moving in opposite directions)
■ Long presses

For more information about using gesture recognizers in your application, see “Gesture Recognizers” in iPad
Programming Guide.

Improved Text Support

In iOS 3.2, there is significant new support for text input and rendering. This support is provided for
applications, such as word processors, that need more sophisticated text-handling capabilities.

Core Text
The Core Text framework (CoreText.framework) contains a set of simple, high-performance C-based
interfaces for laying out text and handling fonts. The Core Text framework provides a complete text layout
engine that you can use to manage the placement of text on the screen. The text you manage can also be
styled with different fonts and rendering attributes.

This framework is intended for use by applications that require sophisticated text handling capabilities, such
as word processing applications. If your application requires only simple text input and display, you should
continue to use the existing classes of the UIKit framework.

For more information about using the Core Text interfaces, see Core Text Programming Guide and Core Text
Reference Collection.

Improved Text Support 25


2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.2

Text Input Support


The UIKit framework (UIKit.framework) includes new protocols that allow you to implement custom
text-input objects. If you are implementing an application that requires sophisticated text-handling capabilities,
you can use these protocols to implement new views and controls for receiving incoming text. Depending
on your needs, there are different protocols for receiving text input. Which protocols you use will depend
on the complexity of your user interface.

■ The UIKeyInput protocol lets you define simple objects (like text fields) that are capable of
character-by-character input.
■ The UITextInput protocol lets you define complex text views that support multiple lines of text,
selections, pasteboard operations, and more.

For more information about how to use the text input support to implement your own custom objects, see
“Custom Text Processing and Input” in iPad Programming Guide.

Custom Font Support


Applications that want to use custom fonts can now include those fonts in their application bundle and
register those fonts with the system by including the UIAppFonts key in their Info.plist file. The value
of this key is an array of strings identifying the font files in the application’s bundle. When the system sees
the key, it loads the specified fonts and makes them available to the application.

For more information about the keys you can include in your application’s Info.plist file, see Information
Property List Key Reference.

ICU Regular-Expression Support


The BSD layer of iOS now exposes a modified version of 4.2 of the International Components for Unicode
(ICU) libraries. ICU is an open-source project for Unicode support and software internationalization. The
installed version of ICU includes only those header files necessary to support regular expressions.

For more information about using the functions of the ICU 4.2 library, see the documentation and user guide
at http://icu-project.org/apiref/icu4c/index.html.

File and Document Support

In iOS 3.2, there is new support for exchanging and opening files. This support makes it easier to implement
more document-centric applications, similar to what you might find on a desktop computer, while still
maintaining a simplified interface for your users.

26 File and Document Support


2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.2

File-Sharing Support
Applications that want to make user data files accessible can do so using application file sharing. File sharing
enables the application to expose the contents of its /Documents directory to the user through iTunes. The
user can then move files back and forth between the iPad and a desktop computer. This feature does not
allow your application to share files with other applications on the same device, though. To share data and
files between applications, you must use the pasteboard or a document interaction controller object.

To enable file sharing for your application, do the following:

1. Add the UIFileSharingEnabled key to your application’s Info.plist file and set the value of the
key to YES.

2. Put whatever files you want to share in your application’s Documents directory.

3. When the device is plugged into the user’s computer, iTunes 9.1 displays a File Sharing section in the
Apps tab of the selected device.

4. The user can add files to this directory or move files to the desktop.

Applications that support file sharing should be able to recognize when files have been added to the
Documents directory and respond appropriately. For example, your application might make the contents of
any new files available from its interface. You should never present the user with the list of files in this directory
and ask them to decide what to do with those files.

For additional information about the UIFileSharingEnabled key, see Information Property List Key Reference.

Document Support
An application can now register the file types it supports with the system and receive notifications when a
file of the given type needs to be opened. It does this by including the CFBundleDocumentTypes key in its
Info.plist file. An application that registers one or more file types may also be expected to open files of those
types at some point later. It does this by implementing the
application:didFinishLaunchingWithOptions: method in its application delegate and look for a file
in the UIApplicationLaunchOptionsURLKey key of the provided dictionary.

Complementing the ability to open files of known types is the addition of the
UIDocumentInteractionController class in the UIKit framework. This class provides a user-based
interaction model for managing files that your application does not know how to open. The document
interaction controller provides options for previewing the contents of a file in place or opening it in another
application. Document interaction controllers are particularly useful for email applications or applications
that may download files from the network.

For more information about supporting documents, see “The Core Application Design” in iPad Programming
Guide.

File and Document Support 27


2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.2

PDF Generation
The UIKit framework (UIKit.framework) includes new functions for generating PDF files and data objects
from your application’s custom content. You can use this support to generate PDF-based content for use
within your application or for storing to the local disk. The UIKit functions manage the setup and pagination
for the PDF data. You provide the actual content using the same native platform graphics technologies (UIKit,
Core Graphics, Core Text, and so on) already available for drawing to the screen. (You cannot draw to a PDF
context directly using OpenGL commands. However, you can transfer the pixels of your rendered content
to a CGImageRef data type and draw that.)

For more information about how to use the new UIKit functions to create PDF content, see “Graphics and
Drawing” in iPad Programming Guide.

Xcode Tools

Xcode includes new features to make developing applications that run on iPad much simpler, including the
following:

■ Xcode simplifies the process of sharing code between your iPhone and iPad applications by helping you
update your existing iPhone projects to include the necessary files to support iPad. The Upgrade Current
Target for iPad command (formerly the Transition command) in the Project menu creates a new target
for the iPad and modifies a copy of your project’s nib files to support the larger screen size. For more
information on how to use this command, see iPad Programming Guide.
■ Xcode simplifies the validation and submission process of your applications by allowing you to debug
signed applications.
■ You can now easily transfer your iOS developer identity information to a new computer. The Organizer
window includes an option to export your profile and certificate information. To begin developing on
a new computer, all you have to do is import the resulting data file into Xcode on that computer.
■ Interface Builder supports the new view controllers and window sizes available for iPad.

API Changes

The following frameworks and technologies include additional incremental changes.

UIKit Framework Changes


The UIKit framework includes the following additions:

■ The UIBezierPath class is a new class that supports the creation of vector-based shapes. This class
provides an object-oriented wrapper around Core Graphics paths.
■ The UIScrollViewDelegate protocol includes additional methods for processing zoom-related events
in a scroll view.

28 Xcode Tools
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.2

■ Modal view controllers can now be presented in a style other than full screen. The UIViewController
class includes a modalPresentationStyle property that allows you to present modal view controllers
using one of several predefined styles.
■ The UIMenuController class now allows you to add custom menu items. You can use custom menu
items to augment the Cut, Copy, Paste, and Select behavior provided by the system.
■ The UITextChecker class supports spell-checking of strings and aids in word completion.
■ Support for popovers, described in “Popovers” (page 23).
■ The UISplitViewController class, described in “Split Views” (page 24).
■ Support for gesture recognizers, described in “Gesture Recognizers” (page 25).
■ Support for implementing custom input and accessory views, described in “Custom Input Views” (page
24).
■ Support for getting information about externally connected displays, described in “External Display
Support” (page 24).
■ Support for creating PDF files, described in “PDF Generation” (page 28).
■ Support for previewing and opening documents, described in “Document Support” (page 27).

For more information about the classes of the UIKit framework, see UIKit Framework Reference.

Media Player Framework Changes


The video classes in the Media Player framework (MediaPlayer.framework) have been redesigned to give
you more control over the presentation of video content. Instead of simply playing a video full screen, the
MPMoviePlayerController class now vends a view that you can incorporate into your interface however
you want. This class also includes more sophisticated support for managing and controlling the playback of
movies.

For situations where you want a simpler alternative to movie presentation, you can now use the
MPMoviePlayerViewController class. This new class provides a view controller-based wrapper for a movie
interface and is for applications that want the same basic behavior offered by the older movie player controller
design.

For information about the new classes available in this framework, see Media Player Framework Reference.

Core Animation Changes


The Core Animation technology (defined in QuartzCore.framework) includes the following additional
features:

■ The CATextLayer class is now available for incorporating text-based content into your layer hierarchies.
■ You can now apply shadow effects to a layer and customize the appearance of the shadow using the
shadowOpacity, shadowRadius, shadowOffset, shadowColor, and shadowPath properties.

■ You can configure the rasterization behavior of the layer using the shouldRasterize and
rasterizationScale properties.

API Changes 29
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.2

For more information about Core Animation classes, see Core Animation Reference Collection.

MapKit Framework Changes


The MKReverseGeocoder class now includes a placemark property for accessing the placemark that was
computed by the reverse geocoding service. You can use this property to retrieve placemark information
after the results are reported to the associated delegate object.

For more information about the classes of the MapKit framework, see Map Kit Framework Reference.

Foundation Framework Changes


The NSString class now includes the ability to search the text of a string using regular expressions. The
NSStringCompareOptions type includes a new flag called NSRegularExpressionSearch, which you
can use in conjunction with the following methods:

■ rangeOfString:options:

■ rangeOfString:options:range:

■ rangeOfString:options:range:locale:

When you pass the NSRegularExpressionSearch as an option, the search string is interpreted as a regular
expression instead of a string literal. The regular expression syntax conforms to the syntax used by the
International Components for Unicode (ICU) library. When performing regular expression searches, the only
other options you can include in the mask parameter are the NSCaseInsensitiveSearch and the
NSAnchoredSearch flags.

Because some regular expressions can trigger a match but still return a zero-length range, you should check
both the location and range length of the result. If a match was unsuccessful, the search methods always
return a range whose location is set to NSNotFound and whose length is 0.

For more information about the NSString class and its methods, see NSString Class Reference. For more
information about regular expressions in the ICU library, go to http://site.icu-project.org/.

30 API Changes
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.1

This article summarizes the features that are available beginning with iOS 3.1 and including all minor releases
up to, but not including iOS 3.2. For the latest updates and information about additional minor updates, you
should also see iOS SDK Release Notes for iOS 3.1.

Video Editing Support

The UIKit framework now includes the UIVideoEditorController class, which provides a standard user
interface for editing video clips on supported devices.

Core Animation Enhancements

Introduced in iOS 3.1, the CADisplayLink class is essentially a timer whose notifications are synchronized
with the screen refresh rate (or some partial interval thereof ). Graphics-intensive applications can use these
notifications as a signal to begin preparing the next frame of content.

For more information about how to use this class, see CADisplayLink Class Reference.

Instruments

In iOS 3.1 and later, the Instruments application includes support for gathering performance data wirelessly
over Wi-Fi. This support allows you to gather performance metrics for applications that might need to use
the 30-pin dock connector for other purposes. For example, you could use it to gather performance data for
an application that is communicating with an external accessory.

For more information about how to use this feature, see Instruments User Guide.

Video Editing Support 31


2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.1

32 Instruments
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.0

This article summarizes the key features that are available beginning with iOS 3.0. It also lists many of the
documents that were created or updated for the release.

Apple Push Notification Service

The Apple Push Notification Service provides a way to alert your users of new information, even when your
application is not actively running. Using this service, you can push text notifications, trigger audible alerts,
or add a numbered badge to your application icon. These messages let users know that they should open
your application to receive the related information.

From a design standpoint, there are two parts to making push notifications work for your iOS applications.
First, you need to request the delivery of notifications to your iOS application and then you need to configure
your application delegate to process them. The delegate works together with the shared UIApplication
object to perform both of these tasks. Second, you need to provide a server-side process to generate the
notifications in the first place. This process lives on your own local server and works with Apple Push
Notification Service to trigger the notifications.

For more information about how to configure your application to use remote notifications, see Local and
Push Notification Programming Guide.

Cut, Copy, and Paste

The UIKit framework provides new classes to support pasteboard operations and also incorporates selection
and pasteboard behaviors into some existing UIKit views. You can use the new classes to incorporate support
cut, copy, and paste behaviors into your application. One of the key new classes is the UIPasteboard class,
which manages the content on the systemwide pasteboards. It is through this class that you can now store
selected content and transfer it within your application or to other applications.

The UIPasteboard object provides built-in support for storing standard data types such as strings, images,
colors, and URLs. These types represent some of the most common data types and make it easier to exchange
content between applications. However, you can also exchange content in custom data formats supported
only by your application or in more standardized interchange formats.

Several existing UIKit views now provide automatic support for text selection and pasteboard operations. In
particular, the UITextField, UITextView, and UIWebView classes automatically handle text selections and
the display of an editing menu with the appropriate Cut, Copy, Paste, Select, and Select all commands.

For custom views, the UIKit framework also includes the UIMenuController class for managing the editing
menu. You use this class, together with your application’s own custom selection behavior, to allow the user
to cut, copy, paste, and select custom content. The menu displays standard commands to cut or copy the
selected content or to paste new content based on the operations currently supported by your view.

Apple Push Notification Service 33


2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.0

For information about how to incorporate pasteboard support into your application, see “Document Revision
History” in iOS Application Programming Guide. You should also consult “Handling Common Tasks” in iPhone
Human Interface Guidelines for information about the interface guidelines associated with supporting cut,
copy, and paste operations.

Accessory Support

The External Accessory framework (ExternalAccessory.framework) provides support for communicating


with hardware accessories attached to an iOS-based device. Accessories can be connected through the 30-pin
dock connector of a device or wirelessly using Bluetooth. The External Accessory framework provides a way
for you to get information about each available accessory and to initiate communications sessions. After
that, you are free to manipulate the accessory directly using any commands it supports.

For more information about how to use this framework, see External Accessory Programming Topics. For
information about the classes of the External Accessory framework, see External Accessory Framework Reference.
For information about developing accessories for iOS-based devices, go to http://developer.apple.com.

In App Purchase Support

The Store Kit framework (StoreKit.framework) provides a means for you to make additional content and
services available from within your iOS applications. For example, you could use this feature to allow the user
to unlock additional application features. Or if you are a game developer, you could use it to offer additional
game levels. In both cases, the Store Kit framework handles the financial aspects of the transaction, processing
payment requests through the user’s iTunes Store account and providing your application with information
about the purchase.

The Store Kit focuses on the financial aspects of a transaction, ensuring that transactions occur securely and
correctly. Your application handles the other aspects of the transaction, including the presentation of a
purchasing interface and the downloading (or unlocking) of the appropriate content. This division of labor
gives you control over the user experience for purchasing content. You decide what kind of purchasing
interface you want to present to the user and when to do so. You also decide on the delivery mechanism
that works best for your application.

For information about how to use the Store Kit framework, see In App Purchase Programming Guide and Store
Kit Framework Reference.

Peer to Peer Support

The Game Kit framework (GameKit.framework) lets you add peer-to-peer network capabilities to your
applications. Specifically, this framework provides support for peer-to-peer connectivity and in-game voice
features. Although these features are most commonly found in multiplayer network games, you can incorporate
them into non-game applications as well. The framework provides you with networking features through a
simple (yet powerful) set of classes built on top of Bonjour. These classes abstract out many of the network
details, making it easy for developers who might be inexperienced with networking programming to
incorporate networking features into their applications.

34 Accessory Support
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.0

For more information about how to use the Game Kit framework, see Game Kit Programming Guide and Game
Kit Framework Reference.

Maps API

The Map Kit framework (MapKit.framework) provides a map interface that you can embed into your own
application. Based on the behavior of this interface within the Maps application, this interface provides a
scrollable map view that can be annotated with custom information. You can embed this view inside of your
own application views and programmatically set various attributes of the map, including the currently
displayed map region and the user’s location. You can also define custom annotations or use standard
annotations (such as a pin marker) to highlight regions of the map and display additional information.

For more information about the classes of the Map Kit framework, see Map Kit Framework Reference.

iPod Library Access

Several new classes and protocols have been added to the Media Player framework
(MediaPlayer.framework) to allow access to the user’s audio library. You can use these classes to perform
the following tasks:

■ Play audio items from the user’s library. This support lets you play all audio types supported by the iPod
application.
■ Construct queues of audio items to play back.
■ Perform searches of the user’s audio library.
■ Access the user’s playlists (including smart, on-the-go, and genius playlists).

For more information about the classes of the Media Player framework, see Media Player Framework Reference.

Audio Recording and Management

The AV Foundation framework (AVFoundation.framework) includes the following new classes and protocols
for recording audio and managing audio sessions:

■ The AVAudioRecorder class provides audio recording capabilities. This class works together with an
audio delegate (conforming to the AVAudioRecorderDelegate protocol) to manage state changes
during recording.
■ The AVAudioSession class provides control over audio context including audio session category, sample
rate, and I/O buffer duration. This class works with an audio session delegate (conforming to the
AVAudioSessionDelegate protocol) to respond to audio hardware route changes and audio
interruptions.
■ New constants for configuring audio formats, audio encoding, and sample rate conversion for recording.

Maps API 35
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.0

For more information about the classes of the AV Foundation framework, see AV Foundation Framework
Reference.

Core Data

The Core Data framework (CoreData.framework) is a technology for managing the data model of a
Model-View-Controller application. Core Data is intended for use in applications where the data model is
already highly structured. Instead of defining data structures programmatically, you use the graphical tools
in Xcode to build a schema representing your data model. At runtime, instances of your data-model entities
are created, managed, and made available through the Core Data framework.

By managing your application’s data model for you, Core Data significantly reduces the amount of code you
have to write for your application. Core Data also provides the following features:

■ Storage of object data in a SQLite database for optimal performance


■ A new NSFetchedResultsController class to manage results for table views
■ Management of undo/redo beyond basic text editing
■ Support for the validation of property values
■ Support for propagating changes and ensuring that the relationships between objects remain consistent
■ Support for grouping, filtering, and organizing data in memory

If you are starting to develop a new application or are planning a significant update to an existing application,
you should consider using Core Data. For an example of how to use Core Data in an iOS application, see Core
Data Tutorial for iOS. For more information about the classes of the Core Data framework, see Core Data
Framework Reference.

In App Email

The Message UI framework (MessageUI.framework) is a new framework that provides support for composing
and queuing email messages in the user’s outbox. The composition support consists of a view controller
interface that you can present in your application. You can populate the fields of this interface with the
contents of the message you want to send. You can set the recipients, subject, body content, and any
attachments you want to include with the message. The user then has the option of editing the message
prior to accepting it. Once accepted, the message is queued in the user’s outbox for delivery.

For more information about the classes of the Message UI framework, see Message UI Framework Reference.

Streaming Video

There is now support for the playback of live video streamed over http. Streamed content can be played
back on an iOS-based device using the MPMoviePlayerController class. The semantics of using this class
have not changed. The main differences are in the preparation of the streamed content and how it is published
on a web server.

36 Core Data
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.0

For more information about how to prepare content for video streaming, see HTTP Live Streaming Overview.

Safari Features

Safari supports the audio and video HTML elements, which allow you to embed audio and video content
into your web applications. Safari also supports the Geolocation JavaScript classes, which work with the
onboard location services to retrieve the current location of the device.

For more information about how to use these features in your web applications, see Safari Web Content Guide.

Shared Keychain Items

It is now possible for you to share Keychain items among multiple applications you create. Sharing items
makes it easier for applications in the same suite to interoperate more smoothly. For example, you could use
this feature to share user passwords or other elements that might otherwise require you to prompt the user
from each application separately.

Sharing Keychain items involves setting up the proper entitlements in your application binaries. Using Xcode,
you must create an Entitlements property list file that includes the supported entitlements for your application.
The process for creating this file is described in iOS Development Guide. For information about the entitlements
you can configure, see the description for the SecItemAdd function in Keychain Services Reference.

Accessing shared items at runtime involves using the Keychain Services programming interface with the
access groups you set up during development. For information about how to access the Keychain, see
Keychain Services Programming Guide.

Accessibility Support

Accessibility support makes it easier for people with visual, auditory, and physical disabilities to use iOS-based
devices. In addition, users with the appropriate hardware can take advantage of the following features:

■ Zoom - magnifies the entire screen of the device.


■ White on Black - inverts the colors on the display.
■ Mono Audio - combines the left and right channels into a mono signal that is played in both audio
channels.
■ Speak auto-text - speaks the text that users type, along with any corrections or suggestions made by
the system.
■ Voice Control - allows users to make phone calls and control iPod playback using voice commands.
■ VoiceOver - provides an audible description of the elements touched and the actions taken by the user.

Safari Features 37
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.0

Developers can make their own applications accessible to VoiceOver users by taking advantage of the support
built-in to the UIKit framework. All standard system views and controls now provide default descriptions for
use by VoiceOver. However, you can use the new accessibility interfaces in UIKit to improve on the default
support and provide more accurate descriptions of your application’s views and controls. Providing more
context-aware descriptions gives disabled users better access to your application’s content.

For information about how to make your own applications accessible, see Accessibility Programming Guide
for iOS.

Compass Support

The Core Location framework now includes support for obtaining heading information from iOS-based
devices with a built-in magnetometer. Heading information obtained from such devices can be used to
implement a real-time compass or other navigation-related programs.

For more information about accessing compass information, see Core Location Framework Reference.

OpenGL ES 2.0

Applications can now take advantage of the OpenGL ES 2.0 specification on iOS-based devices with appropriate
graphics hardware. OpenGL ES 2.0 is a new version of the OpenGL ES specification that offers features not
available in OpenGL ES 1.1. Specifically, the new version provides support for shaders, including fragment
and vertex shaders. The use of shaders now eliminates the need for many of the fixed function interfaces
that were part of the OpenGL ES 1.1 specification.

Note: OpenGL ES 1.1 is supported on all iOS-based devices, whereas OpenGL ES 2.0 is supported only on
newer hardware.

For more information about OpenGL ES 2.0 in particular, and about OpenGL ES support in general, see OpenGL
ES Programming Guide for iOS.

Additional Enhancements

In addition to the major new features in iOS, several frameworks and technologies have received incremental
updates to improve the development experience.

UIKit Framework Enhancements


The UIKit framework (UIKit.framework) has been enhanced to support major new features in iOS 3.0, such
as cut, copy, and paste operations. In addition, this framework has some new classes and has minor
improvements to existing classes, including the following:

38 Compass Support
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.0

■ New classes (UIPasteboard and UIMenuController) and general improvements to the UITextField,
UITextView, and UIWebView classes to support the selection of text and to support cut, copy, and
paste operations
■ Support for handling “motion” events, which currently consist of shake events. Typically, you use shake
events to initiate undo operations but you may use them for other purposes as well; see “Document
Revision History” in iOS Application Programming Guide for more information.
■ Support in the UIDevice class for accessing the battery state and proximity sensor
■ Support for capturing video (on hardware that supports it) using the UIImagePickerController class
■ Enhancements to search bar controls, including the new UISearchDisplayController class to manage
search results
■ New support for one-step view rotations from a view controller; see UIViewController Class Reference
■ New modal transition styles, including support for flip and cross-fade transitions; see UIViewController
Class Reference
■ Navigation controller support for a standard built-in toolbar whose contents can change to reflect the
currently active view controller; see UINavigationController Class Reference
■ Improvements to table views, including support for new cell styles, more table reloading options, and
support for customizing the title of delete confirmation buttons. There is also a new class
(UILocalizedIndexedCollation) to help with data sorting and organization for table view sections.
■ Support for content stretching in the UIView class, which allows the creation of 3- or 9-part stretched
images without using a stretchable UIImage or multiple image views
■ Enhanced support for data detection in the UITextView and UIWebView classes. This support lets you
configure what types of data (phone numbers, URLS, and addresses) should be automatically detected
in text and converted to clickable links.
■ Enhanced support in UIWebView for displaying previews of RTF, RTFD, PDF, iWork, and Office documents

For more information about the classes of the UIKit framework, see UIKit Framework Reference. For guidance
on when to use the new features in your applications, see iPhone Human Interface Guidelines.

Foundation Framework Enhancements


The Foundation framework (Foundation.framework) has been updated to support the following features
related to undo management and Core Data:

■ Inclusion of the NSUndoManager class to support Core Data and general undo operations
■ Inclusion of the NSExpression, NSPredicate, NSComparisonPredicate, NSCompoundPredicate,
and NSValueTransformer classes to support Core Data

For more information about the classes of the Foundation framework, see Foundation Framework Reference.

Core Audio Enhancements


Enhancements have been made to the Audio Toolbox, Audio Unit, and Core Audio frameworks, including
the following additions:

Additional Enhancements 39
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
iOS 3.0

■ New support for decoding MP3 and AAC audio content in software. This support effectively allows you
to play multiple compressed files simultaneously (one using the hardware decoder and one or more
using the software decoder).
■ Enhanced support in the Audio Toolbox framework for determining if audio codecs are available in
software, hardware, or both
■ Enhanced support in the Audio Unit framework for registering your audio units and connecting audio
unit processing graphs in your iOS application
■ Support for three new audio formats:
❏ DVI/Intel IMA ADPCM
❏ Microsoft GSM 6.10
❏ AES3-2003

For more information about the Core Audio interfaces, see Audio Toolbox Framework Reference, Audio Unit
Framework Reference, and Core Audio Framework Reference.

API Changes

For information about the changes that occurred between iOS 2.0 and iOS 2.2, see iPhone 2.1 API Diffs and
iPhone 2.2 API Diffs. For information about the changes that occurred between iOS 2.2 and iOS 3.0, see iOS
3.0 API Diffs.

40 API Changes
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
Document Revision History

This table describes the changes to What's New in iOS.

Date Notes

2010-08-17 Added features introduced in iOS 4.1.

2010-07-08 Changed the title from "What's New in iPhone OS."

2010-06-04 Added information about new features in iOS 4.0.

2010-03-24 Moved the iOS 3.1 information to its own article and added a new article covering
features in iOS 3.2.

2009-08-27 Updated the iOS 3.0 article to reflect features introduced in all 3.x versions of
iOS.

2009-06-16 Added new features related to the introduction of new iPhone hardware.

41
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.
Document Revision History

42
2010-08-17 | © 2010 Apple Inc. All Rights Reserved.

You might also like