Pages

Friday, March 11, 2011

Xcode 4 is now available

Yesterday Xcode 4 was made available to developers. It is a significantly better Xcode with lots of new features and enhancements. I was able to open my Xcode projects, build and run them without any problems. You cannot install the release version on Lion, but there is a Lion release that you can use to build Lion apps.
Xcode now works like most other IDE's where there is a workspace and an integrated Designer tool. Yes, now Interface Builder can run inside of Xcode and the single window model works really well.

Some Notable Changes

  • Single Window model
  • Built-in Interface Builder
  • LLVM Compiler
  • Faster Debugger
  • Version Editor and Management
  • Improved Instruments.
The most significant change is the Single window model UI which consolidates many windows that are used for key development tasks. The new Xcode 4 work area called a workspace has several UI elements that make it easy to work on many different tasks while keeping your editor front and center. The new workspace window contains a Toolbar, a Tab bar, a Navigator area, a Utility area and a Debug area. You can have as many workspaces as you want (File>New>New Window creates a new workspace window). The workspace Navigator provides tools for viewing and managing your project. The Utility area is for inspectors and properties of selected artifacts. The UI changes combined with the improved compiler and faster debugging make it so much easier to develop software faster and more efficiently. There are many changes and the only way to understand them is to use them.
Editing code
The Editor area is where developers spend the most time and it is always visible within the workspace window.
You can also configure the editor area for a given task by using the editor selector buttons in the workspace toolbar:
  • Standard: fills a single editor pane with the contents of the selected file.
  • Assistant: presents a separate editor pane with content logically related to that in the standard editor pane. Use the split controls in the Assistant pane to split the pane. Use View > Assistant Layout to set your preferred assistant pane and split configuration.
  • Version: shows the differences between the selected file in one pane and another version of that same file in a second pane.
Each pane includes a jump bar—an interactive, hierarchical mechanism for navigating directly to items at any level in your workspace. The configuration and behavior of each jump bar is customized for the context in which it appears. The darker jump bar indicates that the standard editor pane is the active pane.
  • Source editor: Write and edit source code, set and enable or disable breakpoints, and control program execution.
  • Project editor: View and edit project and target settings, such as build options, target architectures, and code signing characteristics.
  • Property list editor: View and edit various types of property lists, or plists—small, highly structured files whose data is organized into hierarchies of specific types of objects.
  • Rich text editor: Open, write, and edit rich text (.rtf) files, much as you would with TextEdit.
  • Core Data model editor: Implement or modify a Core Data model.
  • Mapping model editor: Graphically create and edit a mapping between an old Core Data store and a new one.
  • Interface Builder: Graphically create and edit user interface files.
  • Script editor: Create and edit AppleScript script files.
  • Scripting dictionary editor: Create and edit the scripting definition (.sdef) file for your application.
Navigators
The Navigator area on the left side of the workspace contains different Navigators for managing different facets of your project.
Use the navigator selector bar to choose the navigator best suited to your current task:
  • Project navigator : Add, delete, group, and otherwise manage files in your project or choose a file to view or edit its contents in the editor area.
  • Symbol navigator : Browse all the symbols in your project or just those within a scope that you specify.
  • Search navigator : Use find options and filters to quickly find any string within your projects and frameworks.
  • Issue navigator : Display issues such as diagnostics, warnings, and errors found when opening, analyzing, and building your project.
  • Debug navigator : Examine the running threads and associated stack information at a specified point or time during program execution.
  • Breakpoint navigator : Fine-tune breakpoints by specifying characteristics such as a triggering condition, an ignore count, and an action to be performed.
  • Log navigator : View the history of your build, run, debug, and source control tasks and inspect details of the results


Utility Area
In the Utility area you can view and access Quick Help and other inspectors
Use the inspector selector bar to choose the inspector best suited to your current task. Two inspectors are always visible in the selector bar:
  • File inspector : View and manage metadata for a file, such as its name, type, path, location within your project, and so forth.
  • Quick Help : View details about a symbol, including a concise description, where and how it is declared, its scope, the parameters it takes, and its platform and architecture availability.
Additional inspectors are available in some editors; for example, Interface Builder offers these:
  • Identity inspector : View and manage metadata for an object, such as its class name, accessibility information, runtime attributes, label, and so forth.
  • Attributes inspector : Configure attributes of the selected interface object. The attributes available are specific to the selected object. For example, some text field attributes include text alignment and color, border type, and editability.
  • Size inspector : Specify characteristics such as the initial size and position, minimum and maximum sizes, and autosizing rules for an interface object.
  • Connections inspector : View the outlets and actions for an interface object, make new connections, and break existing connections.
  • Bindings inspector : Create, view, and configure bindings for view objects.
  • Effects inspector : Specify settings for animation, alpha channel, transitions, and other visual characteristics of a selected object.
Use the library pane to access libraries of resources that are ready to use in your project:
  • File templates : templates for common types of files and code constructs. To use a template, drag it from the library to the project navigator.
  • Code snippets : short pieces of source code for use in your software. To use one, drag it directly into your source code file.
  • Objects : interface objects. To use one, drag it directly into your nib file in the Interface Builder editor window.
  • Media files : graphics, icons, and sound files. To use one, drag it directly to your nib file in the Interface Builder editor window.


The Organizer

Use the Organizer window to perform ancillary development tasks such as using documentation and managing devices, archives, and project-related metadata.
To display the Organizer window, click the Organizer button in the workspace window toolbar or choose Window > Organizer. The window includes five individual organizers:
  • Devices organizer: provision a device, manage your developer profile, install iOS on the device, and work with your application and its data. This organizer is present only if the iOS SDK is installed.
  • Repositories organizer: create, view, and manage Git and Subversion repositories for your workspace in a single consistent interface.
  • Projects organizer: find, view, and manage an open project or workspace, its derived data, and its snapshots.
  • Archives organizer: view and manage build product archives resulting from your distribution scheme.
  • Documentation organizer: find documentation and sample code and use them within Xcode.
Each of these organizers includes task-oriented contextual help articles that you can view by choosing the organizer and Control-clicking in its content pane.
You can have only one organizer window; you use its organizers to manage all the development resources (projects, workspaces, repositories, and so forth) on your local system.

See also a great initial review of Xcode 4.



No comments:

Post a Comment

Popular Posts