Co-founder at Ideamotive. Technological advisor and software consultant.
On June 2, 2014, we all witnessed with our own eyes how Apple began to revolutionize the Objective-C developer camp by presenting its new programming language - Swift to the world.
Let’s investigate the story and the best cases of its use in mobile applications from various industries.
Swift is a fantastic way to write apps for phones, desktops, servers, and anything else that gets started and run with code. Swift is a safe, fast, and interactive programming language. It has incorporated the best ideas of modern languages with the wisdom of Apple's engineering culture. The compiler is optimized for performance, and the language is optimized for development, without compromise on one side or the other.
Swift is beginner-friendly to programming. It is the first industrial-grade programming language that is as easy to understand and fun as a scripting language. Sandboxing code allows you to experiment with the Swift code and instantly see results without compiling and running your application.
Swift eliminates a large layer of common programming errors by using modern programming patterns:
Swift code has been compiled and optimized to get the most out of modern hardware. The standard library syntax is designed based on the manual, that the most prominent and easiest way to write code is the best option. The combination of safety and speed makes Swift the best candidate for "Hello, World!" and up to the whole operating system.
Swift combines type inference and pattern matching with a modern, simple syntax, allowing complex ideas to be expressed simply and concisely. And as a result, not only is it easier to write code, but it is also easy to read and maintain.
It already has years of development behind it, and it continues to evolve, including more and more new features.
Researching the specifics of Swift and learning how to get the most out of this programming language will help turn your project into a success story. Swift is a relatively new language for development in the iOS ecosystem.
Most of Apple's platforms were written in Objective-C, and a few years ago, it was the most popular language that iOS developers were learning. It took Swift a long time to work its way into developers' hearts and laptops, but even now, some do not take it seriously due to some prejudice.
Let's try to dispel these myths and consider Swift's advantages and disadvantages to understand why many people believe that Swift is the future of mobile app development for iPhone and iPad.
Swift is a relatively new language. It was created with the goal of making application development more interactive and accessible. This means that for the foreseeable future, application development can be done by people trying to create their own software products. As a result, the language will become widespread.
In other words, Swift can be seen as the programming language of the future. Here you should be guided by the principle: the newer, the better.
Of course, as with other innovations, Swift takes time to learn. Have no time to do it? Why not turn to Ideamotive’s highly experienced Swift developers?
Swift was built on top of previous programming languages, which makes the development process safer and the syntax more accurate. It combines all the best features of previous languages and at the same time retains its own originality.
Still in doubt? Check out “React Native vs. Swift – Which One To Pick When Building An iOS App?” to get to know more about this fact!
There is now a trend towards a shift from Objective-C to Swift among large IT companies and other developers. Moreover, now a programmer with average knowledge is able to create a simple application for the iPhone using Swift code.
Have questions concerning this “shift”? We suggest finding more info in the following material - Swift vs Objective-C: Which Should You Pick For Your Next iOS Mobile App?
Obviously, there is no urgent need to migrate from one iOS language to another. On the other hand, if you are planning to develop a new app for OS X or iOS, then, of course, it is better to use Swift.
Here are the most persuasive causes:
Progress does not stand still. Swift was intended to be something bigger than its predecessors. The Swift mobile developers are working hard to improve it, which is another good reason to opt for this language because, in the future, its unexplored potential can be a determining factor in the success of an application.
Currently, it is the most popular open-source programming language on Github.
The Ideamotive team evaluated the quality of the content and compiled a list of the best products for professionals. In this study, we compared about 900 open source applications written in Swift.
Google is considering making Swift a "first-class" language for Android.
Google's Android operating system currently supports Java as a top-notch language, and sources say Swift is not intended to replace Java, at least not initially. While the ongoing Oracle lawsuit is likely to be troubling, sources say Google believes Swift has broader "growth potential" than Java.
Swift is also open source, which means Google can adopt it for Android without changing its own open source mobile framework.
Google will also have to prepare its entire standard library for Swift and support the language in the API and SDK. Some low level Android APIs are C ++, which Swift cannot currently connect to. They will have to be rewritten.
Swift is also useless for bundling higher level APIs in Java; they would have to be rewritten too.
However, using Swift for Android isn't impossible. Late last year, developer Romain Goyet played with Swift for Android - and had some success. Although this project was completed long before Swift became open source, it nevertheless proved that it was possible.
This project used the Android NDK, which allows you to freely embed other languages in Android. Thanks to open source Swift and Google support, Android apps don't need this set of tools.
All in all, Google will have to effectively recreate their efforts with Java - for Swift. If the company is sufficiently motivated, it is entirely possible without compromising its open source value or causing concern to developers.
The world's most popular social media collaboration platform, taking over Swift, no longer needs proof of its popularity and reliability. Connecting with friends, family, and people who share interests, chatting privately, browsing your preferred content, buying and selling items, or just being with your community - you have it all.
Facebook's interest in Swift seems to be entirely based on technical progress.
The advantage of Swift is that it can serve as both a direct access language and a server-side one. For a product like Facebook, this is beneficial; applications and servers can communicate seamlessly with each other, and this potentially gives a company more flexibility to write APIs for services.
And the work may have already begun. A pull request to Github in the Swift repository called "Port to Android" was made by a Facebook employee. It's unclear if this work was an official Facebook business or not, although we have confirmed that Facebook is already working with Swift internally - just how thoroughly it is.
A name known to everyone, leveraged by all, and used by everyone - WhatsApp is a simple, safe, and reliable application. Swift is one of the main languages that made this application famous and trustworthy. It uses your phone's internet connection to send/receive messages, photos, audio, video, and more as a free messaging app.
Instagram is one of the innovators in photo and album sharing. It is one of the best downloadable apps out there, and yes, it uses Swift. It brings you closer to the people you interact with, explore the community, share whatever you want, and connect with everyone.
Firefox is the official iOS app created in Swift, one of the most famous browsers in the world, which provides users with quick access to various search engines, anonymous browsing, synchronization with other devices, and a number of alternatives.
Here is what they said on Feb 22, 2017:
“A week ago we completed the migration of the entire Firefox for iOS project from Swift 2.3 to Swift 3.0. With over 206,000 lines of code, migrating a project of this size is no small feat. Xcode’s built in conversion tool is a fantastic help, but leaves your codebase in a completely uncompilable state that takes a good long while to resolve.
We evaluated the features that were slated for the 7.0 release and identified the least risky and impactful and agreed to include those. Any features that we were uncertain of were bumped to a future release. This way we had a higher chance of identifying migration related regressions, while still providing added value to our users. We scheduled the migration to start at the beginning of the next sprint, with an estimate that with 3 engineers working full time it should take us about a week. We sent an email out to all of our contributors alerting them to the impending change and informing them of the merge freeze on master that would be in place for the duration of the migration.”
SoundCloudSwift is a program for listening to tracks and podcasts on the SoundCloud platform that also uses Swift mobile development for easier integration with your applications.
WordPress is the official iOS app written in Swift, with which you can manage your blog or website directly from your iPhone / iPad: view statistics, create and edit posts.
WordPress has been around for almost a decade and a half. It survived the CMS wars and stayed relevant during the mobile shift. It passed combat tests under various scenarios and loads. Also it showed us what a thriving third-party market looks like. Now WordPress is realizing a grander vision!
With the release of WordPress 4.7, the REST API plugin was merged into the core and enabled by default. This means that you can query the data format of any WordPress 4.7+ site.
Another world famous company - Uber - also switched to Swift. As Uber programming systems researcher Raj Barik explained to Business Insider, Objective-C is not reliable enough and does not fit into the project architecture.
Known to everyone as an international passenger calling company, Uber uses Swift and its persistent features. Call for an Uber ride, rent scooters, and get to your destination in comfort. With Uber, your goal is always at your fingertips. Just open the app and indicate where you want to go, and a nearby driver will help you get there safely.
Uber's path to Swift is probably a little cleaner than Google or Facebook. While Uber has many moving parts (app, server, and API), they can use Lyft's transition to Swift as an example.
Lyft is a popular US-based taxi booking organization that uses Swift as their primary language. A friendly and affordable ride anytime, Lyft helps you get to your final stop and experience the best car fleet of your life with trusted drivers.
When Lyft ported its iOS app to Swift, it was a preliminary rework that took a lot of time and effort, but the result was an app that was lighter, more compact, and easier to maintain. It is not known how much (if any) the Lyft backend uses Swift, but the company is very supportive of Swift in their existing app.
Here is Lyft's official announcement of the Swift app transition:
“Today's release of the app marks the first time Lyft for iOS has been written entirely in Swift. It was a lot of engineering work, but it was worth it - this Lyft app is not only more responsive, but we can now accelerate development cycles and create new features for drivers and passengers even faster.”
Slack business communication platform brings all your communications and tools together in one place. It made the most of Swift in its tech stack, combining teamwork and partnership so you can get more work done. Complete your to-do list and move your projects forward by bringing the right people, discussions, tools, and information together.
Needs no introduction. As one of the world's leading professional services companies, Accenture uses Swift as its programming language. It helps clients wherever they are on the road to change - in any business around the world - and works with them to create lasting value.
This is the official art auction app written in Swift. Submitted by the developers Artsy, who have adopted the best practices of the renowned platform for exploring, collecting and buying art, and also made edits that make it easier for bidders to find art.
Orta Therox describes this decision in the next way:
“It's been three years, and Swift Package Manager (SPM) is at a point where it can be useful for iOS projects. It'll take a bit of sacrifice and a little bit of community spirit to fix some holes probably but in my opinion, it's time for teams to start adopting SPM for their 3rd party dev tools.”
LinkedIn, the undisputed guru on the web for professionals used by numerous professionals worldwide, depends on Swift as the trusted platform it has built over the years. This Swift app example allows you to confidently manage your career, whether it's looking for a new job, keeping in touch with your circles, or getting the latest news from your connections and your industry.
Airbnb, the state-of-the-art travel agency trendy app, also uses Swift for its own purposes. The main application for iOS users was developed using language, which ensures that the application runs smoothly regardless of the load times. It offers an unforgettable travel experience with access to accommodation rentals, places to visit, and all kinds of reservations.
Here are some lines from Chengyin Liu:
“We have dozens of modules and several 3rd-party libraries written in Swift, comprising thousands of files and hundreds of thousands of lines of code. As if the size of this Swift codebase weren’t enough of a challenge, the fact that Swift 2 and Swift 3 modules cannot import each other further complicated the migration process. Even correct Swift 3 code that imports Swift 2 libraries will not compile. This incompatibility made it difficult to parallelize code conversion.
To make sure we could incrementally convert and validate our code, we began by creating a dependency graph which topologically sorted our 36 Swift modules.”
This Twitter iOS app uses the flexible nature of Swift. One of the most highly recommended social media apps, Twitter is known for anyone exploring the world of news - whether in any field, portfolio, or geography. It has over 2 billion users worldwide.
Find these examples unconvincing? Here are some great reasons that might convince you.
In 2016 alone, the AppStore raised about $ 20 billion for developers from apps on Mac and iOS platforms and $519 billion in billings and sales globally in 2019 alone. Since Apple takes 30% of the AppStore profit, the market can be valued at $28.5 billion.
A lot of money! And you can take your share of this pie.
The Swift language is used to create applications for Mac and iOS, serving as a possible replacement for Objective-C. Although the latter is actively used, it is morally outdated and has no future. Having studied Swift, you can create applications for both platforms at once and make good money on it.
When the Apple team developed the Objective-C replacement, they had two main requirements:
As a result, Swift has all the attributes of a modern programming language and is definitely superior to Objective-C on all fronts.
As a result, we have the following key features:
Thus, you spend more time implementing ideas and less time worrying about possible errors, failures, and conflicts in your code. In addition, the language overcame the syntactic verbosity of Objective-C, making it easier to read and write. The result is several times less time to write similar code in Swift.
Although Swift is a high-level, fast-learning language, it is speedy. According to Apple, Swift is up to 2.6x faster than Objective-C and almost 8.4x faster than Python 2.7. The ultimate goal is to make the language more quickly than C ++.
Importantly, Swift is not only fast but packed with modern language features that allow you to write genuinely functional code. Among them:
The introduction of many of these features, as well as syntax improvements, make Swift safer than Objective-C.
For example, improved memory handling means fewer opportunities for unauthorized access to data. Jumping to the wrong parts of memory, erroneous data modification is also complicated. Another example: more efficient error handling dramatically reduces the number of crashes and critical scenarios. Consequently, unpredictable behavior is minimized.
A year after the introduction of Swift, Apple made it an open-source language. While this is not unique to the modern world, such generosity is rare for an Apple company. Typically, Apple pushes proprietary technologies to highlight its own uniqueness. But the move with Swift was justified and fruitful.
As with any open-source language, Swift is entirely in the hands of the community. Users can suggest bug fixes and feature improvements and help port apps outside of Mac and iOS. After all, users are the main driving force of the language.
According to GitHub's Octoverse 2017 report, Swift is the 13th most popular language in open source projects.
In 2016, TNW reported that demand for Swift employees grew 600 percent. By the end of the year, Upwork reported that Swift was the second-fastest-growing skill in the freelance job market. And in a 2017 Stack Overflow poll, Swift became the fourth most favorite language among active developers.
Apple has no reason to replace Swift with another language in the current decade. Add to this 6 years of progress, both in terms of development and popularity, steadily growing sales of "apple" devices, and expansion of the line. Based on these facts, it's safe to say that the demand for Swift developers will grow.
Much has been said and written about Swift. Many have enjoyed the benefits, and the list is endless. Swift has a promising future ahead, and since Apple leaves no stone unturned in nurturing this language to unleash its best qualities, there is no way to look back.
In the world of iOS hobbyists, there are bound to be brighter, more prosperous days for Swift mobile development over time. Let's wait and enjoy Swift's kindness and resilience as if soaring higher to soar into the sky!
If you want to work with Apple, want to be a part of their crazy financial statements, you need Swift. Looking for Swift developers? There are dozens of Swift and other mobile devs in our network. We will make sure to connect you with talents perfectly fitted for your industry and company culture.
Choosing React Native For Your Mobile Tech Stack
The all-in-one guide for CEOs and Product Owners
Michał Rejman 9 min read
Miłosz Kaczorowski 9 min read
Michał Rejman 14 min read
Patrycja Mach 19 min read
Michał Rejman 15 min read
Work with software development experts from Ideamotive's talent network.