WWDC 2018 wrapped up the second week of June, and here in Berlin, we partnered with CocoaHeads (Berlin’s most famous iOS developer meetup) to host a public viewing of the keynote event for iOS developers. This year was surprisingly almost rumor-free, keeping us on our toes and thrilled to learn what would come up this year.
Between the excitement over Siri shortcuts and the heated discussions about UIKit/AppKit, at GYG we really enjoyed the effort put into performance. We always think about how to improve the user experience in our app and Apple has neglected this topic for a while.
Let’s go over the different ways performance was improved:
{{Divider}}
It was long overdue for Apple to tackle UI performance, which has been slowly decreasing version after version, and it finally happened in iOS 12. They improved in the following ways:
They also gave tips on how to improve layout speed client-side, but there was nothing new. Basically:
My favorite surprise of the autolayout talks this year was the introduction of a new AutoLayout instrument that highlights performance issues within the layout engine. Thank you Apple! (Although is not yet available in the beta)
Related talks:
WWDC 2018 - Whats new in cocoa iOS (general overview on what’s new in iOS 12)
WWDC.Autoloayout talk (more specific autolayout talk about how to improve client-side)
{{Divider}}
One of the main pain points as an iOS developer using Swift is building times. This is usually one of the main reasons why we consider switching to React Native (hot reloading for ui tweaking is such a breeze in comparison!)
The good news is they worked hard on this with visible results and also explained in detail how we can improve client-side building times.
There is a new build system (which already existed as a non-default option for a while) that is now the default and is optimized for incremental builds. In Xcode 10 we can set builds to be parallelized on different cores.
In order to help speed up the process, we can then:
On a source level, there is also a lot we can do:
We were able to cut down two minutes on the build times just by setting these new settings on Xcode. I’m looking forward to optimizing the settings and the code itself for even better performance.
The not so good news is there wasn’t a talk on hot reloading and building times are still very far from React Native times. So, for now, the closest option for native iOS developers is to play around with playgrounds to tweak UI in a faster development process.
Related talks:
WWDC 2018 - Building faster in Xcode
{{Divider}}
There was a lot more on the topic of performance. Among the different topics, these were my highlights:
Related talks:
WWDC 2018 - What's new in testing
WWDC 2018 - Metal game performance optimization
WWDC 2018 - Measuring performance through logging
WWDC 2018 - Optimizing App assets
There is still a long way to go to reach the same developer speed as React Native for tweaking UI, and this was a big miss for Apple. More and more iOS developers are wondering whether to add the new technology to their codebases.
Xcode was also a big miss for me. As of beta 2, in terms of performance, the renaming engine still crashes on our codebase, and in terms of productivity features, it is still very behind compared to other IDEs (i.e. with formatting, refactoring, dependency managers).
I am, however, very pleased with Apple’s effort to speed things up both for app users and app developers. Being able to build faster will definitely speed up our developing cycle, and using new instruments and tools will help us maintain a high bar. The autolayout instrument could become especially useful for tricky table views.
In summary, I'm happy Apple took a deep dive this year into this topic, and I am looking forward to actually seeing it working in production and in our development cycle when the new operative systems and tools get released in the fall.