WWDC ’21 is finally here and it brought a lot of new toys to play with. In the upcoming weeks I will be writing new articles and will update the Companion for SwiftUI app to include all the new SwiftUI features introduced this year. In anticipation, a week ago I released a beta version of the Companion app that introduced a lot of UI enhancements. The main purpose was to facilitate faster API exploration (read more here).
With the task ahead, the question is, how much work is there? A brief review of the SwiftUI declaration file reveals the following (approximate) numbers:
Number of new types:
Type | Combined | macOS | iOS | tvOS | watchOS |
---|---|---|---|---|---|
Protocols | 6 | 6 | 3 | 3 | 3 |
Views | 8 | 7 | 7 | 5 | 6 |
Shapes | – | – | – | – | – |
Property Wrappers | 3 | 3 | 3 | 3 | 3 |
Scenes | – | – | – | – | – |
Environment Values | 15 | 14 | 14 | 13 | 14 |
Style Protocols | 2 | 2 | 1 | – | – |
Style Types | 15 | 14 | 11 | 7 | 7 |
Total | 49 | 46 | 39 | 31 | 33 |
Although these numbers don’t look too impressive, when we look deeper, we find out that the existing views and protocols have exploded in number of methods, properties and initializers. See below.
Number of New initializers, methods and properties:
Combined | macOS | iOS | tvOS | watchOS | |
---|---|---|---|---|---|
Initializers | 116 | 114 | 98 | 79 | 79 |
Instance methods | 189 | 179 | 177 | 148 | 148 |
Static methods | 23 | 21 | 18 | 18 | 18 |
Instance properties | 38 | 37 | 31 | 30 | 31 |
Static properties | 112 | 98 | 84 | 65 | 66 |
Total | 478 | 449 | 408 | 340 | 342 |
Number of Deprecated Initializers, methods and properties:
Combined | macOS | iOS | tvOS | watchOS | |
---|---|---|---|---|---|
Initializers | 30 | 29 | 29 | 21 | 25 |
Instance methods | 12 | 7 | 11 | 9 | 9 |
Static methods | – | – | – | – | – |
Instance properties | 1 | 1 | 1 | 1 | 1 |
Static properties | 0 | 0 | 0 | 0 | 0 |
Total | 43 | 37 | 41 | 31 | 35 |
Now that we know where we stand in terms of the task ahead, let’s get to work!
I appreciate the blog!
I’m very looking forward to the updated SwiftUI Companion. Is there a way to support the continued development of it?
Hi Felix, thanks! Working on it right now 😉 It will be a free update for all current users.
Nice. I just keep advertising it to colleagues and friends then 🙂
In addition to the purchase, I would no mind a Patreon account to be able to contribute to the continuous updating. This is an incredibly valuable tool.
A Companion for SwiftUI is really an amazing tool for iOS developers. It’s so helpful to see the output of the code right next to the code. I hope that one day you might make a similar product for Combine!
Thank you!