Apple’s Xcode 9 beta previews blockbuster improvements
- 08 June, 2017 05:39
With Xcode 9, a forthcoming upgrade to Apple’s integrated development environment for building apps for MacOS, iOS, tvOS, and watchOS, Apple is introducing a new source editor, a new build system, and compatibility with the Swift 4 language. A beta version of Xcode 9 was made available earlier this week.
The latest version of Xcode brings a host of other improvements as well, in areas ranging from debugging, refactoring, and GPU support to a snappier find and replace capability. The new editor also offers faster scrolling for any-sized file and easier access to common tasks, Apple said. A new source control navigator is featured for viewing branches, tags, and remote repositories for a workspace.
For Swift, there is one compiler for versions 3 and 4 of the language. Targets from both versions can be compiled together in the same project. An improved migrator now supports migrating only select targets to Swift 4. Also featured is faster generic code and decreased code size.
A new build system being previewed in Xcode 9 was written in Swift. Apple said the build system is more reliable, catches many configuration issues, and improves build performance. But Apple added the caveat that build system performance does not factor in compilers, linkers, and other tools. The new build system currently is optional but will become the default system in a future version of Xcode.
Debugging improvements include the ability to wirelessly debug iOS and tvOS devices. New debuggers are included for Apple’s Metal graphics technology, and an undefined behavior sanitizer allows developers to find sources of program crashes, unexpected behaviors, and incompatibilities with future Xcode versions.
Xcode 9 also incorporates GPU support, offering GPU frame capture and overrides. “Experiment with the rendering state without modifying code by minimizing texture bandwidth, minimizing number of rendered pixels, disabling the blending stage, showing only the wireframe, and scaling the amount of tessellation,” the notes state.
Refactoring, meanwhile, is built into the editing experience and works across Swift and Objective-C. Developers can view all changes in one place. The fix-it capability automatically fills in missing cases in switch statements and mandatory methods for protocol conformance via a single click, the company said. Developers also can extract method functionality for supported languages. Xcode 9 features multiple concurrent simulators, allowing developers to run more tests in parallel.
In the testing realm, Xcode 9 supports parallel device testing and features new APIs for the XCTest unit test framework. For integration, an Xcode server is built into Xcode 9, with continuous integration bots able to be run on a Mac with no need for a MacOS server.
Finally, general improvements in Xcode 9 include an updated way to define text macros using a plist file. The indexing engine now includes a capability to index files as they are compiled, Apple said. The devices window, meanwhile, is split into separate panes for simulators and devices.