r/iOSProgramming • • 2d ago

Discussion We went Flutter → React → React Native → Swift for an audio app. Lessons from switching stacks 3 times

Post image

We spent the last year building an audio app (Tapedex): a vertical feed of spoken clips you swipe through, with playback that keeps running when the screen is locked.

We started cross-platform and ended up rewriting it from scratch more than once before landing on Swift. What pushed us there:

  • Smoothness. For a feed you swipe through all day, fast loading and fluid swiping are the whole experience. We never got it feeling quite right cross-platform.
  • Extensibility. Adding new features got easier once we stopped fighting the framework and could use the native APIs directly.
  • Focus. Testing on one platform first is just simpler. We'd rather get iOS really right before thinking about Android.

In hindsight, we probably should have gone Swift from day one for something this interaction-heavy.

Curious what others think: for apps where smooth scrolling and fast loading are core, is cross-platform still viable, or is native the only real option?

15 Upvotes

21 comments sorted by

18

u/JesuSwag 2d ago

Any real developer could have told you this.

4

u/crocodiluQ 1d ago

lol, that's what I wanted to say. Every seasoned dev would tell them to go native and not use those crap cross platform things that make everything 10 times harder.

2

u/play-corto 1d ago

same here. I went native SwiftUI from day one and never looked back. Background audio especially, lock screen controls and interruptions are where cross-platform gets messy fast.

Curious, how do you get the next clip to start instantly on swipe? Preloading?

2

u/Tapedex 1d ago

Yep, preloading, but in a few layers. "Preload the next one" on its own wasn't enough:

  1. Download the whole file, not just a buffer.
  2. Start loading during the drag, not after it settles.
  3. A tiny pool of ready player items.
  4. Smaller files for the feed.
  5. Pre-build the views too.

Cover images get prefetched alongside, so the whole page shows up at once. Honestly, most of the "instant" feeling comes from #1 and #2.

1

u/play-corto 1d ago

Starting during the drag is smart, hadn't thought of that one. How big is the pool? Do you keep a few AVPlayers warm, or one player and swap the items?

1

u/Tapedex 1d ago

One player, swapping items. We keep 3 items ready (previous, current, next) and swap the new one in when the swipe settles. A standby player doesn't work, because an item can't move between players (it crashes). The real speed comes from the disk cache: once the file is downloaded, the item plays it locally and starts instantly.

2

u/IlluminatedApp 1d ago

For something interaction heavy with a vertical feed you swipe through constantly, I would say performance should be one of the top priorities.

When you were still on the cross-platform versions, were you using native audio engines, or the audio libraries that came with those frameworks? And on the current Swift version, did you go with SwiftUI or stick with UIKit to keep things as tights as possible?

2

u/Tapedex 1d ago

For Cross-platform versions we tried everything but nothing really felt as seamless and smooth as it does now.

For the Swift version: A hybrid. The feed itself is UIKit: a UICollectionView with paging, because we wanted full control over cell reuse and prefetching. SwiftUI's paging ScrollView didn't give us that. Each page inside it is a SwiftUI view in a hosting controller, so the UI is quick to build and iterate on. Basically, UIKit owns the scrolling and SwiftUI owns the content. The rest of the app (profile, inbox, create flow) is mostly SwiftUI.

6

u/Fine-Natural-8645 2d ago

For a swipe feed of short clips I don't think the scrolling itself is the hard part anymore. Flutter and React Native can both scroll smoothly if the list is built carefully. Where cross-platform hurts is everything around the audio, because that's all Apple framework stuff you only reach through a plugin:

  • The audio session. You need .playback plus the audio background mode, and then interruptions (calls, Siri) and route changes, like pausing when AirPods disconnect. Plugins handle the happy path, the edge cases are where people get stuck.
  • Lock screen and Control Center. MPNowPlayingInfoCenter and MPRemoteCommandCenter have to stay in sync with whichever clip is current, and that gets messy when "current" is decided on the Dart or JS side.
  • Start time. What makes a feed like this feel instant is preparing the next one or two clips before the swipe ends: create the AVPlayerItem early, load isPlayable asynchronously, keep preferredForwardBufferDuration small, and set automaticallyWaitsToMinimizeStalling to false so a short clip starts right away. Natively you can drive that straight off the scroll position (scrollPosition(id:) with .scrollTargetBehavior(.paging) in SwiftUI, or a paging collection view). Through a bridge there's always an extra hop.

So I'd say cross-platform is still fine when audio is a side feature. When playback is the product, native is usually the right call, and it's much cheaper to decide that early.

4

u/Character-Handle-697 1d ago

I understand the cross platform money saving but as a developer, I was always a fan of native code.
Right now with AI, there is no point of doing cross-platform.

We have 2 teams at my company right now, Android and Apple.
When I do a feature, Android just ask Claude to do the same on Android and it's mostly 95% good. They need to review and test.

So, I think if you are an expert in a platform, no need to waste time going cross-platform or learning 2 langages honestly.

1

u/counterplex 17h ago

There’s still value in sharing core business logic and definitions in eg KMP but agreed that building and maintaining two native apps is a lot easier now than it used to be. This is even more so because of SwiftUI and Jetpack Compose.

2

u/Character-Handle-697 11h ago

Totally agree. We have a SDK written in C++ than we share between Android and iOS. Sometimes I wish we could have a more modern/easy to read/review SDK like KMP.

3

u/superquanganh 1d ago

Actually Flutter while being behind on UI, is better from having to fight with every iOS/Android SDK update, since they literally reinvent the wheel of "native looking" UI, even during liquid glass update, Flutter app layout does not break at all. While i see other apps using half baked native component and custom UI, fall apart when some liquid glass components are forced in

1

u/_Xoif 2d ago

I’ve worked and experienced many cross plattform frameworks as well as native iOS and Android. For me flutter is the most overrated of them all and KMM the most underrated and the actual sweetspot

1

u/dynocoder 1d ago

the number of times you refactored gives me anxiety. it just wouldn’t be acceptable anywhere there’s huge traction and money coming in

1

u/HappyTuesdayR1S 1d ago

Swift is always my first choice. I really only prefer to make apps for Apple ecosystem but I did have to use flutter for a project that needed cross platform compatibility. Now I have to maintain two codebases.

1

u/mancaveit 1d ago

No sane person would do it. Native is always the way

1

u/Kan_Ki_ 1d ago

could u really not do it in react native ? feels like a shame to limit urself to ios only, there's a huge market on android imo

1

u/JustTryinToLearn 3h ago

Yeah….going react native is almost only for solo developers or people who already know react.

If smooth interactions and overall UX is super important AND you have the time and budget. Native(swift or kotlin) is almost always better

0

u/[deleted] 2d ago

[removed] — view removed comment

1

u/AutoModerator 2d ago

Hey /u/Seb_Temponap, your content has been removed because Reddit has marked your account as having a low Contributor Quality Score. This may result from, but is not limited to, activities such as spamming the same links across multiple subreddits, submitting posts or comments that receive a high number of downvotes, a lack of recent account activity, or having an unverified account.

Please be assured that this action is not a reflection of your participation in our subreddit. This is simply an automated filter in place to reduce spam.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.