Logofpack

fpack

One command turns a Flutter project into signed release files for every platform.

fpack

一条命令,把 Flutter 项目打包成所有平台的已签名发布文件。

pub package CI License: MIT

flutter build gives you a build folder. fpack gives you the files you ship: a signed APK and AAB, an IPA, a notarized DMG, a Windows installer, .deb / .rpm / AppImage / Snap packages and a web zip, each named consistently, checksummed and collected in one dist/ folder.

dart pub global activate fpack
cd my_app
fpack doctor              # what can this machine build? what is missing, and how do I install it?
fpack build apk aab       # → dist/1.0.0+1/my_app-1.0.0+1-android-universal.apk, … .aab
fpack build --all         # everything this machine can build; the rest is skipped with a reason

Start here#

New to fpack? Read these four pages in order. About twenty minutes, and you end with a real artifact.

Platform tutorials#

Each tutorial goes from prerequisites to a signed, verified file you can publish.

  • Android keystore, signed APK / AAB, per-ABI splits, Google Play
  • iOS team, export methods, ad hoc, unsigned, App Store Connect
  • macOS zip / DMG / pkg, Developer ID signing, notarization
  • Windows portable zip, Inno Setup installer, MSIX, code signing
  • Linux tar.gz, deb, rpm, AppImage, Snap (also in LXD / Multipass)
  • Web a deployable zip, base href, WebAssembly

Configure it for your project#

fpack works with no configuration. When you need more, the guides are organised by what you want to do:

Look something up#

Why fpack#

  • Zero configuration. It reads pubspec.yaml, Gradle and the Xcode projects. fpack.yaml is optional.
  • It never edits your project. Signing data is injected through environment variables and temporary files; artifacts go to dist/, scratch files to build/fpack/.
  • Safe to try. fpack doctor tells you what is missing and how to install it; --dry-run prints every command it would run.
  • Signing and notarization included. Android keystores (v1–v4), iOS export options, macOS Developer ID with resumable notarization, Windows Authenticode (pfx, certificate store, Azure Trusted Signing).
  • Everything is configurable. 216 validated fpack.yaml keys, a JSON Schema for editor completion, ${VAR} interpolation and dedicated FPACK_* variables.
  • Built for CI. Stable exit codes, --json results, secrets redacted from logs, English and Chinese output.
  • Fast and dependency-free. A native core (about 10 ms startup) behind a thin Dart launcher that downloads the matching, SHA-256 verified binary.

A complete example project with a commented fpack.yaml lives in example/.

pub package CI License: MIT

flutter build 给你的是一个构建目录,fpack 给你的是可以直接发布的文件:已签名的 APK 和 AAB、IPA、已公证的 DMG、Windows 安装程序、.deb / .rpm / AppImage / Snap 包和 Web 压缩包。文件名统一、带校验和,全部收集在一个 dist/ 目录里。

dart pub global activate fpack
cd my_app
fpack doctor              # 这台机器能构建什么?缺什么、怎么装?
fpack build apk aab       # → dist/1.0.0+1/my_app-1.0.0+1-android-universal.apk、… .aab
fpack build --all         # 构建这台机器能构建的全部目标,其余的会注明原因并跳过

从这里开始#

第一次使用 fpack?按顺序读下面四页,大约二十分钟,最后你会得到一个真实的产物。

平台教程#

每份教程都从前置条件一路走到可以发布、并且验证过的已签名文件。

  • Android 密钥库、已签名的 APK / AAB、按 ABI 拆分、Google Play
  • iOS 团队、导出方式、Ad Hoc、未签名、App Store Connect
  • macOS zip / DMG / pkg、Developer ID 签名、公证
  • Windows 便携 zip、Inno Setup 安装程序、MSIX、代码签名
  • Linux tar.gz、deb、rpm、AppImage、Snap(含 LXD / Multipass 构建)
  • Web 可部署的 zip、base href、WebAssembly

为你的项目配置#

fpack 不配置也能用。需要更多控制时,指南按“你想做什么”来组织:

查阅#

为什么选择 fpack#

  • 零配置。 读取 pubspec.yaml、Gradle 和 Xcode 工程,fpack.yaml 可选。
  • 绝不修改你的项目。 签名信息通过环境变量和临时文件注入;产物放进 dist/,临时文件放进 build/fpack/。
  • 可以放心试。 fpack doctor 告诉你缺什么、怎么装;--dry-run 打印它将运行的每一条命令。
  • 内置签名与公证。 Android 密钥库(v1–v4)、iOS 导出选项、macOS Developer ID 与可恢复的公证、Windows Authenticode(pfx、证书库、Azure Trusted Signing)。
  • 一切皆可配置。 216 个经过校验的 fpack.yaml 键、用于编辑器补全的 JSON Schema、${VAR} 插值和专用的 FPACK_* 变量。
  • 为 CI 而生。 稳定的退出码、--json 结果、日志中的密钥脱敏、中英文输出。
  • 快且无依赖。 原生核心(启动约 10 毫秒)加一个轻量的 Dart 启动器,后者会下载版本匹配、经 SHA-256 校验的二进制。

完整的示例项目和带注释的 fpack.yaml 在 example/。