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.0 Release Notes. For the complete list of new APIs added in iOS 6, see iOS 6.0 API Diffs.
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.
For information about how to provide directions from your app, or how to use the Maps app to display directions, see Location and Maps Programming Guide.
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.
For more information about the Social framework, see Social Framework Reference. For information about the
UIActivityViewController class, see UIKit Framework Reference.
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.
For more information about Pass Kit and for information how to add support for it into your apps, see Wallet Developer Guide.
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
GKChallengeclass to issue challenges from within your game.
GKGameCenterViewControllerclass 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
authenticateHandlerproperty to a block that performs all the authentication steps. Once set, Game Kit automatically authenticates the local player when necessary. However, Game Kit does not display the authentication interface directly. Instead, it lets your handler present the provided authentication view controller, giving you more control over exactly when the authentication user interface appears.
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.
GKMatchmakerclass 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.
GKPlayerclass now supports display names for players.
GKMatchclass 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
GKAchievementclass now allows multiple achievements to be submitted at the same time.
For more information about how to use Game Center in your app, see Game Center Programming Guide.
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.
For more information about the interfaces of the Event Kit framework, including the new interfaces for creating reminders, see EventKit Framework Reference.
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.
For more information about the classes of the Store Kit framework, see StoreKit Framework Reference.
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:
UICollectionViewControllerclass for managing the presentation of collection views in your app
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
For more information about using collection views to implement your user interface, see Collection View Programming Guide for iOS.
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.
For more information about how to add state preservation support to your app, see App Programming Guide for iOS.
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.
For more information about using auto layout, see Auto Layout Guide.
In addition to location data, the system now asks the user’s permission before allowing third-party apps to access certain user data, including:
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. For more information about the keys you need to add to your
Info.plist file, see Information Property List Key Reference. For more information about accessing specific kinds of data, see the respective framework reference.
Additional Framework Enhancements
In addition to the items discussed in the preceding sections, the following frameworks have additional enhancements. For a complete list of new interfaces, see iOS 6.0 API Diffs.
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.
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.
UIDeviceclass adds a vendor-specific identifier.
UIImageclass includes new initialization methods for specifying the scale factor of an image.
UITableViewclass includes the following changes:
Support for a new
UITableViewHeaderFooterViewclass implements the table’s headers and footers
A simplified model for creating and managing cells and other views.
Storyboards allow you to unwind segues and specify restoration identifiers.
UIWebViewclass provides a way to disable the incremental rendering of web content.
UIViewControllerclass 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
UINavigationBarand incorporate your custom navigation bar into your app’s navigation interfaces.
For information about the classes of the UIKit framework, see UIKit Framework Reference.
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_storageextension and allows a set of texture mipmaps to be copied from one texture to another.
The GL_EXT_map_buffer_range extension improves performance when you only need to modify a subset of a buffer object.
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_EXT_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
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.
For information about the classes of the Media Player framework, see Media Player Framework Reference.
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
CGImageDestinationRef opaque types.
For information about the classes of the Image IO framework, see Image I/O Reference Collection.
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.
The Foundation framework (
Foundation.framework) includes the following enhancements:
NSFileManagerclass includes the
ubiquityIdentityTokenmethod for determining the availability of iCloud, and the
NSUbiquityIdentityDidChangeNotificationnotification for responding to a user logging into or out of iCloud, or changing accounts.
NSUUIDclass helps you create objects that represent various types of UUIDs (Universally Unique Identifiers). For example, you can create an
NSUUIDobject with RFC 4122 version 4 random bytes, or you can base it on an existing UUID string.
NSURLRequestclass lets you specify whether a request should be allowed to happen over a cellular network.
NSStringclass has new methods for converting a string to uppercase, lowercase, or an initial capital case.
For information about the classes of the Foundation framework, see Foundation Framework Reference.
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.
For information about the classes of the External Accessory framework, see External Accessory Framework Reference.
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
For apps linked against iOS 6 and later, the system asks for the user’s permission before granting access to calendar and reminder data.
Apps can now cancel editing programmatically from an
For information about the classes of the Event Kit framework, see Calendar and Reminders Programming Guide.
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
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.
CLLocationManagerobject 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
pausesLocationUpdatesAutomaticallyproperty of the location manager object.
You can refine location accuracy based on usage by assigning an appropriate value to the
CLLocationManager. This property currently lets you distinguish between driving usage and fitness usage.
The framework supports improved location accuracy while offline and driving.
For information about the classes of the Core Location framework, see Core Location Framework Reference.
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.
For information about the classes of the Core Bluetooth framework, see Core Bluetooth Framework Reference.
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.
For information about the audio technologies available in iOS, see Multimedia Programming Guide. For information about the new audio units, see Audio Unit Component Services Reference.
AV Foundation Framework
The AV Foundation framework (
AVFoundation.framework) includes the following enhancements:
AVPlayerclass 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
AVPlayerLayerobjects to display the visual output of the same player object.
AVAudioSessionclass now exposes information about the current audio route in use.
AVAudioMixInputParametersclass provides access to an
MTAudioProcessingTapRefdata type, which can be used to access audio data before it is played, read, or exported.
AVAudioSessionclass includes the following enhancements:
Use of an audio session delegate to detect interruptions and changes is now deprecated in favor of a set of new notifications.
Audio sessions support a new audio category,
AVAudioSessionCategoryMultiRoute, that allows routing of audio to and from multiple audio hardware devices.
Audio sessions support a new mode,
AVAudioSessionModeMoviePlayback, that engages appropriate output signal processing for movie playback scenarios.
AVCaptureConnectionclass allows you to enable or disable support for video stabilization on incoming video.
AVCaptureMetadataOutputclass is a new class for intercepting metadata emitted by a capture connection object.
AVMetadataFaceObjectis a new class that reports the face-detection data captured by an
AVTextStyleRuleclass is a new class for specifying style options for subtitles, closed captions, and other text-related media assets.
AVAudioPlayerclass can play audio items from the user’s iPod library using URLs obtained from the
MPMediaLibraryclass. You can also set channel assignments using the
For information about the classes of the AV Foundation framework, see AV Foundation Framework Reference.
Ad Support Framework
The Ad Support framework (
AdSupport.framework) is a new framework that provides access to an identifier that apps can use for advertising purposes. This framework also provides a flag that indicates whether the user has opted out of ad tracking. Apps are required to read and honor the opt-out flag before trying to access the advertising identifier.
For more information about this framework, see Ad Support Framework Reference.
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.
For information about the functions of the Accelerate framework, see Accelerate Framework Reference.