Apple’s Xcode 16 adds AI-powered code completion

By Paul Krill

Apple has released a beta version of Xcode 16, an update to the integrated development environment (IDE) for Apple platforms that features AI-powered predictive code completion. Accommodations for the Swift language and the planned Swift 6 language release also are highlighted.

The Xcode 16 beta was made available June 10 on the Apple Developer website. Predictive code completion is powered by a machine learning model specifically trained for Swift and Apple SDKs, according to release notes.

For the Swift language, the build system coordinates with Clang and Swift compilers to discover and build module dependencies of project sources as a set of explicit tasks in the build log. Explicitly built modules improve debugger performance and let the build system make better scheduling decisions to maximize parallelism.

Also, a Swift 6 language mode opens existential values with “self-conforming” types (such as any Error or @objc protocols) passed to generic functions. The SWIFT_VERSION build setting now allows building with the Swift 6 language mode. Projects can migrate to Swift 6 by opting into features individually using new build settings under Swift Compiler – Upcoming Features.

The Xcode 16 beta includes SDKs for iOS 18, macOS Sequoia 15, iPadOS 18, tvOS 18, watchOS 11, and visionOS 2.

Other new features and improvements in Xcode 16:

© Info World