New Add Frameworks Pane and Sheet and Relative to SDK Reference Style
The process of adding a framework, dynamic library, or static archive to a target has been simplified. In the Target’s Get Info window in the General tab, there is a new Frameworks and Libraries pane that lists all the frameworks and libraries that target links with. A button opens a sheet listing all the frameworks, dynamic libraries, and static archives available in the target’s SDK, as a flat list. You can select any of these, or use the Choose... button to pick an item using the standard Open... dialog. The Add Existing Frameworks contextual menu item in the Groups and Files tree also invokes this sheet.
Items added to the target are automatically referred to using a new reference form, Relative to Current SDK. Only the framework’s name will be stored in your project, and its full path will be constructed according to the SDK in use when the target is built. This makes it easier to use frameworks in projects that use multiple SDKs.
New Toolbar Items: Active SDK and Overview
You can now set the Active SDK from the Project menu or by adding the Active SDK tool to a window’s toolbar. This is similar to setting the Active Configuration or Active Architecture in that it affects the current project and target, and does not make changes to the project file; but it is different in that it can override the target’s SDK setting with another value.
For example, if you have a project configured for the 10.4u SDK and wish to see if it will compile successfully against the Leopard headers and libraries, you can simply set the Active SDK to Mac OS X 10.5 and build. The active target will be built with the Leopard SDK, allowing you to see what errors and warnings are produced, without having to change any build settings or alter the project file.
The Active SDK setting, like Active Target, Configuration, Executable, and Architecture, is stored in your user file in the.xcodeproj
wrapper file.
Because the combined width of the five Active toolbar items (Target, Configuration, Executable, Architecture, and SDK) is impractical, there is a new “combination” popup called Overview, which displays a synopsis of the current active items and allows you to set all of them from one popup. You can use the Overview popup to replace any or all of the others. The Overview popup will always show at least the Configuration and Executable, and will also show the Target, Architecture, or SDK only if those individual toolbar items are not present in the toolbar.
Cache Files Moved; New Empty Caches Menu Item
Xcode caches both Xcode data and project data for performance optimization. In Xcode 3.1 these caches have moved to a new location in /var/folders
to provide enhanced security. If you will be using Xcode 3.1 exclusively, you should reclaim the cache space used by previous versions of Xcode by deleting the previous caches at /Library/Caches/com.apple.Xcode
(they will be recreated if you open Xcode 3.0 or earlier).
Because Xcode caches can grow to be quite large, there is a new Empty Caches menu item in the Xcode menu that deletes all cached Precompiled Header files, the Xcode plug-in cache, and all other cached data. This may only take full effect after quitting Xcode. You can use this if you have built a large number of projects that you will not build again and need to free up the space taken by cached precompiled headers.
Xcode Source Editor
The Xcode source editor is now significantly faster when opening very large single-line, XML, or HTML files. Several performance improvements have been made in syntax coloring and code completion. Text Macro expansion had been broken in HTML files and has now been fixed. Several problems with text key bindings have been fixed.
Placeholders and Edit All in Scope
A new command, Edit ▶ Edit All in Scope, highlights the identifier containing the selection or insertion point and all other instances of that identifier in the current lexical scope. Candidate terms for this feature appear with a dotted underline when selected, and a popup arrow (much like a standard Leopard Data Detector popup arrow) appears allowing you to select Edit All in Scope. Editing any highlighted identifier will simultaneously edit all highlighted instances. This can be used to rename local variables or formal parameters in the current file (unlike a full Refactoring Rename, it does not affect other files).
When inserting placeholders with CodeSense code completion or text macros, argument placeholders and common identifiers are highlighted automatically. For argument placeholders, the placeholders are depicted as highlighted text, and Select Next Placeholder moves among them. Unedited placeholders will be entered into text surrounded by <# #>
delimiters as in prior versions of Xcode.
Documentation Viewer
A new button allows you to add a new documentation bookmark more quickly, and you can also drag an item from the Documentation Viewer directly into its bookmark list.
Navigation in the Documentation Viewer now tracks your scroll locations in each document, so going back takes you to a previous scroll location in the same page, not to the previous page.
Searching and Indexing
The performance of indexing and searching projects with large numbers of nib files has been improved significantly.
Source Code Management
Checking out a project from a Repository automatically configures it for SCM with that repository.
You can now check a directory out of a repository simply by dragging it to the desktop or a Finder window. Similarly, you can import a folder to a repository simply by dragging it from any folder proxy (even the Xcode Organizer) directly into a location in the Repository Browser.
You can now update or commit all changes to a Perforce repository on a project-wide basis.
Script Menu
You can now use the token %%%PBXSelectionLineNumber%%%
in user scripts; it evaluates to an integer representing the (1-based) line number of the line containing the insertion point or the beginning of the text selection.