1
0
Fork 0
mirror of https://github.com/edde746/flutter-tvos.git synced 2026-06-02 10:13:15 -07:00
Patch series + build scripts that make the Flutter engine build for Apple TV (tvOS). Replaces hand-maintained forks — diffs only, sync upstream via gclient.
Find a file
2026-05-29 08:16:27 +02:00
scripts package.sh: ship only consumer artifacts, nest under out/ 2026-04-24 12:56:54 +02:00
versions 3.44.0: remove tvOS remote diagnostics 2026-05-29 08:16:27 +02:00
.gitignore flutter 3.41.6 patches + gclient build scripts 2026-04-24 12:36:33 +02:00
CLAUDE.md 3.44.0: add Flutter tvOS release 2026-05-18 20:52:02 +02:00
LICENSE flutter 3.41.6 patches + gclient build scripts 2026-04-24 12:36:33 +02:00
README.md 3.44.0: add Flutter tvOS release 2026-05-18 20:52:02 +02:00

flutter-tvos

A patch series that makes the Flutter engine build for Apple TV (tvOS). No official Flutter tvOS support exists, and the upstream community fork (DenisovAV/flutter_tv) hasn't rebased its engine source since May 2024.

This repo is just the diffs — not a fork of the whole engine. Scripts fetch upstream Flutter / Dart / Skia at pinned hashes, apply our patches, and build. Prebuilt engine tarballs are published on Releases.

Quickstart

./scripts/fetch-sources.sh 3.44.0    # gclient sync upstream (~10 GB, ~20 min)
./scripts/apply-patches.sh 3.44.0
./scripts/build-engine.sh 3.44.0 host_release
./scripts/build-engine.sh 3.44.0 tvos_release
./scripts/package.sh 3.44.0

Requirements: macOS + Xcode, Python 3, git. depot_tools is auto-installed to ./depot_tools/ if not on PATH.

./sources/ (gitignored) holds the gclient-synced upstream trees. ./out/ (gitignored) holds ninja build output.

Supported variants

  • tvos_debug_sim_unopt_arm64 — sim dev iteration
  • tvos_release — device / TestFlight AOT
  • host_release — macOS host tools (frontend_server, gen_snapshot)

Device debug builds crash at Dart VM init because tvOS blocks RX mprotect. Develop on the sim; ship release.

Consuming the engine from a Flutter app

Download the tarball from Releases, extract it somewhere, and point FLUTTER_LOCAL_ENGINE at the extracted out/<version>/ path in your Xcode build script. The app's script phase then uses the release variant of Flutter.framework, invokes the bundled dartaotruntime + frontend_server_aot.dart.snapshot to produce app.dill, and runs gen_snapshot_arm64 to emit the AOT assembly linked into App.framework/App. See any consumer's xcode_appletv.sh for a working recipe.

Maintenance

See CLAUDE.md for the rules around editing patches, bumping Flutter versions, and the pile of gotchas that landed the current patch series.