Xcode 11 Features

Filed Under: iOS

WWDC 2019 is over and we can’t wait to discuss what’s in store for the developers. Today, we’ll be discussing the new features available in Xcode 11.

Xcode 11 includes the support for Swift 5.1. Also, it includes SDKs for iOS 13, tvOS 13, watchOS 6, and macOS Catalina 10.15.

Xcode 11 Features

Some of the XCode 11 features are:

  • SwiftUI
  • Minimap
  • Rich Documentation
  • Swift Package Manager
  • Inline Diff
  • Transform iPad Apps to Mac
  • Debugging and Simulators

Let’s look into each of these one by one.

1. SwiftUI

SwiftUI is the big announcement this year. It’s a new framework introduced for easily creating layouts using swift code. Moreover, Xcode shows us a real app like interface viewer side by side while you edit the Swift file.
It requires a Declarative syntax which is easy to use Swift code. Adding animations and stuff is all very easy.

Xcode 11 Swiftui

Xcode 11 Swiftui

This is a major shift from the Storyboards and drag and drop setup. The only issue:

SwiftUI is available from iOS 13 and above. It is not backward compatible with the current old iOS versions.
Hence use it only if your app supports iOS 13 and above.

To use SwiftUI, select the toolbox from the project setup window as shown below:

Xcode Swiftui 2

Xcode Swiftui Setup

2. Minimap

Xcode has an awesome looking minimap of your code at the left. You can quickly go to a specific part of your code through it.

This feature was much needed and long awaited in Xcode since it was already available in many other editors like Atom etc.

Xcode 11 Minimap

Xcode 11 Minimap

3. Rich Documentation

The documentation looks better in Xcode 11. The MARK keyword followed by a hyphen has a much bolder text which is clearly visible in the minimap as well.

Here’s a sneak peek into it:

Xcode11 Rich Documentation

Xcode11 Rich Documentation

4. Swift Package Manager

Up until now, to add third-party libraries or dependencies, we had to use Cocoapods or Carthage.

Xcode 11 introduces its own built-in package manager. Just go to files – Swift Packages and add a dependency by searching the package through the list of GitHub repositories.

Xcode11 Swift Package Manager

Xcode11 Swift Package Manager

Once you’ve added the dependency it will be shown at the bottom of your project in the left sidebar.

5. Inline Diff

Xcode 11 provides an improved UI to show changes in each line of code based on version control as shown below:

Xcode11 Inline Diff

Xcode11 Inline Diff

Clicking the blue bar at the left shows us options to discard changes or view the diff. Certainly, the diff feature is handy.

6. Transform iPad Apps to Mac

With Xcode 11, it’s easy to port and run ipad apps on mac natively. You can do so by doing to the Project Navigator and selecting the relevant checkbox as shown below:

Xcode11 Ipadtomac

Xcode11 Ipadtomac

7. Debugging and Simulators

  • iOS Simulator speed has vastly improved in Xcode 11. They are now much faster thus removing the over-reliance of external devices for testing most of the stuff.
  • Starting XCode 11, you won’t have a simulator for every possible device but only for the commonly used devices. This saves a lot of disk space.
  • Metal framework code can now be run and tested on iOS 13 and tvOS 13 simulators. They’ll use the Mac’s GPU.
  • You can now debug your application under simulated environments like low battery, thermal warnings, slow network.
  • iOS 13 dark theme is a game changer. During debugging on iOS 13, we can switch between light and dark modes easily from our Xcode debugger.

That brings an end to this article on Xcode 11 features. If I have missed an important feature, please let me know through comments.

Comments

  1. Ranvish says:

    Very clear explanation…Thanks

  2. pallavi says:

    perfect points! Great help 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

close
Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages