UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

What's new in Xcode 11

SwiftUI, Project Catalyst, Swift Package Manager integration, and more

Paul Hudson       @twostraws

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.

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Swift 5.1 is here!

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!

SwiftUI opens a bold new era

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.

Source editing gets another massive boost

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:

  • Triple-slashed Markdown comments now have formatting right inside your code. This means bold and italic appear right in your source code, and also – controversially! – means that documentation comments appear in Helvetica by default.
  • The “Edit all Scope” feature is now aware of Markdown comments for functions, so if you rename a function parameter it now detects and updates the comments too.
  • There’s a mini-map! This is a popular IDE feature that shows you the whole of your code file in a small window so you can jump around faster. Hold down Option as you move over the mini-map to see a quick preview of where you’re at.

Obviously I’m doing nothing but working in Xcode right now, so as I see new things I’ll let you know here!

Swift Package Manager supports iOS

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!

The simulator is screamingly fast!

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.

BUILD THE ULTIMATE PORTFOLIO APP Most Swift tutorials help you solve one specific problem, but in my Ultimate Portfolio App series I show you how to get all the best practices into a single app: architecture, testing, performance, accessibility, localization, project organization, and so much more, all while building a SwiftUI app that works on iOS, macOS and watchOS.

Get it on Hacking with Swift+

Sponsor Hacking with Swift and reach the world's largest Swift community!

Buy Pro Swift Buy Pro SwiftUI Buy Swift Design Patterns Buy Testing Swift Buy Hacking with iOS Buy Swift Coding Challenges Buy Swift on Sundays Volume One Buy Server-Side Swift Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Advanced iOS Volume Three Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with macOS Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Beyond Code

Was this page useful? Let us know!

Average rating: 4.9/5

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.