Asking for pro advice: If you would create a multiplatform mobile app today, which language and framework would you use and why?

Reply to this note

Please Login to reply.

Discussion

I would probably ask chatGPT

React Native with Expo. Web, iOS and Android from a single source. However it can get tricky when it comes to crypto operations, but you can always get things to work.

Appreciate the insights! You have built Expo apps before right? Did you ever notice performance differences compared to pure native?

Yes I did. And yes I did. React Native is ALOT slower than native. However:

- Depending on the use case this is actually not an issue

- You can always outsource very heavy-duty work to native modules that run outside the JS thread.

- React Native runs two seperate threads by default; JS and UI. For example a loading spinner can still run smoothly while the JS thread does heavy work in the background.

With Current we pushed an JS only app to the limits. Handling hundreds of nostr events, parsing them and rendering UI components from them really was difficult, but it ran smoothly on most devices.

I would not recommend running POW in a react native app without using native modules

No framework. Go. HTMX.

flutter 🤙

Having never built a full product with any of the existing frameworks, take what I say with a grain if salt.

I always struggled with expo and react Native. Never worked how I wanted it to ootb.

http://capacitorjs.com seems quite promising. Mainly because you can use any web framwork, so porting something like cashu.me seems easier.

Never really delved into it though, as a pure web dev, I always get frustrated when I go into the mobile world.

Porting cashu.me would be a dream. I tried with the tools quasar offers but couldn't get it to work really (although it compiled sometimes for Android and even iOS). Just the QR scanner alone was a big hustle for me and I failed.

Have you done anything like this before?

Flutter is the better alternative for now

Maybe kotlin multiplatform in the future

I had only bad experiences with react, like constant refactoring and things breaking every update

Very insightful, thanks. I'm surprised that kotlin multiplatform still sounds so experimental or foreign to many (I have no mobile app dev XP!).

Not a dev, but I would build on the pear stack, Javascript with privacy & scalability, & no server costs. Pears.com

Flutter. If you need anything Flutter/Dart doesn't support well natively, you can drop in some rust code: https://github.com/fzyzcjy/flutter_rust_bridge

I'm using CDK in my Flutter app.

Not a pro but Kotlin/Compose Multiplatform looks cool and Phoenix Wallet uses KMP (which is a great app).

nostr:nprofile1qqsr9cvzwc652r4m83d86ykplrnm9dg5gwdvzzn8ameanlvut35wy3gprpmhxue69uhhwetvvdhk6efwdehhxarj9emkjmn9qyxhwumn8ghj7mn0wvhxcmmvqyg8wumn8ghj7mn0wd68ytnhd9hx2yhtlun's rust egui approach with notedeck also seems really cool, but probably not so easy to work with and iiuc no real iOS support yet

yeah a lot of the mobile on egui is not done yet. but me, lucasmerlin, and a few other people are working on improving that.

Depends on what you need/want.

To get the most os native look an feel react native is great because native components get renderd.

If you want more custom ui and control but not quite a game engine flutter is nice. Especially if you pair it with rust for business logic https://pub.dev/packages/flutter_rust_bridge

If you want even more fancy animations=> gameEngine like unity, unreal

I just discovered skip.tools yesterday. Write in Swift / SwiftUI, transpiles to native Android / Kotlin / Jetpack Compose, with some added compatibility layers.

nostr:note1fxqwqcnt6fdufd372xmax25c23dq34r4vys5w6lm4gw3922pkcysq5zqg6

is swiftui open source?

The SwiftUI framework is closed source. The Swift language is open source.

oh jesus

I've been wanting to explore using Rust for mobile to desktop multiplatform. Kotlin seems to be used frequently for multiplatform mobile, and perhaps also to desktop, however desktop support seems pretty new and unwieldly to work with still.

Not a fan of RN. Feels like duct tape and fishing wire holding it all together. Dependencies galore. Feels like a security nightmare. Flutter and dart code feels overly verbose to write.

I’m biased because I’m a swift developer, but building with the native platform tools seems to always produce performance and results. Of course this means you need two codebases, however even that will be easier to maintain imo.

I also believe that in terms of UI, you don’t want it to look exactly the same across Android/iOS. Android users expect it to feel like a native Android app and iOS users expect it to feel like an iOS app. The platforms have their own UI nuances.

https://skip.tools is worth looking at though.

Nothing against RN and flutter devs. You do you, just not my cup of tea.

ReactNative is industry standard but runs on JavaScript.

Flutter is faster but runs on Dart.

Both are mature and have lots of packages and such to integrate with the Native api even cross platform.

I'm looking forward towards something new rust based though.

For using rust libraries in Flutter, I can recommend using the rinf package. Just search github.

It uses ProtoBuffers to forward data between the Dart Flutter frontend and the Rust backend.

The most important consideration is to not choose a js framework. They suck on old devices and devs don't notice it bc they all have decent phones.

Here is what I would choose:

- Flutter: Works on all platforms but slow app start up and doesn't feel native.

- Compose multiplatform: Great for Android and desktop. iOS is in Beta and Web in alpha. You can use SwiftUI for iOS if you prefer, it's what Phoenix Wallet is doing.

react native seems to be the way to go. you write it in JS but it doesn't compile to a JS, it produces native apps. expo also looks very good.

gugu gaga baby dev taking notes

nostr:npub1zxu639qym0esxnn7rzrt48wycmfhdu3e5yvzwx7ja3t84zyc2r8qz8cx2y is most of the way to a rust multiplatform that'd work great with CDK, write everything in Rust and dumps to native + wasm

Just a comment on Flutter (and I love Flutter), but I've reliably heard that few people use it internally at Google. Which can be the kiss of death. Just future-thinking.

ChatGPT:

If I were to create a multiplatform mobile app today, I would strongly consider using **Flutter** with **Dart** as the programming language. Here's why:

### 1. **Cross-Platform Consistency**

- **Flutter** allows for a single codebase that can be deployed across multiple platforms (iOS, Android, Web, Desktop). This significantly reduces development time and ensures consistency across platforms.

### 2. **Performance**

- **Flutter** is known for near-native performance. Unlike some other frameworks, it doesn't rely on a JavaScript bridge (like React Native), which results in faster execution and smoother animations.

### 3. **UI Flexibility and Customization**

- **Flutter** provides a rich set of customizable widgets that allow developers to create highly tailored UIs. This is particularly useful when you need a custom and polished user interface.

### 4. **Growing Ecosystem and Community Support**

- **Flutter** has seen rapid growth and adoption, backed by Google. The ecosystem is expanding with a wide range of plugins and packages, and the community is active, meaning you're likely to find support and resources for most challenges.

### 5. **Dart as a Language**

- **Dart** is a relatively easy language to pick up, especially if you're familiar with languages like JavaScript, Java, or C#. It’s also designed to be performant for UI development.

### 6. **Hot Reload**

- **Flutter's** hot reload feature speeds up the development process by allowing developers to see the results of their code changes in real time without needing to rebuild the app.

### 7. **Integration and Deployment**

- **Flutter** integrates well with CI/CD pipelines and has good support for automated testing. The framework also makes it easy to package and deploy apps on multiple platforms.

### Alternative: **React Native**

If you or your team are more experienced with JavaScript/TypeScript and want to leverage the extensive ecosystem of JavaScript libraries, **React Native** is a viable alternative

Prob flutter

Delphi - just works. One problem - not cheap