Xcode 8 Brings Swift 3, Editor Plug-ins, and More

At WWDC 2016, Apple announced Xcode 8, the latest version of its IDE for iOS, macOS, tvOS, and watchOS. Now available in beta, Xcode 8 brings Swift 3, improved address and thread sanitizer, a new editor extension architecture, and more.

Swift 3 is the first major release of Swift that takes place after Apple open sourced it in December 2015. As InfoQ readily reported, Swift 3 is neither source, nor binary-compatible with previous versions of the language. To make the task of porting code written for Swift 2.x to version 3, Xcode 8 includes a Swift migration tool. As usual when using Xcode migration tool, you should ensure that your scheme includes all the targets that you want to convert and that your code compiles without errors with Xcode 7.3. Even if those preconditions are met, though, the migration can still fail. Swift’s blog lists a few workarounds that you may apply if that happens.

Xcode 8 also introduces new runtime sanitizers and a stricter static analyzer:

The new thread sanitizer aims to help find and understand data races and other concurrency bugs in Swift and Objective-C.

The address sanitizer now supports Swift code and can help catch problems related to the use of UnsafeMutablePointer, which is used in Swift to interact with C calls.

The static analyzer now supports an “aggressive” level of checking for nullability violations. This will check for violations in all calls, including both project and system headers, and is enabled by default for all new projects.

The new features introduced with Xcode runtime sanitizers and static analyzer can only be used with Swift 3.

On the UI front, Xcode now supports editor extensions, which aim to make it possible to customize Xcode’s editor. Xcode 8 also includes a new project template that can be used to create editor extensions. To prevent editor extensions from affecting Xcode stability, Xcode editor extensions run in a separate process.

Apple claims that Xcode 8 is radically faster than previous versions. In particular, Interface Builder has been reengineered, Apple says, for speed and control, and is now able to provide a live preview of how an app will appear on any Apple device.

InfoQ Weekly Newsletter

Join a community of over 250 K senior developers by signing up for our newsletter. If you are based in the EEA, please contact us so we can provide you with the protections afforded to you under EEA protection laws.

Is your profile up-to-date? Please take a moment to review and update.

Email Address

Note: If updating/changing your email, a validation request will be sent

Company name:

Keep current company name

Update Company name to:

Company role:

Keep current company role

Update company role to:

Company size:

Keep current company Size

Update company size to:

Country/Zone:

Keep current country/zone

Update country/zone to:

State/Province/Region:

Keep current state/province/region

Update state/province/region to:

Subscribe to our newsletter?

Subscribe to our architect newsletter?

Subscribe to our industry email notices?

By subscribing to this email, we may send you content based on your previous topic interests. See our privacy notice for details.

You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.

We notice you're using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.