Professional Documents
Culture Documents
“Major Features” describes overarching changes that span multiple technology areas or are
otherwise of particular importance.
“Framework-Level Features” describes changes to system frameworks.
“BSD And Kernel Features” describes changes to the UNIX/POSIX portions of Mac OS X and to the
Mac OS X kernel, device drivers, and kernel extensions.
“Application Features” describes changes in the behavior of included applications such as Safari.
“Mac OS X Server” describes changes to Mac OS X Server.
Please file any bug reports about this seed or this documentation using
http://bugreport.apple.com/.
Major Features
The following sections highlight features that span multiple technology areas or that are otherwise of
particular importance in Mac OS X v10.7.
Application Persistence
In Mac OS X v10.7, after a restart, the system automatically relaunches applications that were open
when the user chose Log Out or Shut Down.
In addition, the system automatically restores the state of applications that are relaunched after a
restart. That is, windows that are open when an application terminates are reopened with the same
size and location as before, their contents are scrolled to the same position, and their selections
restored.
When an application goes unused or has no open windows, Mac OS X may terminate it behind the
scenes. When the user wants to use the application again, it usually relaunches instantly. Users who
want to quit applications manually can still do so, but it is no longer necessary.
For more information, see Mac OS X Application Programming Guide.
With automatic saving enabled, the system automatically writes document data to disk as necessary
so that data displayed in a document window is, in effect, always the same as the document data on
disk. A file coordination mechanism maintains sequential access to files. (See “Mac OS X File
Coordination.”)
Applications that support automatic saving also support document version history browsing. To
http://developer.apple.com/library/prerelease/mac/#releasenotes/M…SX/Articles/MacOSX10_7.html%23//apple_ref/doc/uid/TP40010355-SW5 Page 1 of 12
What's New In Mac OS X: Mac OS X v10.7 Lion 2/25/11 12:16 PM
browse previous versions of a document, choose Browse All Versions from the pull-down menu at
the right end of the menu bar.
For more information, see Application Kit Framework Reference .
Overlay Scrollbars
Mac OS X v10.7 introduces overlay scrollbars similar to those in iOS. Unless the user overrides
scrollbar appearance using System Preferences, the following behavior occurs:
If all of the user’s pointing devices support both horizontal and vertical touch scrolling, the
scrollbars are hidden during normal use. They appear as an overlay on top of the window’s
content while the user is scrolling, and remain visible briefly to allow scrollbar dragging.
If the user has at least one external pointing device that does not support scrolling, the scrollbar
is displayed at all times and the usable space in the window is reduced, as in previous versions of
Mac OS X. (These permanent scrollbars are referred to as legacy scrollbars.)
If the user has no external pointing devices attached, the trackpad settings control the scrollbar
behavior; if the user has disabled scrolling for the trackpad in System Preferences, legacy
scrollbars are used.
Compatibility Note: There are three situations in which legacy scrollbars are used regardless of
hardware or preferences:
An NSScrollView with accessory views inside its scroll track
Any subclass of NSScroller that does not declare itself to be overlay-scroller-compatible
Any NSScroller that is not managed by an NSScrollView
http://developer.apple.com/library/prerelease/mac/#releasenotes/M…SX/Articles/MacOSX10_7.html%23//apple_ref/doc/uid/TP40010355-SW5 Page 2 of 12
What's New In Mac OS X: Mac OS X v10.7 Lion 2/25/11 12:16 PM
In addition, the scrollbars no longer contain scroll arrows (in overlay mode or in legacy mode).
Because these changes may affect your application layout, you should test your applications with
both standard and scrolling pointing devices.
Popovers
In Mac OS X v10.7, Application Kit provides support for popovers. A popover is a unit of content that
is positioned relative to some other content on the screen. You use an anchor to express the relation
between these two units of content.
Each popover has an appearance that specifies its visual characteristics, as well as a behavior that
determines which user interactions cause the popover to close.
AppKit automatically positions each popover relative to its positioning view and moves the popover
whenever its positioning view moves. For additional granularity, you can specify a positioning
rectangle within the positioning view.
If you implement the appropriate delegate method, your application’s popovers can be detached to
become a separate window by dragging them.
For more information, see Application Kit Framework Reference .
Privilege separation is another common technique for improving security. Privilege separation means
breaking up a complex application, tool, or daemon into pieces that individually require fewer rights.
Modern applications are becoming progressively more dependent on networking. Users view
webpages from untrusted sources, download documents from untrusted sources, and obtain
information via network connections to untrusted sources. The growing reliance on untrusted data
represents an ever-growing attack vector for viruses and other malware.
With traditional applications, if the application becomes compromised through a buffer overflow or
other security hole, its attacker also gains the ability to do anything that the user can do. There are
two common solutions to this problem: sandboxing and privilege separation. These can be used
independently or together to improve security.
For example, if the text editor mentioned above needs to update its help files, it might include a
helper that has the right to download help files from the Internet, but only the right to write files
inside the application’s container.
Because of the reduced privileges of the helper and the main application, any flaws in either part of
the application that might otherwise be exploitable are ultimately of limited utility to the attacker
http://developer.apple.com/library/prerelease/mac/#releasenotes/M…SX/Articles/MacOSX10_7.html%23//apple_ref/doc/uid/TP40010355-SW5 Page 3 of 12
What's New In Mac OS X: Mac OS X v10.7 Lion 2/25/11 12:16 PM
because neither part of the application runs with the complete privileges and capabilities of the user.
For more information about sandboxing and privilege separation, read Mac OS X Application
Programming Guide. Then read Daemons and Services Programming Guide.
Framework-Level Features
The following sections highlight changes to frameworks and technologies in Mac OS X v10.7.
AV Foundation
The AV Foundation framework, previously available in iOS, is now also part of Mac OS X. You use the
AV Foundation framework to play and create time-based audiovisual media. It provides an
Objective-C interface you use to work on a detailed level with time-based audiovisual data. For
example, you can use it to examine, create, edit, or reencode media files. You can also get input
streams from devices and manipulate video during realtime capture and playback.
For more information, read AV Foundation Programming Guide and AV Foundation Framework
Reference for Mac OS X .
Cocoa Autolayout
Mac OS X v10.7 introduces a new layout system to Cocoa, reworking the springs and struts model.
Instead of using autosizing masks, you define layout constraints that express your intent, such as
“these views line up head to tail,” or “this plus/minus button segmented control should move with
this split view subview.”
Localization by just swapping strings, not adjusting layout in the majority of cases.
Mirroring of UI for right-to-left languages, such as Arabic and Hebrew.
Simpler expression of existing concepts in UIs.
Better layering of responsibility between view and controller layers.
Pixel-perfect layout at all scale factors with resolution independence.
Future updates of Interface Builder may add built-in support for Autolayout.
Core Data
Mac OS X v10.7 adds support for ordered relationships. It also introduces an incremental store. This
incremental store suport allows you in principle to write a Core Data store for a relational database
such as MySQL.
Both of these features have been frequently requested over the years.
For more information, see Core Data Framework Reference .
Font Collections
Mac OS X v10.7 now provides the NSFontCollection API. NSFontCollection is an Objective-C
interface to all of the functionality in the CTFontCollection API (described in CTFontCollection
http://developer.apple.com/library/prerelease/mac/#releasenotes/M…SX/Articles/MacOSX10_7.html%23//apple_ref/doc/uid/TP40010355-SW5 Page 4 of 12
What's New In Mac OS X: Mac OS X v10.7 Lion 2/25/11 12:16 PM
Reference ), plus a few higher-level features to support font UIs. It is toll-free bridged to
CTFontCollection.
JSON Serialization
In Mac OS X 10.7, the Foundation framework adds a new class, NSJSONSerialization, to support
conversion of JSON data (http://www.json.org/) into Foundation types and vice versa.
For more information, see the NSJSONSerialization.h header file and Foundation Framework
Reference .
Linguistic Tagging
Mac OS X v10.7 introduces a linguistic tagging class, NSLinguisticTagger, that lets you break
down a sentence into its grammatical components, allowing the determination of nouns, verbs,
adverbs, and so on. This tagging works fully for English. The API provides a method to find out what
capabilities are currently available in other languages as well.
OpenGL 3.2
Mac OS X v10.7 now provides OpenGL 3.2 on hardware capable of supporting its feature set. Read
OpenGL Programming Guide for Mac OS X to learn about selecting the OpenGL 3.2 Core profile.
http://developer.apple.com/library/prerelease/mac/#releasenotes/M…SX/Articles/MacOSX10_7.html%23//apple_ref/doc/uid/TP40010355-SW5 Page 5 of 12
What's New In Mac OS X: Mac OS X v10.7 Lion 2/25/11 12:16 PM
Mac OS X v10.7 now provides support for ordered sets. An NSOrderedSet object contains each
element at most once, and the elements can be accessed by a compact integer index space,
numbered 0 .. (N-1). It thus combines two of the most salient features of the NSSet and NSArray
classes.
The NSOrderedSet class similarly borrows a lot from both NSArray and NSSet (and the mutable
subclasses of each), but it is closer to an NSArray than to an NSSet.
QTKit
In Mac OS X v10.7, the QTKit framework now provides export facilities to make it easier to export
movies in different formats. It also provides APIs for reading movie and track metadata.
QTKit export support. QTKit adds two new export-related classes: QTExportOptions and
QTExportSession. The overall intention is to provide a simple export facility to QTKit developers—
one that takes advantage of the performance and quality improvements in export using the Core
Media Authoring framework (as opposed to the old QuickTime component based export).
The QTExportOptions class is used to configure the desired output format and is intended to be
similar the existing QTCompressionOptions class.
The QTExportSession class provides a mechanism for transcoding QTMovie objects into the
formats that QuickTime Player currently exports. It provides ways to specify the source QTMovie and
a URL for the destination file. The class also provides for a delegate that can collect progress and
error information for the client.
QTKit metadata support. QTKit also adds the ability to read movie and track metadata (that is,
snippets of info such as the author, title, and copyright information) without having to use the
QuickTime C API (which is not available in 64-bit applications). This functionality involves new public
methods in the QTMovie and QTTrack classes.
For more information about QTKit, see QTKit Application Programming Guide.
Quick Look also now provides a public API for the Quick Look Preview panel, allowing the developer
to display the panel.
For more information see Quick Look Programming Guide.
Regular Expressions
Mac OS X v10.7 adds a Unicode-compatible regular expression class, NSRegularExpression, along
with related data detectors. This class is used to represent and apply regular expressions to Unicode
strings. An instance of this class is an immutable representation of a compiled regular expression
pattern and various option flags. The pattern syntax currently supported is that specified by
International Components for Unicode (ICU).
The fundamental matching method for NSRegularExpression is a block iterator method that allows
clients to supply a block object which will be invoked each time the regular expression matches a
portion of the target string. There are additional convenience methods for returning all the matches
as an array, the total number of matches, the first match, and the range of the first match.
http://developer.apple.com/library/prerelease/mac/#releasenotes/M…SX/Articles/MacOSX10_7.html%23//apple_ref/doc/uid/TP40010355-SW5 Page 6 of 12
What's New In Mac OS X: Mac OS X v10.7 Lion 2/25/11 12:16 PM
Scrolling Behavior
The scroll views in Mac OS X v10.7 allow developers additional control over scrolling behavior with
respect to the Magic Mouse device and trackpads. Specifically, new methods allow the developer to
control the stretching behavior of NSScrollView objects (auto or on/off in horizontal and vertical
axes) and provide content hints to prevent unintentional scrolling drifts.
Additionally, new NSEvent events have been added to support mouse momentum in scroll views.
For more information, see Application Kit Framework Reference .
Text Autocorrection
Mac OS X v10.7 provides expanded UI for text autocorrection, similar to the functionality in iOS, with
the opportunity for the user to accept or reject a proposed correction. As in iOS, the spell checker
learns from the user’s responses, such as whether a correction was explicitly rejected, implicitly
accepted, accepted at first and then revised, and so on.
Window Support
Safari, Xcode, and other applications support an in-window find. In Mac OS X v10.7, this
functionality has been extended to allow it to be used in views other than NSTextView.
In addition, user-editable window titles allow the developer to programmatically begin editing the
window title, typically in response to a user interaction.
http://developer.apple.com/library/prerelease/mac/#releasenotes/M…SX/Articles/MacOSX10_7.html%23//apple_ref/doc/uid/TP40010355-SW5 Page 7 of 12
What's New In Mac OS X: Mac OS X v10.7 Lion 2/25/11 12:16 PM
/Library/Caches
/Library/Fonts
/Library/Java
/Library/QuickTimeStreaming
/Library/Receipts
/Library/Tomcat
The subdirectories listed above have the same permissions as in previous versions of Mac OS X
(usually mode 775, sometimes with the sticky bit set).
Permissions for /Network/Applications and /Network/Library are now mode 555 (unwritable
even by root) instead of mode 755 (writable only by root).
Permissions for /var/log/DiagnosticMessages are slightly more lax, with mode 770 (writable
by the admin group, unreadable by non-admin users) instead of mode 750 (writable only by root,
unreadable by non-admin users).
Disk Encryption
In Mac OS X v10.7, Core Storage provides built-in support for encrypted root volumes. When you
enable encryption, the system’s root volume is encrypted in the background, and you can continue
to use the system normally. Once encryption is enabled, on reboot or wake from sleep, you must log
in before you can access any data on the drive.
Although this feature has limited developer impact (there is no public API for Core Storage), there are
http://developer.apple.com/library/prerelease/mac/#releasenotes/M…SX/Articles/MacOSX10_7.html%23//apple_ref/doc/uid/TP40010355-SW5 Page 8 of 12
What's New In Mac OS X: Mac OS X v10.7 Lion 2/25/11 12:16 PM
Assumptions that “boot = root” are much more likely to be wrong. (You should be allowing Mac
OS X to handle KEXT caches, so in general, this change should not cause problems.)
The Mac OS X UI may disallow enabling encryption if you have a particularly exotic driver stack.
For example, if it is not possible to map a volume-relative block number to a physical block
number.
In general, if your driver worked correctly with AppleRAID in previous versions of Mac OS X, it should
also work correctly with Core Storage.
To use this feature, you add a simple property list file to the /Library/LaunchAgents folder. The
property list has the standard structure of a launchd property list file (see launchd.plist), with one
additional item: an I/O Kit matching dictionary.
The I/O Kit matching dictionary contains a separate dictionary for each distinct device that you want
associated with your application. Each of these device dictionaries should provide the product
number, vendor number, and provider class for its device.
The I/O Kit matching plug-in watches for IOService objects that match any of the device
dictionaries you provide and launches your application when at least one is detected. If your
application terminates when there is at least one matching IOService object, the I/O Kit matching
http://developer.apple.com/library/prerelease/mac/#releasenotes/M…SX/Articles/MacOSX10_7.html%23//apple_ref/doc/uid/TP40010355-SW5 Page 9 of 12
What's New In Mac OS X: Mac OS X v10.7 Lion 2/25/11 12:16 PM
Application Features
The following sections highlight changes to the behavior of built-in applications such as the Finder
and Safari.
Safari
Note: Some WebKit plug-ins can also be replaced by Safari Extensions. To learn about Safari
Extensions, read Safari Extensions Development Guide in the Safari Reference Library.
The Finder
In Mac OS X v10.7, the following files and folders are now hidden:
/lost+found
$HOME/Library
http://developer.apple.com/library/prerelease/mac/#releasenotes/…SX/Articles/MacOSX10_7.html%23//apple_ref/doc/uid/TP40010355-SW5 Page 10 of 12
What's New In Mac OS X: Mac OS X v10.7 Lion 2/25/11 12:16 PM
Mac OS X Server
The following sections highlight changes to Mac OS X Server.
Profile Management
Mac OS X now supports configuration profiles similar to those on iOS-based devices. As part of this
functionality, Mac OS X Server provides a full mobile-device-management (MDM) server. This
configuration service provides the ability to administer both Mac OS X clients and iOS clients.
To enable the MDM server, launch Server Center and enable the Device Config service. Then manage
devices using the device-configuration web interface. There is no need to use the iPhone
Configuration Utility when working with this service.
Although iOS configuration profiles are mostly compatible with Mac OS X clients, there are some
minor differences. Specifically, Exchange accounts behave differently because iOS uses ActiveSync
whereas Mac OS X uses Exchange Web Services. Also, the following features are not currently
supported in Mac OS X:
Certain advanced network settings such as GPRS
Passcode policies
Calendar subscriptions (iCal)
The Clear Passcode command
Find My Mac
As with iOS mobile device management, all managed computers must be able to reach the Apple
Push Notification servers in order to receive push notifications.
© 2005, 2011 Apple Inc. All Rights Reserved. (Last updated: 2011-02-21)
Did this document help you? Yes It's good, but... Not helpful...
http://developer.apple.com/library/prerelease/mac/#releasenotes/…SX/Articles/MacOSX10_7.html%23//apple_ref/doc/uid/TP40010355-SW5 Page 11 of 12
What's New In Mac OS X: Mac OS X v10.7 Lion 2/25/11 12:16 PM
Shop the Apple Online Store (1-800-MY-APPLE), visit an Apple Retail Store, or Mailing Lists RSS Feeds
find a reseller.
Copyright © 2010 Apple Inc. All rights reserved. Terms of Use Privacy Policy
http://developer.apple.com/library/prerelease/mac/#releasenotes/…SX/Articles/MacOSX10_7.html%23//apple_ref/doc/uid/TP40010355-SW5 Page 12 of 12