What’s new in Xcode 13?

Oğuz Tandoğan
Orion Innovation techClub
5 min readSep 24, 2021

Xcode 13 has been introduced at WWDC21 with a tons of new features and improvements. Let’s dive deep into these new features:

Automatically Hidden File Extensions

Xcode 13 has an updated project navigator design that includes icons for different file types.

File Icons

Don’t get surprised if you can’t see the file extensions when you open Xcode 13. File extensions are automatically hidden in Xcode 13. Some people may find it much cleaner but it depends on developer’s own choice. Personally, i’ve found it hard to get used to. Of course, you can show them by changing the selection by show them. In order to change this; navigate to Xcode-> Preferences-> General and change the “File Extensions” option to “show all” as shown in the picture below.

File Extensions

Great Improvements on Auto-Completion

Autocompletion has been improved in key areas, such as filling in cases within switch statements, unwrapping optionals, and within for loops. I will try to show you each new improvements of auto completion one by one.

  • When you use function or create class inherited by class which included in particular library, swift will auto-import the library for you.
Library Auto Import
  • If you want to unwrap optionals, swift will auto complete the rest of the statement.
Auto Unwrap Optionals
  • Auto completion when accessing functions or variables inside some another class is something new. For example, if you want to access cornerCurve which is belongs to layer class, xcode will autocomplete “label.cornerCurve” to “label.layer.cornerCurve”. You don’t have to indicate the “layer”.
Auto Completion of Functions
  • When you write a switch statement, Xcode will automatically auto complete all the possible cases.
Auto Completion of Switch Statement
  • When you write a for loop, xcode will automatically auto complete the proper sequence. With mentioning the proper sequence, i mean the exact sequence. For example, let’s define two arrays; one is called “names” and the other one’s called “numbers”. If I want to write a for loop for “names”, it auto completes the statement for the exact array. AI does the magic here.
Auto Completion of For Loop

Column Breakpoints

This one is a great feature as well. Xcode 13 adds column breakpoints which work like a more granular version of line breakpoints. We can set a column breakpoint directly on the method. If we already know where the problem is, we can place a column breakpoint. We could ask Xcode to pause at exactly the point where the func second() is called like below:

Column Breakpoint

Vim Keybinding

Vim keybindings has been awaited with interest to be announced for quite some time. You can find the cheat sheet for vim on the internet easily.

I want to give an example about how does this actually work. According to the cheat sheet of vim keybindings; when you press “i” word on the keyboard, command line enters to “Insert mode” for inserting text.

If you’re new to Vim, open a terminal and run “vimtutor” to get you started with some initial commands before diving into the rest.

For enabling vim keybinding, you should navigate to Xcode-> Preferences-> Text Editing -> Editing then enable the Vim Bindings.

Regressions and Terminations

Two new features has been added to Xcode Organizer: Regressions and Terminations.

Let’s talk about regressions. The Xcode Organizer presents a list of smart insights whenever the system detects new performance regressions for the latest version of your app. Each item in the insights list contains information that provides a brief summary. You can use this information to see how your latest app version is performing with respect to the average of the previous versions. Unfortunately, i didn’t have any apps published; I can only show you how you can navigate to this section.

Regression

One other feature is “Terminations”. You can view Termination data using the Xcode Organizer or collect data in your app using MetricKit’s MXAppExitMetric.

You can see how frequently the system stops your app by addressing common termination reasons here.

The biggest feature in terminations is; now you can see the terminations immediately happened while testing Test Flight. Unfortunately, I can only show you how you can navigate to this section. If you want to learn more about these sections; you can check Apple Documentations.

Terminations

Documentation Tool: Apple DoCC

Xcode 13 brings a whole new system for creating documentation. You can produce API documentation and interactive tutorials for your Swift packages or frameworks. For further information, you can check this website: https://useyourloaf.com/blog/xcode-docc-getting-started/

--

--