updated 07:15 pm EST, Mon January 10, 2011
Adds in-app performance measuring and analysis
The sixth developer preview of the upcoming Xcode 4 was posted to Apple's Mac and iOS developer support sites today,bringing a new command-line tool, called "iprofiler," for measuring app performance. The new version, which was last updated in November, also adds a new framework for in-app performance evaluation, and includes many enhancements and bug fixes from the previous version.
The new framework is known as DTPerformanceSession, and allows an application to create performance measurements of itself or other applications. It may not work with Multicore and Dispatch templates, and may require restarting the computer after installation to get the Time Profiler and System Trace to work correctly.
Enhancements in Xcode 4 DP 6 include a new "Autocreate schemes" option that is shared with all users of the workspace. The Autocreate option is not recommended for some kinds of large workspaces, as it may create too many schemes. There is also a new Autocreate Schemes Now button, and it now also recognizes SCP-based URLs for Git repositories in the repositories organizer.
Also added is the ability to add an Xcode archive file to the archives organizer by simply double-clicking in the Finder. Alert scripts can access the Xcode user environment variables, there's a new XcodeAlertAffectedPaths environment variable that replaces the IDEAlertAffectedURLs variable, and the value of the PWD environment variable now reflects the path to the directory that contains the current project or workspace.
Fixes in the new build include XCode no longer stripping newline characters from scripts, duplicating a scheme now works correctly without broken target references, and clicking Run on an active scheme that is also a unit-test scheme no longer produces an error dialog. In addition, XCode now creates a snapshot of your workspace before performing a refactoring transformation, the Rename transformation when editing nib files has been fixed, a bug involving using the commit dialog or the version editor on a branch in the repositories organizer has been squashed, and Xcode now honors the new build location when it is changed in the General preferences.
DP6 still has some known issues, including a bug where Interface Builder files with explicit Xcode 3 file types will open in the source editor instead of in Interface Builder. Apple's workaround is to set the file type of the IB file in the Indentity and Type inspector to "default," deselect it in the project navigator and then select it again. Another issue is that the task log viewer will show as empty if one selects the last build task of a project or workspace in the log navigator and the viewer is set to show only recent operations: Apple suggests setting the viewer to show all operations until this is fixed.
Xcode still cannot refactor Cocoa bindings, nor can it edit Mac OS X-type Interface Builder documents that are comprised of objects from frameworks other than AppKit. Preview 6 may also crash in the replace preview dialog of the search navigator when all the found instances are selected and a user clicks Replace.
XCode 4 Preview 6 is available to registered ADC members through Apple's Dev Center.