11 Biggest Takeaways for iOS Developers from WWDC 2017
June 5th was a big day for us, iOS and macOS developers. WWDC, which stands for Worldwide Developers Conference, is the biggest and most important conference organized by Apple. The annual event presents what they were working on through the last year. Let’s see what WWDC 2017 brought us and celebrate the key updates!
This year was dominated by the new version of iOS, an operating system for the whole family of mobile devices including iPhones, iPads and Watches. There was a number of novelties introduced, but I’m going to focus on 11 (just like iOS 11) things that I found most relevant for developers.
Firstly, it’s essential to mention that the whole backend has been rewritten using Swift!
1. Brand new refactoring mechanism
There were plenty of improvements in the way you can refactor your code each day, including:
- a global rename with a beautiful preview of changing data,
- converting method signatures between the Swift and Objective-C code,
- automatic fixing of missing cases in the “switch” statements,
- adding missing protocol conformance,
- extracting code into methods.
It’s worth mentioning that this mechanism will be open-sourced, so everyone will be able to write their own.
2. Debugging (over the network)
Everyone has experienced the problem of a broken device cable. I don’t need to tell you how annoying that is. Apple understands this problem and introduced wireless debugging! Every device requires connecting only once, just to enable wireless debugging on a given device.
To make a debugger even more useful, Apple added some features to the simulator. A bezel with hardware controls, edge swipe support, a fully resizable option and a multiple-booted device simulator. So, it’s true, Apple does listen to what people need ;).
3. Source control (Github integration)
Until now, Xcode has had basic source control support. Not bad in my opinion, but quite insufficient. Nowadays, the most popular workflow is the one using Github projects, pull requests, etc. Nice one, but somewhat limiting your productivity – application switching, merging, pulling changes a number of times a day. What if you had all those features within a single mouse click or even better, a keyboard shortcut?
4. Runtime sanitizers
Application debugging is not a piece of cake. Some problems are easy to be found, but once in awhile you come across a nightmare. Apple engineers understood this issue very well. Runtime sanitizers are tools which help you find errors that occur during the app runtime. The existing pack of Thread and Address sanitizers was extended by adding two new positions:
- Undefined behaviour, which helps tracing variable overflows, casting failures, dividing by zero, and so on.
- Main thread API checker, which prevents UI calls from background threads (don’t lie you always use main thread ( ͡° ͜ʖ ͡°))
5. Markdown editor
Writing good documentation is essential to keep a project maintainable through its whole lifecycle. To make things easier, Apple decided to add support in the IDE. It is a nice productivity booster. You don’t have to look for third-party tools. Even if you find any, you won’t have to switch applications each time you modify the existing documentation.
Have you ever seen those Pokemons on your phone camera? This is exactly what Augmented Reality (AR) is. The ability to create, track, and make correspondence between the real and virtual world. Not only it can be used for games, but for plenty of other scenarios.
Whenever you want to visualize your room, see how you could look with given glasses or just enrich the environment with some virtual objects – AR comes in handy. Apple realised how important and usable this technology can be, and that’s how the ARKit was brought to life. With this framework, you can start playing with AR without the need of deep understanding what’s beyond it.
7. Core ML
Machine learning is hiding everywhere, even if you are not aware of it. Self-driving cars… oh, wait. Something a little bit more average. How do all those shops know what you would like to buy? How does Facebook know if you’ll like a suggested fanpage? How do Google Photos know it is a car in the picture? It’s machine learning. And you can play with it on your own. On your own iDevice.
8. Drag and Drop
The latest iPads releases show that Apple is primarily focused on turning it into something resembling a desktop computer. Lightweight, powerful, big-enough screen with true colors can easily replace desktop computers or even laptops in everyday work. To make data sharing between apps easier, we were given this brand new functionality.
9. File providers
These have the same purpose as the drag’n’drop functionality. Desktop computers have used file providers for years. I can’t imagine my daily workflow without any file manager, so how can iPad even try to replace desktops? Now it’s possible. Each app can support this functionality, no rocket science needed. Just implement some of the required interfaces. That’s all.
Since Swift became a true citizen of iOS devices, Apple constantly improves it on each release, making developers’ work easier and more enjoyable. This time, engineers focused on standard libraries and working with strings. The most significant improvement, in my opinion, was removing the redundant `characters` property and making string range-replaceable, bi-directional collections. Instead of writing:
11. Codable protocol
These days, the most popular data representation for different kinds of APIs is JSON. Now you’re probably wondering what’s wrong with that. The problem is that every time you work with JSON data, you need to write your own parser or use third-party solutions. Annoying and error-prone. Apple’s made it simple. A codable protocol requires only conforming to that protocol and all the magic happens deep in the libraries.
For those who complained about the misleading meaning of fileprivate (and, in some ways, forcing to break the encapsulation because the property is seen through the whole file), we have good news. private modifier got an extended scope and is visible on the extensions. fileprivate is now truly private ;).
There were some more changes introduced by latest Swift release: multiline string literals, Unicode 9 grapheme breaking, class-constrained protocols, numeric protocols, and some dictionary improvements.
Over to You
These are the changes that drew my attention during WWDC 2017. I’ve dug deep into the videos and tweets to make this list, hope you liked it 🙂 What are your favourite updates in Apple’s developers’ tools? Were you happy with the outcome of this year’s conference? Feel free to leave a comment or share the post, thanks in advance!