loading...

Getting into iOS development? Please, don't start with SwiftUI

nemecek_f profile image Filip Němeček ・2 min read

Nowadays learning iOS development is kind of complicated since Apple announced brand new way of building user interfaces at WWDC 2019 called SwiftUI. This is totally different from how iOS UIs been traditionally built by UIKit and when starting it may be difficult to decide what to learn.

I fully understand the desire to start with shiny new SwiftUI and leave UIKit to history but I think it is a mistake, especially for folks just starting building apps. Let me tell you why.

SwiftUI is super new and is constantly evolving. I suspect that once WWDC 2020 (in on-line form) rolls over, much of the framework will be different. Old tutorials and resources will not show you working stuff. It is possible that SwiftUI will take more than three years to sufficiently mature.

Also due to the nature of SwiftUI which allows pretty slick UI building it also hides a lot behind the scenes and it is pretty common for error messages to point you in a wrong direction. You may be accustomed that IDE (Xcode in this case) will tell you what is wrong, but in SwiftUI it may tell you something is wrong when actually the issues lies elsewhere in your UI code. This is just frustrating and I think even more so for beginners.

It is harder to get help with SwiftUI. At this point Stack Overflow has over 600 000 questions tagged iOS - because prior SwiftUI it did not make sense to use UIKit tag since really there was no other option. In contrast it has a bit over 6 000 questions tagged SwiftUI and around 14 000 which contain "SwiftUI".

When learning UIKit you have much much better chance of quickly finding answer to your problem. There are also resources on how to best structure your app from architecture standpoint, something that will take years to settle for SwiftUI.

Most professional developers did not yet learn SwiftUI because they still need UIKit and will need it in the next few years for sure. Nobody will re-build existing app from scratch just to use cool new thing called SwiftUI. So the pool of people who can potentially help you with SwiftUI is much smaller than people who will help you with UIKit.

If you plan to look for iOS job in the next years, you will almost certainly need to know UIKit.

I think as of right now SwiftUI might be great for Apple Watch and potentially for hobby macOS apps. For iOS, assuming you don't want to just play around, stick to UIKit. It is proven workhorse with tons of resources available. There will be plenty of time for SwiftUI later on.

Why the appeal for beginners to don't start with SwiftUI in the title? Because I see lot of quetions on forums, Slack channels and elsewhere where folks are struggling with iOS development and often it is because of the problems mentioned above and unnecessary frustration is really frustrating..

Posted on Apr 13 by:

nemecek_f profile

Filip Němeček

@nemecek_f

Primarily iOS developer, I also like Django and Python. And dabble with JavaScript occasionally. Love reading and coffee.

Discussion

markdown guide