SwiftUI, Project Catalyst, Swift Package Manager integration, and more
Xcode 11 is another major step towards refreshing our veteran IDE piece by piece, this time including support for UIKit apps on macOS (previously known widely as “Marzipan”), easier creation of user interface code through SwiftUI, Swift Package Manager support for iOS targets, significantly improved iOS simulator performance, and some slick improved to the code editing experience – there’s a mini-map now!
In this article I’m going to walk you through what’s changed so you can see for yourself. Note that for the full experience you should be running macOS 10.15.
Only a few months after Swift 5.0 shipped, Swift 5.1 has landed another raft of improvements to the language.
I’ve detailed these changes extensively in my article what’s new in Swift 5.1, along with releasing lots of videos that highlight individual features:
I’m expecting Swift 5.1 to ship as final alongside the Xcode 11 GM, which based on previous years is going to arrive in September. Hopefully soon we’ll start to get guidance on when to expect Swift 5.2 – as well as what to expect in there – but although it’s only a number I hope we’ll see Swift major releases sync up with Xcode major releases next year!
I’ve lost track of how many rumors there were about a declarative UI framework in the making somewhere deep inside Apple, but now it’s landed and SwiftUI is available for everyone to work with.
While it’s not going to be suitable for everyone in its current incarnation, the writing is clearly on the wall: I expect we’ll see SwiftUI 2.0 next year with a huge range of improvements, and more in 2021 and beyond – this is the future of UI development on Apple platforms, so even if you aren’t able to switch to it right now you should at least try it out.
For more information on SwiftUI, see my article: SwiftUI lets us build declarative user interfaces in Swift
Note: If you want to see the SwiftUI preview window you need to install macOS 10.15.
Ever since Apple upgraded Xcode’s source editor a few years ago we’ve seen such a range of improvements to it – and this year is no different. I’m sure there are more things to discover, but the things I’m already enjoying are:
Obviously I’m doing nothing but working in Xcode right now, so as I see new things I’ll let you know here!
So many people have been asking for this for such a long time, but as of Xcode 11 Swift Package Manager (SPM) now supports iOS apps. It take a lot more exploration before we’re able to tell whether CocoaPods and Carthage still lead the way in terms of functionality, but from what I can see SPM has all the important bases covered.
Expect an article on this real soon now!
I can’t remember quite when it happened, but several years ago now the simulator stopped being able to run anything graphics-intensive with even a vaguely normal frame rate – SpriteKit and SceneKit were write offs, for example.
Well, in Xcode 11 that’s dead and buried: the simulator now seems to run orders of magnitude faster, which means the requirement for external devices is significantly lowered.
Note: This requires macOS Catalina and iOS 13 simulators.
LEARN SWIFTUI FOR FREE I have a massive, free SwiftUI video collection on YouTube teaching you how to build complete apps with SwiftUI – check it out!
Paul Hudson is the creator of Hacking with Swift, the most comprehensive series of Swift books in the world. He's also the editor of Swift Developer News, the maintainer of the Swift Knowledge Base, and a speaker at Swift events around the world. If you're curious you can learn more here.