iOS
6.0
This article summarizes the key
developer-related features introduced in iOS 6. This version of the operating
system runs on current iOS-based devices. In addition to describing the key new
features, this article lists the documents that describe those features in more
detail.
For late-breaking news and
information about known issues see iOS 6
Doc For the complete list of new
APIs added in iOS 6, see iOS 6.0 Api Diff Doc
Maps
In addition to the new map tiles
provided by Apple, the Maps app and MapKit framework now support additional
interactions with other apps. Apps that do not incorporate their own map
support now have an easier way to launch the Maps app and display points of
interest or directions. Apps that offer routing information, such as
turn-by-turn navigation services, can now register as a routing app and make
those services available to the entire system.
Registering as a routing app gives
you more opportunities to get your app in front of users. Routing apps are not
limited to just driving or walking directions. Routing apps can also include
apps that provide directions for the user’s favorite bicycle or hiking trail,
for air routes, and for subway or other public transportation lines. And your
app does not even have to be installed on the user’s device. Maps knows about
routing apps in the App Store and can provide the user with the option to
purchase those apps and use them for directions.
Apps that do not provide routing
directions themselves can also take advantage of both Maps and routing apps.
Apps can use new interfaces to ask the Maps app to display specific locations
or to display routing directions between two locations.
Social
Framework
The Social framework
(Social.framework) provides a simple interface for accessing the user’s social
media accounts. This framework supplants the Twitter framework that was
introduced in iOS 5 and adds support for other social accounts, including
Facebook and Sina’s Weibo service. Apps can use this framework to post status
updates and images to a user’s account. This framework works with the Accounts
framework to provide a single sign-on model for the user and to ensure that
access to the user’s account is approved.
The
UIKit framework also provides a new UIActivityViewController class for displaying actions that
the user might perform on some selected content. One use of this class is to
allow the user to post content to social accounts, such as Twitter or Facebook.
You present this class modally on iPhone or using a popover controller on iPad.
When the user taps one of the buttons, the view controller presents a new
interface to perform the associated action.
Pass
Kit
Pass Kit is a new technology that
uses web services, a new file format, and an Objective-C framework
(PassKit.framework) to implement support for downloadable passes. Companies can
create passes to represent items such as coupons, boarding passes, event
tickets, and discount cards for businesses. Instead of carrying a physical
representation of these items, users can now store them on their iOS device and
use them the same way as before.
Passes are created by your
company’s web service and delivered to the user’s device via email, Safari, or
your custom app. The pass itself uses a special file format and is
cryptographically signed before being delivered. The file format identifies
relevant information about the service being offered so that the user knows
what it is for. It might also contain a bar code or other information that you
can then use to validate the card so that it can be redeemed or used.
Game
Center
Game Center has been updated and
new features have been added to improve the game playing experience. The Game
Kit framework (GameKit.framework) includes the following incremental and major
changes:
Challenges allow a player to
challenge a friend to beat an achievement or score. Players can issue
challenges from the Game Center app. You can also use the GKChallenge class to issue challenges from within your
game.
The GKGameCenterViewController class incorporates all of the
previous capabilities of the leaderboard, achievement and friend request view
controllers. You can use the previous view controllers too, but they now
present the appropriate tab in the game center view controller.
The process for authenticating a
local player has changed. In the new process, you set the authenticateHandler property to a block and call the
authenticate method. Game Kit no longer displays the authentication interface
directly. Instead, your app is asked to present an appropriate authentication
view controller, giving you more control over the authentication process.
The turn-based match class now has
support for player timeouts. When using a timeout, you specify a list of
players in order. If a player times out, the next player in the list is asked
to take a turn instead.
The GKMatchmaker class has been updated to include better support for
programmatic matchmaking. It is now easier to implement your own user interface
for matchmaking on top of Game Center’s built-in support.
The GKPlayer class now supports display names for players.
The GKMatch class provides a method to estimate which player has
the best connection to Game Center. You can use this method when implementing
your own client-server architecture on top of the GKMatch infrastructure.
The GKAchievement class now allows multiple achievements to be submitted at
the same time.
Reminders
The Event Kit framework now
includes interfaces for creating and accessing reminders on the user’s device.
The reminders you create show up in the Reminders app along with ones created
by the user. Reminders can include proximity or time-based alarms.
In-App
Purchase
The Store Kit framework
(StoreKit.framework) now supports the purchasing of iTunes content inside your
app and provides support for having downloadable content hosted on Apple
servers. With in-app content purchases, you present a view controller that lets
users purchase apps, music, books, and other iTunes content directly from
within your app. You identify the items you want to make available for purchase
but the rest of the transaction is handled for you by Store Kit.
Prior
to iOS 6, you were responsible for managing any downloadable content made
available through in app purchase. Hosted downloads now simplify the work you
need to do to make content available to users. The new SKDownload class represents a downloadable piece of content. In
addition, the SKPaymentTransaction class has been modified to provide
an array of download objects for any hosted content. To download a piece of
content, you queue a download object on the payment queue. When the download
completes, your payment queue observer is notified.
Collection
Views
The UICollectionView class offers a new way to present ordered data to users.
With a collection view object, you are now able to define the presentation and
arrangement of embedded views. The collection view class works closely with an
accompanying layout object to define the placement of individual data items.
UIKit provides a standard flow-based layout object that you can use to implement
multi-column grids containing items of standard or varying sizes. And if you
want to go beyond grid layouts, you can create your own custom layout objects
to support any layout style you choose.
Collection views work with a
dedicated group of classes to support the display of items. In addition to
cells, collection views can have supplementary views and decoration views. The
usage and placement of these views is controlled entirely by the layout object.
For example, the flow-based layout object uses supplementary views to implement
header and footer views for sections in the collection view.
Other noteworthy features of
collection views include:
Support for animating content
within the collection view
Batch support for inserting,
moving, and deleting items
A simplified model for creating
and managing cells and other views
UI
State Preservation
State preservation makes it easier
for apps to restore their user interface to the state it was in when the user
last used it. Prior to iOS 6, apps were encouraged to write out information
about their current interface state in the event that the app was terminated.
Upon relaunch, the app could use this state to restore its interface and make
it seem as if the app had never quit. State preservation simplifies this
process by providing you with all of the core infrastructure for saving and
restoring your app’s interface.
Implementing state preservation
still requires effort on your part to identify what parts of your interface to
save. In addition, the preservation and restoration processes can be customized
to accommodate unforeseen circumstances, such as missing content during a
subsequent relaunch or changes to your app’s UI.
Auto
Layout
Auto layout improves upon the
“springs and struts” model previously used to lay out the elements of a user
interface. With auto layout, you define rules for how to lay out the elements
in your user interface. These rules express a larger class of relationships and
are more intuitive to use than springs and struts.
The entities used in Auto Layout
are Objective-C objects called constraints. This approach brings you a number
of benefits:
Localization through swapping of
strings alone, instead of also revamping layouts.
Mirroring of user-interface
elements for right-to-left languages like Hebrew and Arabic.
Better layering of responsibility
between objects in the view and controller layers.
A view object usually knows
best about its standard size and its positioning within its superview and
relative to its sibling views. A controller can override these values if
something nonstandard is required.
Data
Privacy
In addition to location data, the
system now asks the user’s permission before allowing third-party apps to
access certain user data, including:
Contacts
Calendars
Reminders
Photo Library
For contact, calendar, and
reminder data, your app needs to be prepared to be denied access to these items
and to adjust its behavior accordingly. If the user has not yet been prompted
to allow access, the returned structure is valid but contains no records. If
the user has denied access, the app receives a NULL value or no data. If the
user grants permission to the app, the system subsequently notifies the app
that it needs to reload or revert the data.
For the photo library, the
existing interface supports the app being denied access.
Your
app can provide a description for how it intends to use the data in its
Info.plist file. That data is then displayed to the user when the system needs
to prompt for access.
Additional
Framework Enhancements
In
addition to the items discussed in the preceding sections, the following
frameworks have additional enhancements.
UIKit
Framework
The UIKit framework
(UIKit.framework)includes the following enhancements:
UIKit now supports state preservation for your app’s user
interface; see “UI State Preservation.”
Views now support constraint-based
layout; see “Auto Layout.”
The UICollectionView class (and its supporting classes and protocols) support
the presentation of ordered collections of items; see “Collection
Views.”
Accessibility support has been
improved to include new VoiceOver enhancements:
VoiceOver can now use gestures to
trigger specific actions.
Developers can order items
together in the element list that VoiceOver creates to provide a more logical
flow from element to element.
Scroll views can now provide a
special status string during scrolling.
You can now post notifications
that let the accessibility system know your app’s layout or UI have changed.
New notifications provide
information about the state of VoiceOver announcements.
The UIActivityViewController class adds support for sharing
content via services like email, Twitter, and Facebook; see also, “Social
Framework.”
The UIDevice class adds advertising-specific and vendor-specific
identifiers.
The UIImage class includes new initialization methods for specifying
the scale factor of an image.
A simplified model for creating and managing cells and
other views.
Storyboards allow you to unwind segues and specify restoration
identifiers.
The UIWebView class provides a way to disable the incremental rendering
of web content.
The UIViewController class has new interfaces supporting the following
behaviors:
New interfaces provide a clearer
path for managing and tracking interface rotations.
You can prevent a segue from being
triggered.
Support has been added for
unwinding segues.
You can now subclass UINavigationBar and incorporate your custom
navigation bar into your app’s navigation interfaces.
OpenGL
ES
OpenGL ES includes the following
new extensions:
The GL_EXT_texture_storage extension allows your app to
specify the entire structure of a texture in a single call, allowing your
textures to be optimized further by OpenGL ES.
The GL_APPLE_copy_texture_levels extension builds on top of the
functionality of the GL_EXT_texture_storage extension and allows a set of
texture mipmaps to be copied from one texture to another.
The GL_APPLE_sync extension provides fine-grain synchronization to your app.
It allows you to choose a subset of submitted OpenGL ES commands and block
until those commands complete.
The GL_APPLE_shader_framebuffer_fetch extension is only available to
OpenGL ES 2.0 applications and provides access to the framebuffer data as an
input to your fragment shader.
These extensions are available on
all devices capable of running iOS 6. As always, check for the existence of an
extension before using it in your application.
Media
Player Framework
The MPVolumeView class now provides interfaces for customizing the
appearance of the volume view. You can use these interfaces to change the
images associated with the volume slider and routing button.
Image
IO Framework
The
Image IO framework (ImageIO.framework) includes support for accessing EXIF and
IPTC metadata properties for images. You can access this metadata using
functions associated with the CGImageSourceRef and CGImageDestinationRef opaque types.
iAd
Framework
The
iAd framework (iAd.framework) supports a new medium rectangle banner size for
ads on iPad devices. For information about the classes of the iAd framework,
see iAd Framework Reference.
Foundation
Framework
The Foundation framework
(Foundation.framework) includes the following enhancements:
The NSUUID class helps you create objects
that represent various types of UUIDs (Universally Unique Identifiers). For
example, you can create an NSUUID object with RFC 4122 version 4 random bytes,
or you can base it on an existing UUID string.
The NSURLRequest class lets you specify whether a request should be allowed
to happen over a cellular network.
The NSString class has new methods for converting a string to
uppercase, lowercase, or an initial capital case.
External
Accessory Framework
The External Accessory framework
(ExternalAccessory.framework) includes new interfaces for managing connections
to Bluetooth devices. Apps can now post an alert panel that lists the Bluetooth
devices available for pairing. Support is also provided for waking previously
paired accessories that do not automatically connect.
Event
Kit Framework
The Event Kit framework
(EventKit.framework) includes the following enhancements:
The framework supports the creation of reminders; see “Reminders.”
Calendar and reminder events can now vend an external
identifier that lets multiple devices refer to the same event on the server.
The server provides the actual identifier string, which is accessed using the calendarItemExternalIdentifier property of EKCalendarItem.
For apps linked against iOS 6 and
later, the system asks for the user’s permission before granting access to
calendar and reminder data.
Core
Video Framework
The
Core Video framework (CoreVideo.framework) adds support for two new pixel
formats. These formats provide efficient storage for one-channel and
two-channel images that interoperate with OpenGL ES. For information about the
functions of the Core Video framework, see Core Video Framework Reference.
Core
Media Framework
The
Core Media framework (CoreMedia.framework) adds the CMClockRef and
CMTimebaseRef types, which define fundamental media time service behaviors. For
information about the functions of the Core Media framework, see Core Media Framework Reference.
Core
Location Framework
The Core Location framework
(CoreLocation.framework) includes the following changes.
The CLLocationManager object now
pauses the delivery of location events when the user has not moved for an
extended period of time. This behavior saves power by allowing the framework to
turn off the GPS and other hardware. It is enabled by default but may be
disabled by changing the value in the pausesLocationUpdatesAutomatically property of the location manager
object.
You can refine location accuracy
based on usage by assigning an appropriate value to the activityType property
of CLLocationManager. This property currently lets you distinguish between driving
usage and fitness usage.
The framework supports improved
location accuracy while offline and driving.
Core
Bluetooth Framework
The Core Bluetooth framework
(CoreBluetooth.framework) supports interacting with Bluetooth devices in
peripheral mode. Previously, an iOS device could only interact in central mode
but it can advertise itself in peripheral mode and communicate with other iOS
devices.
Core
Audio
Core Audio family of frameworks
includes the following changes:
There is a new AUDeferredRenderer
audio unit that allows audio to be processed on a lower-priority thread using
relatively larger time slices.
The AudioQueueProcessingTap audio
unit allows you to intercept the data in an audio queue and process it.
AV
Foundation Framework
The AV Foundation framework
(AVFoundation.framework) includes the following enhancements:
The AVPlayer class adds support for syncing playback to an external
time source. A single player object can also play both HTTP Live Streams and
file-based assets (including both local files and files that are progressively
downloaded). And you can use multiple AVPlayerLayer objects to display the visual output of the same player
object.
The AVAssetResourceLoader class allows you to insert a
delegate object into the asset loading process and handle custom resource
requests. This class works with the AVURLAsset class.
The AVAudioSession class now exposes information about the current audio
route in use.
The AVAudioMixInputParameters class provides access to an
MTAudioProcessingTapRef data type, which can be used to access audio data
before it is played, read, or exported.
Use of an audio session delegate
to detect interruptions and changes is now deprecated in favor of a set of new
notifications.
The AVCaptureConnection class allows you to enable or
disable support for video stabilization on incoming video.
The AVMetadataFaceObject is a new class that reports the
face-detection data captured by an AVCaptureMetadataOutput object.
The AVTextStyleRule class is a new class for specifying style options for
subtitles, closed captions, and other text-related media assets.
The AVAudioPlayer class can play audio items from the user’s iPod library
using URLs obtained from the MPMediaLibrary class. You
can also set channel assignments using the channelAssignments property.
Accelerate
Framework
The Accelerate framework
(Accelerate.framework) includes new vector-scalar power functions, vDSP
functions, discrete cosine transform functions, SSE-related vector functions,
sine functions, and vImage functions.
Thank you for reading and support!
Good luck!
M.P.PRABAKAR
Technical team lead.
Mobile app development.