As a Rails developer, you've built a robust web application that's serving your users well. But now, you're faced with the challenge of bringing your app to mobile devices. You know it's not just about making it responsive – you want a native mobile app that provides an exceptional user experience.
In this article, we'll explore four viable options for building a mobile app that integrates seamlessly with your Rails application. Each option has its pros and cons, and we'll help you determine which path is best for your team.
The Four Real Options
When it comes to building a mobile app, Rails developers have four primary paths to consider:
Native Development (Swift and Kotlin)
Building a fully native mobile app means creating separate iOS and Android codebases in Swift and Kotlin. This approach provides full control over every pixel and interaction, resulting in an incredible native feel.
However, this path requires significant development efforts, as you'll need to build everything three times: once for the web version, once for the iOS version, and once for the Android version. You'll also need dedicated mobile developers or become one yourself, which can be a substantial investment of time and resources.
React Native
React Native allows you to write a single JavaScript codebase that runs on both iOS and Android devices. This approach is backed by Meta and has a massive ecosystem, producing apps that feel close to native.
While React Native offers excellent developer ergonomics once you're up and running, setting up projects can be finicky. Additionally, if you need custom features not covered by existing plugins, you'll need to write native modules in Swift or Kotlin, which can add complexity.
Progressive Web Apps (PWAs)
A PWA skips the app stores entirely, allowing your Rails application to run directly in the browser. This approach has zero native toolchain overhead and the lowest development cost.
However, PWAs come with limitations, such as no in-app purchases, limited push notification support on iOS, and no presence in the app stores. You'll also need to ensure that users know how to add your PWA to their home screens.
Hotwire Native
Hotwire Native wraps your existing Rails application in a native shell, rendering your HTML views inside native navigation. This approach keeps all business logic on the server, ensuring that when you deploy new features or fix bugs, they update instantly across all platforms.
When you need native features like push notifications, camera access, or biometrics, Hotwire Native provides bridge components to connect your HTML to native code. You can always "drop down to native" for fully custom screens when needed.
Hotwire Native is the approach used by 37signals (now Hey) to build Basecamp, HEY Email, and HEY Calendar, serving millions of customers across iOS and Android devices.
How They Compare
Here's a side-by-side comparison of the four options:
| Option | Native | React Native | PWA | Hotwire Native |
| --- | --- | --- | --- | --- |
| Timeline | 6-12+ months | 4-8 months | 1 week | 1-2 months |
| Codebases | 3 | 2 | 1 | 1 + 2 small |
| Teams needed | iOS, Android, and Rails | React Native and Rails | Rails | Rails |
| Learning curve | Steep | Moderate | None | Low |
| Offline support | Full | Full | Partial | None |
| Native feel | Full | Full | Minimal | Mostly |
| App Store presence | Yes | Yes | No | Yes |
| Native API access | Full | Full | Limited | Full |
The "teams needed" row highlights the biggest differentiator for most businesses: Hotwire Native and PWAs are the only options where your existing Rails developers can do the work.
When deciding which path to take, consider your team's expertise, the complexity of your app, and the level of native features you need. By weighing these factors, you'll be well on your way to building a mobile app that integrates seamlessly with your Rails application.