WWDC 2020 wishes
As I'm starting to write this piece I have to admit that the excitement levels are not even close to what they were in the previous edition. Last year was the most important WWDC since Swift's release, not only for SwiftUI, but also for Dark Mode and Catalyst.
Reflecting on it a year after I still feel the same: last year's WWDC was the start of a new era. I don't expect this year to be anything close to that, but still, there are some things that one always expects.
Last year we got SwiftUI, the declarative UI framework that I've been waiting for years. And it was much more that what I expected.
"SwiftUI 2" is a name that has been thrown around lately. I don't get why suddenly we have decided to add numbers to frameworks. Maybe people adds a number to indicate they really want a big change?
Of course I want improvements on SwiftUI, but I just want evolution not revolution. Some people complain about things that are just how the system should work. I understand that it's still early days and we need to adapt, but I want to give a big kudos to the Apple folks because the framework is very well done.
But of course there are things that need improving! The first of them, cleaning up some bugs. There are things that are just broken, specially around navigation. You can workaround with ugly alternatives but that's not ideal. I hope Apple has put effort on polishing this rough edges so we can enjoy this amazing framework without worrying about its problems.
In terms of API surface I hope they add some of the missing pieces that anybody coming from UIKit/AppKit would miss. It's true that they did an amazing work around interoperability with UIKit/AppKit. You can reach into those worlds and use any existing UI from there. But having to do this work should be reserved by edge cases, the basic building blocks that already exist should be available directly in SwiftUI.
The TextField is a good example. The new API is very nice and fits well in a declarative paradigm. But it's also missing quite a lot of functionality. I don't really mind about the look'n'feel, SwiftUI lets you customise things quite easily. But what we can't do is add functionality. For example, there is no way to focus programatically a textfield, we can't make something a first responder. And to be honest, I don't really want the complexity of the responder chain, we can leave that in the past. I just want a way to indicate via state that a text field should be focused.
UICollectionView like component is the other necessary thing. A lot of people argues that there is no reason for it, which I completely disagree with. It's true that you can roll your own grid layout, but a collection view is not just a gird layout. The magic of that class is that it handles all the reusing for you. Is the same reason why SwiftUI has a
List when you can do the same with a
ScrollView and a
ForEach. The former deals with reusing each item in the list, the latter is just scrollable content. And not only that, but last year's additions to
UICollectionView were too great, giving, finally, an answer to a common UI pattern in many Apps. Is probably the only reason why I look back at UIKit with envy eyes. We should have that facility in SwiftUI too, without having to roll your own.
As a side note, I was quite disappointed when I saw the
List view to be honest. In UIKit land
UITableView in everything. There is practically no reason for the later one to exist. Many of us were for the day they deprecate
UITableView and just move any functionality into an improved flow layout. So I'm quite sad they repeated the same mistake in a brand new UI framework.
We'll see what they have been cooking for a year ^^
Better integration with deep linking support is something I already wished for last year. I hope is something that Apple is actively working on. Nowadays is a crucial part of any medium complex application.
SwiftUI actually makes navigation way more simple than ever before (when it works without bugs of course). You don't really need any complex flow controllers/coordinators/whatever you call them.
The fact that your entire UI, including its navigation, is a pure function of simple objects makes it really easy. You just need to drive it from your state. It's hard to make it simpler than that.
That said, it would still be nice to have some reusable functionality to incorporate this fully into the OS with deep linking, user activity, etc. I'm open to be surprised.
Tooling is one of the aspects that I wish got better, much better. Swift it's part of that but I talk about Swift constantly so I don't want to repeat myself here. The future we're expecting with Swift 6 covers a lot of my desires so I prefer to focus on other things.
One interesting thing I'm waiting for is to see if Apple has something new around Swift being secretly developed. Recently there has been some, unfounded in my opinion, feelings about the Swift Core team accepting features just because Apple needs them internally, ignoring the community's feedback. That's a big topic that I don't want to get into, but I just want to see the discussion resolve.
One thing I do want to see Apple taking more seriously is open source tooling. Since the Swift project was open sourced a lot of tooling is being developed on the open. But because Xcode is still close source it's quite hard to notice. It also doesn't help that the IDE, the main tool we use, is released with such a long cadence. This all contributes to the feeling that we don't really see any of those improvements and we can't even try what's coming easily.
Toolchains help a bit with trying new Swift versions, but they have many issues with Xcode. Every time I want to work on a video about new Swift features I spend hours fighting Xcode and Playgrounds. That said it would be very nice it we could try pre-release version of other tools like SPM integration.
And of course, one can wish for Xcode being open sourced and having a decent plugin system. Let's keep hoping :)
Apart from that I just hope performance and bug-fixing is a priority for the tools team.
iCloud and Swift
As I said last year I really want to be able to run Swift functions on iCloud. Every year that passes this becomes a more obvious missing feature.
The improvements on the Swift project that are happening recently and that are planned for this year have a very positive impact on Swift on the server. We're seeing other companies offer ways of running Swift very easily so it's a shame that Apple hasn't done the same yet.
Apple should do something more to contribute to this space.
There are many things that I'm still hoping for, you can read more about them in older posts.
- SwiftCore, Scripting with Swift and the usage in Shortcuts.
- Custom watch faces
- Custom View Controller and Non-UI Extension Providers
- More control on App version updates
Having low expectations before a WWDC is nothing bad, quite the opposite. I'm gonna be pleasantly surprised with any new thing they announce, and that's exciting by itself :D
What are your feelings about WWDC'20? Are you waiting for something not mentioned here? Are you hyped? Tell me more!
If you liked this article please consider supporting me