Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cspell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ words:
- mipmap
- mobileprovision
- mozallowfullscreen
- msix
- notlike
- nubank
- opengraph
Expand Down
10 changes: 10 additions & 0 deletions src/content/docs/code-push/release.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,11 @@ the `--flutter-version` flag.
shorebird release windows --flutter-version %flutter_version%
```

To package this build for the Microsoft Store, set `build_windows: false` in the
`msix_config` section of `pubspec.yaml` so `package:msix` does not rebuild with
stock Flutter. See
[Releasing for Windows](/flutter-concepts/releasing-flutter-apps/windows/).

</TabItem>

</Tabs>
Expand Down Expand Up @@ -620,3 +625,8 @@ as needed.
title="Releasing for iOS"
description="Learn how to configure Xcode signing and submit your release to the Apple App Store."
/>
<LinkCard
href="/flutter-concepts/releasing-flutter-apps/windows"
title="Releasing for Windows"
description="Package a Shorebird Windows release as an MSIX without rebuilding on stock Flutter."
/>
Original file line number Diff line number Diff line change
Expand Up @@ -393,3 +393,8 @@ artifacts:
title="Releasing for iOS (Apple App Store)"
description="Configure Xcode signing identities, Privacy Manifests, build IPAs, and distribute via TestFlight and App Review."
/>
<LinkCard
href="/flutter-concepts/releasing-flutter-apps/windows"
title="Releasing for Windows (Microsoft Store)"
description="Create a Shorebird Windows release, then package an MSIX with package:msix without rebuilding on stock Flutter."
/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: Releasing for Windows
description:
Build a Shorebird Windows release, then package an MSIX from that output
without letting package:msix rebuild the app with stock Flutter.
sidebar:
label: Windows (Microsoft Store)
order: 4
---

To submit an app to the Microsoft Store, you need an **MSIX** package.
[`package:msix`](https://pub.dev/packages/msix) is a common way to produce that
file from a Flutter Windows build. By default it runs `flutter build windows`
with the Flutter SDK on your `PATH`, not Shorebird's Flutter. That rebuild is
not a Shorebird release, so patches will not apply.

Build with Shorebird first, then tell `package:msix` to package the existing
output.

## Step 1: Create a Shorebird Windows release

```bash
shorebird release windows
```

The Windows executable is written to `build/windows/x64/runner/Release`. See
[Create a Release](/code-push/release/) for flavors, targets, and
`--flutter-version`.

## Step 2: Disable the MSIX rebuild

Add [`package:msix`](https://pub.dev/packages/msix) as a dev dependency if you
do not already use it:

```bash
flutter pub add dev:msix
```

Then set `build_windows: false` in the `msix_config` section of `pubspec.yaml`:

```yaml
msix_config:
display_name: My App
publisher_display_name: Example
publisher: CN=00000000-0000-0000-0000-000000000000
identity_name: com.example.myapp
msix_version: 1.0.0.0
store: true
build_windows: false
Comment thread
AbhishekDoshi26 marked this conversation as resolved.
```

`build_windows: false` skips `flutter build windows` and packages the directory
Shorebird already produced.

Copy `identity_name`, `publisher`, and `publisher_display_name` from Partner
Center (Product identity). With `store: true`, `package:msix` refuses to build
if any of them is missing. The fourth part of `msix_version` must be `0` for
Store submissions.

## Step 3: Create the MSIX package

```bash
dart run msix:create
```

Submit the generated `.msix` file to the Microsoft Store.

:::caution

After `shorebird release windows`, do not run `flutter build windows`, or
`msix:create` without `build_windows: false`. Those commands rebuild with
non-Shorebird Flutter and overwrite the build output, so the resulting MSIX will
not receive patches.

:::