📜 ⬆️ ⬇️

Apple announced preview Xcode 4

Apple announced the release of a preview version of the Xcode 4 development environment for developers with a subscription.
Below is a translation of information posted on the official page.

Xcode provides a complete set of tools for creating applications for Mac, iPhone and iPad. With the release of the new version of Xcode 4, the toolkit has been redesigned to become faster, easier to use and significantly more useful than ever before. Integrated Development Environment (IDE) Xcode understands every nuance of your project, identifying errors in both syntax and logic, and even fix your code for you! Simply put, Xcode 4 will help you write code better.

Xcode 4 has a completely new user interface based on proven technologies that Apple itself uses to build Mac OS X and iOS. More than a quarter of a million Mac apps, iPhones and iPads are based on these technologies.

Single window


Single window
')
The first thing experienced users will notice in Xcode 4 is that the many windows used to solve your daily developer work tasks have been combined into one single window. The Xcode 4 workspace contains several unique user interface elements that simplify work on many tasks (and even in several projects at the same time), without littering your workspace. Your editor always stays ahead and in the center.

Navigators

Navigators

On the left side is a set of navigators, including:

The unified navigator interface provides content filtering and search results on the fly, so you can concentrate on your current task.

Quick Jump Bar

Jump bar

At the top of each navigator window there is a path bar showing the relative position of the current file. Click on any position in the path to immediately go to any other file at the appropriate level. The quick transition panel is so efficient that you can select all your workspace for the source code using the panel to quickly navigate between project files.

Interface Builder - inside


Interface builder

Interface Builder has been fully integrated with IDE Xcode 4 - there is no longer a separate application.
When you select an interface file (.nib / .xib) in your project, the interface editor will open inside Xcode. When you open the Utility window, a full list of interface inspectors will be displayed, as well as a library of controls and user interface objects. To form the interface of your future application, drag a control from the library and release above the window.

Great idea: you can drag and drop connections right between the user interface elements and the source code. The new separate layout of Xcode 4 editor makes it easy to link your actions and outlets by simply dragging the connection onto the existing code — one gesture and you're done. Not yet a code ready to connect? Xcode will create a new slot or action for you. Just drag and drop onto the empty space and Xcode will generate code for you.

Drag and drop between code and interface

Assistant


Assistant

Whether you write code or design an interface, now there is no change in the scheme of work. Even the slightest revision can have a cascading effect on your entire project. Often you need to see more than just the current file. You may also need to see related documents.
With the new Xcode Assistant, the double-window arrangement of windows in the editor becomes much more functional. When you turn on Assistant, the development environment will anticipate what other files you may need to see in the process. Editing a new derived class? Assistant will show you the class code, it was inherited from. Writing a new implementation code? Assistant will automatically show the corresponding header file. When designing the interface, the Assistant will show the corresponding controller, incredibly simplifying the creation of connections to the code by dragging and dropping. When designing a data model, you will see classes that correspond to your models — and that’s all automatically.

LLVM 2.0 compiler


The LLVM compiler is a new generation open source compiler technology used in high-performance projects around the world and developed under the guidance of Apple engineers from the compiler team. With the LLVM 2.0 compiler, the full compiler stack — from the parser to the code optimizer — fully supports C, Objective-C, and C ++.
LLVM is a fast compiler. It compiles code 2 times faster than GCC, while creating applications that also run faster. This is because the compiler was designed from the very beginning as a set of highly optimized libraries, easily extensible, easily optimized and designed for the architecture of modern chips.
In Xcode 4, a compiler is more than a command line utility. LLVM is fully integrated into the IDE. Syntax highlighting, automatic code completion, and any other function driven by the indexed code are now handled by the LLVM parser. If the compiler knows about the symbol, then the IDE knows about it. C, C ++, and Objective-C are all clearly understood at the time of editing, just as if they were being assembled.

Fix it (fix it)


Fix it

Using the built-in LLVM engine, Xcode 4 can do more than just code completion and syntax highlighting. A new feature Fix-it warns you of errors while typing. Just as a word processor highlights spelling errors, Xcode 4 highlights typical coding errors without having to first press the Build button.
But why stop only on warnings?
Fixes
The IDE knows what you are doing is wrong because it understands your code. She understands him so well that she can even fix it for you. A single keystroke can correct the assignment for comparison or add a missing semicolon.
Fix-it is a great addition to text input to hard testing performed by the Build and Analyze function. The Xcode static analyzer will go through thousands of potential branches in search of places where the code will behave in unexpected ways. For example, errors such as memory allocation errors, case branches that are never executed, or incorrectly formed loops.
Together, the "Fix-it" and "Build and Analyze" functions will help you detect errors long before your users.

Version editor


Version editor

The new Xcode 4 version editor makes it easier to see two versions of your source code next to each other, directly in the editor. More importantly, the version editor is a new way of thinking about managing code, because The comparison window is also a temporary axis. Drag the slider in the middle and you go back in time on your project, comparing the two versions.
The version editor can also show a detailed log of past events and track down the culprit for previous versions of the project. Complex configuration management utilities commands are handled behind the scenes. It is even possible to manage multiple projects in one Xcode 4 workspace, having one project in Subversion, and another in Git, with automatic updates for both.

New debugger


Xcode 4 introduces LLDB, a new debugging engine provided by Apple to the LLVM.org project (open source). Like LLVM, the new LLDB engine is designed from the start to consume significantly less memory and be like a rocket when it comes to performance.
New LLDB debug engine is perfect for the new Xcode 4 debugging interface. When your application is running, the navigator shows the stack trace, which you can collapse and expand to view stack frames during the debugging process. As you progress, you can focus on debugging a separate thread (thread), and then click "continue" to follow a specific flow of execution. Multi-core debugging in Xcode 4 is now as simple as multi-core programming using blocks and the Grand Central Dispatch ( comment perev .: what is it? ).

Xcode 4 Tools


Instruments
All tools have a user interface that is fully compatible with the new features of Xcode 4. Using the new Xcode 4 launch schemes, it becomes easier than ever to create a test environment for running your application in Tools. This may include launching the Tools in “pending mode”, saving the off-screen data collection interface and saving system resources for launching and measuring your application.

New data collection tools are also available, including OpenGL ES for tracking iPhone graphics performance, a new memory allocation monitoring utility that can detect unexpected growth in memory consumption, Time Profiler on iOS for collecting samples with small overhead consumables and full System Tracing ( System Trace) for a deep understanding of how interaction takes place between all system processes.
Now Tools allow you to solve even more problems at lower cost than ever before.

PS For some of the pictures there are large versions on the original site.

Source: https://habr.com/ru/post/100235/


All Articles