Why Swift 5 is a Game-Changer for App Development
When people ask me how they should get started in programming, I respond with one word: Swift. Introduced in 2014 at the annual Worldwide Developers Conference, Swift is a programming language developed by Apple for devices using Apple operating systems, like iPhone and iPad. The mobile app market built around these devices is lucrative—in 2017 alone, Apple paid iOS developers $26.5 billion, which was a 30% higher payout than the year before. Consumers are spending their time on mobile and companies need to meet their customers there, by investing in app development and ensuring their teams know the latest skills related to mobile development such as the new and ground-breaking Swift 5.
Why Swift 5?
My basis for recommending the Swift language to other beginners stems from the same reason why I’m an Apple product enthusiast. Like Apple products themselves, Swift is geared to the user and is created to simply work. In fact, Swift was recently named the sixth most loved programming language in Stack Overflow’s 2019 Developer Survey of nearly 90,000 developers.
In creating Swift, Apple took inspiration from several programming languages, including, Objective-C, Rust, Haskell, Ruby, Python, C#, CLU. Fast forward to 2019, and after years of refinement, it’s an incredible time to get started in this beginner-friendly programming language thanks to a big update from Apple with the launch of Swift 5.
What’s new in Swift 5?
As Ted Kremenek, Apple’s senior manager of languages and runtimes for Swift wrote in an announcement blog post on Swift.org, “Swift 5 is a major milestone in the evolution of the language.” I agree—the latest evolution of Swift will help developers make better apps thanks to a few key features outlined below.
Application binary interface (ABI) stability is a game-changer
The biggest game-changer in Swift 5 is the introduction of application binary interface (ABI) stability. ABI stability means that going forward, all Swift libraries will be incorporated into Apple’s various device operating systems including macOS, iOS, tvOS, and watchOS. So, an app built on Swift 5 will run with systems built on Swift 5 libraries, and theoretically, also on future language iterations like Swift 6.
ABI stability enables binary compatibility between apps and libraries compiled with different versions of Swift, even when using the compatibility mode with older languages. For example, an app built with Swift 5 will not only run on systems that have a Swift 5 standard library installed, but it should also run smoothly on the future Swift 6, 7, 8, etc.
ABI stability also has major benefits for iOS apps including:
- Smaller apps: Since Swift libraries are incorporated into every macOS, iOS, tvOS, and watchOS release, developers will no longer need to include Swift libraries into an app’s build, which will drastically reduce app sizes. Smaller apps will download faster to iOS devices and take up much less storage space on a user’s device.
- Faster load times: Every library included in an app increases the app’s launch time, but if a library is included in the operating system itself, which is what Apple is now doing with Swift and all future OS releases, it’s cached and shared across apps. This means the app loads faster and results in a better customer experience.
- Better performance: If an app frequently crashes, you will likely see an increase in uninstalls. Users don’t want to use a broken app. The ABI stability of Swift 5 helps apps behave better and offers enhanced performance.
- Overall improved end-user experience: All the above features result in one very important outcome for developers: a better app experience for the people who matter most – your customers. With apps requiring less on-device memory to run and a faster launch time once installed, developers can now solve some technical pain points that often cause users to delete an app from their devices.
Other new Swift 5 features
Aside from ABI Stability, there are some additional new Swift 5 features that developers should know about and master.
- String reimplementation with UTF-8 encoding helps the overall memory, performance, and efficiency of an app, while also improving both server-side and client-side communication.
- String literals now support raw text, which is very helpful when creating regular expressions.
- Module stability allows the interface for a Swift 5 library to work with a future Swift compiler.
- Result type, is now included in Swift’s standard library, which I’m especially excited for, as it allows developers to create more robust APIs and handle errors in a more detailed way.
Developing for iOS vs Android
Now that we know how the improvements to Swift address many long-standing concerns from the developer community, I want to also address a question I get often from both developers and businesses: “Should I focus on building iOS or Android apps?”
While I encourage all developers to build professional skills for future job opportunities or to be able to take on new team projects at work, I do believe building for Apple’s App Store can be especially beneficial for companies.
According to a 2018 survey by App Annie, while Google Play Store apps see significantly higher worldwide downloads compared to iOS apps (70% of all downloads are Android vs 30% of all downloads on iOS), the iOS App Store generates nearly twice as much yearly spend from users as compared to Google Play users (66% to 34%). Between 2010-2017, those iOS users spent over $130 billion in the App Store. Because revenue growth from the iOS marketplace far outpaces total iOS downloads, I recommend companies of all sizes focus first on bringing their product or services to Apple users before scaling to Android. The iOS user will continue to be an important customer for companies to get their product in front of. Find out more about a subscription to Udemy for Business for your developer team to upskill on Swift 5.
Why Developers Should Learn Swift
Finally, I cover all these new Swift features in my Swift 5 course. For those totally new to programming, I can’t emphasize enough how much I believe that Swift is a perfect beginner introduction into the field. Swift is an overall more pleasant experience as compared to coding with the common Android languages of Java, Kotlin, or C++. As I said earlier, Swift is such an intuitively structured language, that I’m confident even someone who’s never written a single line of code will create a strong foundation for their future as a developer by the end of course. You’ll even make your very first iPhone app!
I’m especially excited to teach Swift 5 because, in Swift’s early days, there were such large technical leaps between versions, say, moving from Swift 1 to Swift 2, that it sometimes felt like learning a new language or framework altogether. But with this year’s update, if you write an app in 2019, you’ll still be able to compile it when Swift 6, 7, etc. are released.
Ready to get started in iOS development or simply eager to bring an existing iOS app up-to-date with the features of Swift 5? Join me in Swift 5 Programming for Beginners!
Top courses in Swift
Swift students also learn
Empower your team. Lead the industry.
Get a subscription to a library of online courses and digital learning tools for your organization with Udemy Business.