Should you build your next mobile app with native tools, or a cross-platform framework?
Once upon a time, building a mobile application meant using programming languages specific to the environment where that app would live. Now, it’s not so simple. Here’s a breakdown of the options and tradeoffs that engineering and product teams need to consider when deciding whether to build their next mobile application using OS-native languages and tools or a cross-platform framework.
The release of the iPhone in 2007 unofficially marked the dawn of the mobile age in which we now live. When the first iOS (and shortly thereafter Android) phones made their debut, the world was introduced to a groundbreaking concept––handheld communication devices that not only allowed users to make calls, send texts, and check email, but download and interact with a plethora of applications via touchscreen interfaces. With this innovation, the entire experience of computing became mobile, and fit in the palms of our hands.
It’s been almost a decade and a half since the first “smartphones'' (which we now just call phones) first made it to users around the globe, and their adoption and usage has only accelerated with each passing year. Now, in 2021, it’s difficult to imagine the world before these tools reshaped how we experience it. When was the last time you looked at your phone? If you’re like two-thirds of Americans, it was probably no more than ten minutes ago. Last year saw over 208 billion app downloads, and according to the World Advertising Research Center, by 2025, nearly three quarters of all internet traffic will come from mobile phones alone.
With mobile dominating the landscape of internet usage today, the stakes for delivering impactful and personalized app experiences are higher than ever before. Companies are expected to continuously iterate on their mobile apps, which means constantly pushing integrations to multiple versions of their product on various platforms. Additionally, considering the fact that switching apps on a phone only requires a few taps of the thumb, the decision for whether to use native or cross-platform languages and frameworks to build a mobile app is crucial, and one that can make or break the long term success of a company’s digital interactions with customers.
In the “old days,” prior to 2015 or so, developing an app for iOS meant using Swift or Objective-C. To deploy that same app on Android, the engineering team would reach for Java or, more recently, Kotlin. This has changed in recent years, however, as cross-platform frameworks like React Native, Flutter, Xamarin, Cordova and many other tools have reshaped the landscape of mobile development. Based on common and universal programming languages and technologies, these frameworks can be used to develop mobile apps across iOS, Android and web, as well as applications for other platforms like Roku, Fire TV, and more.
The benefits of managing all versions of your company’s application from a single codebase cannot be ignored. Now that cross-platform tools present a viable alternative to building bespoke mobile apps with platform-specific languages, product and engineering teams need to be well versed in the pros and cons of native vs. cross-platform mobile app development in order to make an informed decision. Here, we’ll explore some of the upsides and potential pitfalls of selecting a native language vs. a cross-platform framework, and present some key points to consider when evaluating which path to pursue.
Native app development: You’re speaking my language
Native mobile app development entails building applications specifically to run on either the iOS or Android mobile operating system, using the programming languages, SDKs, and other development tools that Apple and Google provide to developers. More specifically, iOS developers taking the native approach will use either Objective-C or Swift, and Android developers will build apps using Java or Kotlin.
Since these languages are “native” to the operating systems on which they run, building a mobile app with these tools presents a multitude of advantages in areas that are critical to the long term its long term success––speed, performance, UI/UX, developer experience and scalability––that are difficult to turn down if delivering the best possible product for your customers outweighs all other considerations.
Here are a key areas in which taking the native approach to your next mobile app can offer significant benefits:
Overall developer experience
All of the primary native languages for app development––Swift, Objective-C, Java and Kotlin–– have strong built-in features for preventing bugs and crashes in production code like strong typing and error handling systems. With first-class support for throwing, catching, propagating, and manipulating errors, native languages offer much more robust options for preventing production errors. Error handling presents much more or a challenge in cross-platform frameworks, however. In React Native, for example, the presence of React components introduces a new class of errors that require some creative workarounds to be detected and routed out of your code.
CPU usage and file size
Cross-platform frameworks rely on dependencies to allow their code to run across operating systems, so it is no surprise that these apps ship with larger file sizes and clock higher CPU usage than those built with native languages. While this may not present a significant problem when an app is first rolled out, it can lead to major bottlenecks once the app’s complexity and user base scales. At this point, the amount of processing power and speed it needs to run smoothly can quickly become unmanageable.
Closer component integration
Languages like Swift, Objective-C and Java have a long heritage as the primary languages within their respective platforms. Owing to this, their level of integration with the internal hardware and software ecosystem on iOS and Android operating systems is unrivaled by cross-platform frameworks. Accessing the device’s internal hardware components, such as GPS, contacts, and camera, are first-class features of these languages. Native languages also have much more robust feature sets around memory management and complex networking functionality than cross-platform frameworks. Not only does this allow developers to build more powerful and performant applications, but “close to the metal” tie-ins between the language and operating system can make for a much better developer experience as well.
Another advantage of this closer integration with native APIs is a greater ease of collecting insights throughout your app users' experience. Check out this blog post that covers creative ways to uncover user behavior in iOS apps using iOS frameworks, and the mParticle iOS SDK.
Just as the native languages have a direct integration with a device’s hardware components, they also have a much more seamless and direct connection to the device’s native user interface, making them the most robust and reliable choice from a UI/UX standpoint. Any cross-platform framework will need to utilize some sort of bridge to render native components in a mobile operating system. While some frameworks like React Native, for example, come with an extensive ecosystem of readymade components and UI libraries, they may behave unpredictably inside of iOS and Android environments.
Once again, owing to native languages’ seamless integration with the operating systems on which they run, they are the preferable to cross-platform frameworks for realizing smoother, more intuitive user experiences.
Cross-platform frameworks: “Write once, run everywhere”
Cross-platform frameworks have been in a constant state of evolution since they first emerged. While new non-native tools for building mobile apps are entering the development ecosystem at a steady pace, here is a selection of established tools in this category:
- React Native: Created by Facebook in early 2015, React native is based on the React web framework and leverages several of the same aspects of its browser-oriented counterpart, like JSX, CSS-polyfills, and the omission of a true DOM API.
- Xamarin: Developed by Microsoft, Xamarin extends the.NET developer platform with tools and libraries specifically for building apps for Android and iOS as well as tvOS, watchOS, macOS, and Windows.
- Unity: In addition to being a popular cross-platform choice for building mobile apps, Unity is also an expansive ecosystem of tools for developing 2D, 3D, and VR gaming content.
Choosing a cross-platform approach to developing your company’s mobile apps does offer considerable advantages in terms of practicality and time-to-market. Some of those include:
Based on the concept of “write once, run everywhere,” cross-platform development eliminates the need to build and maintain completely separate versions of an application for different mobile environments, which dramatically decreases the engineering time and resources required to launch an app.
Increased developer talent pool
Additionally, the fact that cross-platform frameworks are based on widely used web technologies opens the door to a wider pool of developers who can join your team.
Faster time-to-market and customization
Dramatically reducing the development workload also translates to delivering your application to customers sooner, and responding to user feedback more promptly. This is a major advantage for entrepreneurial companies looking to deliver value to customers as soon as possible.
Choosing the right approach
While there is no right answer to whether you should take a native or cross-platform approach to building your company’s mobile app using, considering your company’s particular situation alongside the pros and cons of each solution should help you make an informed choice.
If delivering a best-in-class mobile user experience that fully leverages the capabilities of native operating systems is your paramount consideration, using OS-native languages is more than likely the appropriate path to select. This is particularly true for larger, more established enterprises with the resources to support the added overhead associated with native development. On the other hand, for smaller entrepreneurial companies in early growth stages, taking advantage of the flexibility and reduced development time that cross-platform frameworks deliver may well be the wiser decision.
If you're going to be collecting event data from your customers across your mobile apps, here's how you can get started with mParticle's SDKs for iOS and Android.
Latest from mParticle
Treatwell partners with mParticle to bring innovative digital experiences to the hair and beauty community
Get started today
Try out mParticle and see how to integrate and orchestrate customer data the right way for your business.
Startups can now receive up to one year of complimentary access to mParticle. Receive access