Xcode 11 includes a bunch of exciting new features. Today we have a look at the main features that will be useful in everyday life.
Xcode 11 finally brings support for Swift 5.1 - this means you can use all of the new features of the 5.1 update to Swift natively in Xcode. It also includes support for the development of applications for iOS 13, WatchOS 6 and macOS Catalina 10.15.
This is quite possibly the biggest addition to Xcode 11 as it may change the way developers make apps in the future. SwiftUI is a framework written purely in Swift which allows the easy creation of declarative user interfaces. User interfaces can now be created with a live preview side-by-side with the code and either of which can be changed and the other updates. Don’t like the colour of that button? Test a few new colours in the live preview and watch the code update along with it.
SwiftUI can be enabled when creating a new Xcode project. Here are some additional features of SwiftUI:
The Swift Package Manager is an easy way to manage third party libraries and dependencies. It is basically a native replacement to the beloved CocoaPods and Carthage. Swift packages can be accessed by going to the project and switching the tab to ‘Swift Packages’. Here, packages can be added and removed easily without having to create pod files and mess around in terminal - everything is accessed within Xcode which is definitely a bonus! The Swift Package Manager is a very advanced tool which can be used in a variety of different ways and I’m excited for the future.
There are a few new exciting additions to the Xcode editor this year.
CMD + ;
The Xcode simulator has always been quite slow and it has often been preferred to test demanding apps on a real device. However, in Xcode 11 and macOS Catalina, the simulator has been rewritten using the Metal framework which makes the simulator incredibly fast and much more efficient for testing apps.