Services

Case Study

    Services

    About usVentures

    Case Study

    BlogCareersContact

Swift or React Native - which is better for developing an iOS app


By Michał Tyszkiewicz

When thinking about developing an iOS mobile application the key decision is deciding on either native or hybrid development. Both have their advantages and disadvantages and the correct choice comes down to doing some research and contrasting it with your goals. For hybrid development the tool of choice is Facebook’s React Native and for native you’d probably go with Apple’s dedicated language Swift. Obviously that’s only the basics and the choice isn't as simple as that.

A Swift successor

Swift is meant to be a successor to Objective-C, the programming language Apple had been using for decades. It had become a little bit obsolete or to put it mildly lacking in modern functionalities, as it was created in the 1980s. Swift was introduced at the Worldwide Developers Conference in 2014 as the dedicated way for developing iOS applications and has received a lot of substantial updates since then. A number of very popular applications like Twitter, SlideShare and Airbnb have been developed using Swift, and it's more than likely a lot more will be in the near future.

Hybrid app development = React Native

React Native is a JavaScript framework, created by Facebook for developing cross platform applications. It has also been used to develop a number of very popular apps like SoundCloud, Instagram and obviously Facebook’s application. The main idea was to let developers write code and create applications for both iOS and Android while the UI elements get rendered in the native version for each platform. This ensures the development process is significantly faster than having a separate dev team for each platform, while still providing the user with experience that feels native to the particular platform.

Swift vs React Native for iOS

Obviously the big advantage with hybrid development is using one codebase for creating an app for both platforms. Android holds a large share of the market so even when going for only an iOS app it’s good to keep your options open for the future. That said, React Native holds a number of key advantages even when considering just iOS app development. In the broadest sense the choice should be focused on the aims of the particular project and prioritizing one aspect of it over another. Obviously the choice is much more complex than just focusing on speeding up development as much as possible and it’s worth it to do a deeper dive into the key differences:

  • UI: With Swift devs can take advantage of SwiftUI and create interfaces tailored to iOS from scratch. React Native, on the other hand, uses JavaScript libraries to build user interfaces. That provides a lot of advantages like helpful third party tools, libraries and a number of reusable UI components, which makes creating a native-like UI for both platforms much easier.
  • Coding speed: While Swift definitely has improved on Objective C and creating an iOS app with its help is much faster, React Native still has it beat. JavaScript has been the most popular programming language for a long while now, and for good reason. The community, number of tools and solutions is absolutely massive and will make creating a codebase a lot simpler even for new developers.
  • Learning: Apple has done its due diligence with the documentation and has provided ample help as well as a playground environment. Still it is almost impossible to beat JavaScript in this regard as almost anything you want to know is just a google search away. With time this gap may become smaller with time, so far the more established language simply has so many more tools, tutorials and developers it’s hardly comparable.
  • Performance: Obviously performance can be dependent on a variety of factors such as individual setup or the size and complexity of the application. That said, React Native takes advantage of native code optimizations and tools which can have a large impact regardless of the other factors.
  • Stability: The one area where Swift has React Native beat is application stability. The fact that it is designed for a particular platform and uses type safety means errors are easier to spot and the performance and stability is optimized with iOS in mind. The hybrid approach and focusing on faster development has its drawbacks here when contrasted with one dedicated to a single platform. Although obviously we’re just talking out of the box here as various platform specific libraries and development tools can vastly help React Native in this regard.

Why not both?

In general the JavaScript community is so much older and larger it is a tremendous asset. Whatever the project you can be pretty sure it will beat out Swift in terms of developer availability, cost, time, community support and available third party libraries. That said, the Swift environment is growing dynamically and if you’re looking to make an iOS app that’s tailored to the platform and uses all its functionalities without any issues, it might edge out React Native. For the usual cases where the biggest factors are time and cost React Native is still probably the best choice. One last point is that if you’re just starting out as a developer it would be good to learn both, as the learning curve is not that steep for either, and you’ll be available for jobs in both and that can be a major asset especially going forward.

author

Michał Tyszkiewicz

Content Ninja

When his head is not between the hoops, he's busy creating content & planning the next marketing automation.

Could use some help with React Native?

PreviousNext
Servicesstaff augmentationsoftware consultingsoftware developmentweb developmentmobile developmentproduct design

Aexol sp. z o.o., Mławska 4/U7, 15-213 Białystok, Poland, EU

KRS: 0000602817, REGON: 363749060, NIP: PL5423253283