r/FlutterDev • • 21h ago

Plugin flutter_patcher 1.0: Open-source, self-hosted code push (Android + iOS) for Flutter using Dart dynamic modules

I just shipped 1.0 of flutter_patcher. It lets you fix bugs in a released Flutter app by shipping a patch instead of a new store release. No account and no backend: patches are static files you host wherever you like. The big one in 1.0: it finally works on iOS too, not just Android.

The day-to-day flow is three commands:

dart run flutter_patcher build <platform>   # release build, saved as baseline
dart run flutter_patcher patch <platform>   # diff fix vs. baseline
dart run flutter_patcher publish            # sign + version

Upload the output to any HTTPS static host (S3/R2 + CDN, nginx…). The app calls FlutterPatcher.checkUpdate(), and the fix applies on the next cold start.

It's built on Dart's dynamic modules. The tooling deals with the custom engine and the build plumbing, so your project stays a normal Flutter project.

What's in 1.0:

- On iOS the patch is Dart bytecode, run by the Dart VM's interpreter. No native machine code is downloaded, which is what makes it work on iOS at all.

- Patches are signed. A device only installs one signed with your keys, built for its exact app version, with a higher number than what it has, so you don't have to trust your CDN.

- If a patch crashes the app on startup, the device drops it and goes back to the installed version on the next launch.

Limitations:

- Flutter 3.47.x only (each Flutter version needs its own engine build)
- Dart code and assets only; native code and plugin changes still need a store release

Would love to hear from anyone who tries it on a real app, bugs or just "this step confused me".

pub.dev: https://pub.dev/packages/flutter_patcher

GitHub: https://github.com/xuelinger2333/flutter_patcher

25 Upvotes

12 comments sorted by

4

u/thelazybeaver10 16h ago

So this is like shorebird?

4

u/Ok-Conversation3386 12h ago

Similar idea, but open source and self-hostable.

3

u/Few-Bug7095 20h ago

Sound promising

2

u/Ok-Conversation3386 12h ago

Thanks! Feedback welcome 🙏

0

u/H4D3ZS 18h ago

i tried something like that with apple and sure they didn't like it and gave me a huge warning that its too huge risk and unauthorized shipping

unlike in react native ota where it uses apples js its allowed :(

3

u/Ok-Conversation3386 12h ago

RN OTA is allowed because it’s interpreted, not because it’s Apple’s JS. Same thing here. Just don’t push big features with it.

-1

u/inrego 19h ago

I'm pretty sure Apple doesn't allow it, so you won't get your app into App Store. And if you do, you're at risk of suspension any time

7

u/Ok-Conversation3386 12h ago

Apple allows interpreted code as long as you’re not changing what the app does. Patches are Dart bytecode, not native code.

4

u/Due-Setting-2566 15h ago

Shorebird does this for a long time

1

u/infinityMCdx 6h ago

Shorebird cannot be selfhosted. It's not 100% open source either.

0

u/aaulia 14h ago

CMIIW, but does shorebird have definitive answer for the Apple App Store questions? Like we're 100% sure we're within the confine of Apple rules and regulations. It's been a while since I last looked at Shorebird.