What’s New in Xcode 9 – Highlights from WWDC 2017
Most of us iOS developers use Xcode for daily work. At WWDC 2017, Apple showed us the latest version of this tool – Xcode 9. I would like to briefly show you the best changes in new version of the IDE.
Finally! I’m not sure about you, but I was waiting for a long time for this! In the new version, we are finally able to refactor our code. What can we change? We can rename stuff, for example. Xcode is looking for the name to change in the whole project.
It can also add missing required protocol methods, stubs or missing overrides.
We are able to convert if/else and switch statements. It’s also possible to extract methods or local variables.
Another important piece of news is the inclusion of wireless debugging. It’s super easy and works exactly as it should. I remember Apple tried to implement this in the past but it was not working well and had been dropped in next update. We can use WiFi for debugging iOS and tvOS devices. It’s necessary to plug-in our device once, to enable network debugging, and then we are ready to go!
To enable it, just connect your device to your Mac and open the Devices section in Xcode.
Now you are able to use wirelessly connected devices the same way as a wire connection.
In the new version, we also can run the app on multiple simulators at the same time. We also can test syncing for multi-device workflows.
Main Thread Checker
A new feature called Main Thread Checker is able to verify if we are trying to call AppKit, UIKit or WebKit methods, which aren’t from the main thread.
It’s enabled by default.
We also have new templates available for projects. Xcode is able to generate an ARKit based app or Document Based App for us, for example. New templates are also available for Playgrounds.
Also, the editor has been completely rebuilt. It looks a bit different than in the past. We can easily use CMD + or – to increase or decrease font. Additionally, it has better highlighting or navigation in code, also supporting Markdown. Searching inside the project has also been improved and it now works much faster.
Xcode now supports Github accounts. We can browse repositories, clone them, push changes and manage branches.
Xcode Server built-in
There is no need for installing a macOS Server anymore. We are now able to run an Xcode Server on our Mac, directly from Xcode.
Bot’s right now can run parallel tests on devices and a simulator, changing the language and region for testing and sending email notifications.
Xcode 9 brings us new functions for testing. The new API for XCTests allows us to control and capture screenshots, using test attachments, target multiple apps in one UI tests and also specifying the language and region.
This is only a brief description of changes in the new version of Xcode. It definitely works faster and I can’t wait for a stable version. For sure, wireless debugging is going to be my favorite feature, especially as I can’t see any differences when it comes to speed.
I recommend you download and install it to see it for yourself (of course, remember this version is still in beta, so make sure you don’t update your stable version).