NEW: Get your ticket for Hacking with Swift Live 2019! >>

What's new in Xcode 11

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.

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.

HACKING WITH SWIFT LIVE This July is a new two-day event where you'll be inspired by great speakers on day one then learn all the amazing new features from WWDC on day two – click here for more information and tickets.

 

MASTER SWIFT NOW
Buy Testing Swift Buy Practical iOS 12 Buy Pro Swift Buy Swift Design Patterns Buy Swift Coding Challenges Buy Server-Side Swift (Vapor Edition) Buy Server-Side Swift (Kitura Edition) Buy Hacking with macOS Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with Swift Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Beyond Code

About the author

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 Mario Kart world champion. OK, so that last part isn't true. If you're curious you can learn more here.

Was this page useful? Let me know!

Average rating: 4.6/5

Click here to visit the Hacking with Swift store >>