apple keynote on-stage
iOS Swift SwiftUI Interface Builder
May 22nd, 2020 - Brian Tresedder

Building iOS Apps with SwiftUI: What to Know

SwiftUI is one of the most exciting announcements for iOS developers since Swift was announced five and a half years ago. SwiftUI is a powerful declarative framework that promises to change how developers build out user interfaces for Apple devices. Since SwiftUI was announced almost a year ago, developers have been asking themselves when the right time was to learn and build their first app with SwiftUI. Before answering that question, let's look at some of the pros and cons of SwiftUI.

Why SwiftUI to Build Your App?

Ease of Use. SwiftUI is easy to learn and is much more approachable for a newer developer. There are also great resources and tutorials from Apple that will allow you to get started with the basics of SwiftU

QA as You Build. SwiftUI offers a live preview window that updates as you update your code. This allows developers to preview their views without needing to build on the simulator or device.

Speed to Completion. Between the live previews and the ease of use with building out the basic views, development is notably faster with SwiftUI (once you get the hang of it).

Less Frustration and Conflicts. Anyone who has used storyboards before understands how painful source control changes can be, especially with large storyboard files. It’s nearly impossible to actually know what has changed in a storyboard when someone opens a pull request. They also make managing merge conflicts between developers very frustrating. With SwiftUI, you won’t have to worry about these issues.

Easy Transition of Tools. You can mix SwiftUI with UIKit, so it is possible to start building new views with SwiftUI in existing apps that were originally built with UIKit.

SwiftUI Tips for Beginners

Only Supports Newer iOS. The biggest drawback is that SwiftUI only supports iOS 13 and higher. So this will be a deal breaker for many developers who want to continue to support older iOS versions.

Expect Several Future Updates. SwiftUI is still a young framework that is constantly updating. What’s one way today may not be that way tomorrow.

Longer Effort for Debugging. Debugging with SwiftUI can be challenging, especially for beginners, because the error messages in Xcode don’t always point to the correct spot. Xcode will tell you that something is wrong, but it won’t point to the error. So you’ll need to hunt down the issues in your SwiftUI code.

Not a Large Library of User Experiences. Because SwiftUI is still young, it is tougher to find help with more complex issues when looking for answers on StackOverflow and elsewhere.

SwiftUI is the Future for iOS Developers

It seems clear that SwiftUI is going to be the future standard for iOS developers, but it is still going to be a while before we get to that point. I do think it is beneficial for experienced Apple developers to start learning and adopting SwiftUI, as I believe it will entirely replace UIKit within the next couple of years. But for new and beginning iOS developers, I would also recommend starting with UIKit. Especially if you are hoping to get a professional iOS development job.

I do think we will slowly see more and more new apps being built with SwiftUI in the coming year. Especially after the next iOS version is released, and as supporting devices below iOS 13 is less of a concern. But it is hard to see the value of any existing applications being rebuilt in the near future with SwiftUI.

Some dev leaders will also want to wait until SwiftUI has matured to start using it. So while SwiftUI is certainly the future for iOS development, I think we are at least a couple of years away from SwiftUI being the new industry standard. That won’t stop us at Entrision from starting to use it on our new projects though. We’re excited about taking advantage of the benefits it brings to the table.

YOU MAY ALSO LIKE

app store icon
Sept 20, 2019 - By Brian T.

Common Reasons for App Store Rejection