Apple announced its new SwiftUI framework, a UI coding structure that lets developers create UIs with less Swift code using declarative syntax and the new graphical design tools Xcode 11.
“SwiftUI is built in Swift for Swift and it’s designed to help you build better apps with way less code,” said Craig Federighi, the senior vice president of software engineering at Apple. “SwiftUI truly transforms user interface creation by automating large portions of the process and providing real-time previews of how UI code looks and behaves in-app.”
Developers will be able to choose certain UI components and get real-time visual feedback on how the code works in the app. Xcode can recompile changes instantly and inserts them into a running version of a developer’s app. In addition, changes are visible and editable at all times, according to Apple
SwiftUI users can also automatically utilize features like dynamic type, dark mode, localization, and accessibility without the need for writing additional code. The SwiftUI API can create apps native to all of Apple’s major platforms.
“One development team for the first time can build a single app that can span all the way from iPhone to iPad to Mac,” Federighi said.
Apple also announced its latest technologies for creating augmented reality including ARKit 3, which let’s developers integrate people’s movement into apps and enables facial tracking for three faces; and RealityKit, which provides a variety of animation, camera effects, and audio features.
Developers can also integrate Apple’s hardware such as the Apple Pencil and software features such as Siri into their own apps.
Swift 5.1, the latest enhancement to Apple’s programming language adds Module Stability, which provides “a critical foundation for building binary compatible frameworks in Swift,” according to the company. New Metal Device families enable code sharing between multiple GPU types on all Apple platforms and iOS Simulator lets developers build Metal Apps for iOS and iPadOS.
The detailed list of Apple’s new developer features are available here.