Skip to content

enhance(nsis): use restart manager to close app - #14479

Merged
Legend-Master merged 6 commits into
tauri-apps:devfrom
Legend-Master:nsis-restart-manager
Sep 15, 2026
Merged

Legend-Master merged 6 commits into
tauri-apps:devfrom
Legend-Master:nsis-restart-manager

Conversation

@Legend-Master

@Legend-Master Legend-Master commented Nov 16, 2025 •

Copy link
Copy Markdown
Contributor

Closes #9950
Closes tauri-apps/nsis-tauri-utils#39
Reference tauri-apps/tao#1115

Use Restart Manager to close running app instead of our own nsis_tauri_utils::KillProcess, this makes it so that we send a WM_ENDSESSION signal to the app for it to gracefully shutdown (paired with tauri-apps/tao#1126)

This also fixed a problem where we would wrongly detect other programs that have the same name as us (e.g. both named api.exe) and shut them down

One more thing to go though, we should probably also switch nsis_tauri_utils::FindProcess to RmGetList and use a fully qualified path here, so we fully fix this problem done in 68b9d41

@github-actions

github-actions Bot commented Nov 16, 2025 •

Copy link
Copy Markdown
Contributor

Package Changes Through a1f7333

There are 14 changes which include tauri-cli with minor, @tauri-apps/cli with minor, tauri with minor, tauri-build with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-utils with minor, tauri-bundler with minor, tauri-macos-sign with minor, @tauri-apps/api with minor, tauri-codegen with minor, tauri-macros with minor, tauri-plugin with minor, tauri-driver with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.11.1 2.12.0
tauri-utils 2.9.3 2.10.0
tauri-macos-sign 2.3.4 2.4.0
tauri-bundler 2.9.4 2.10.0
tauri-runtime 2.11.3 2.12.0
tauri-runtime-wry 2.11.4 2.12.0
tauri-codegen 2.6.3 2.7.0
tauri-macros 2.6.3 2.7.0
tauri-plugin 2.6.3 2.7.0
tauri-build 2.6.3 2.7.0
tauri 2.11.5 2.12.0
@tauri-apps/cli 2.11.4 2.12.0
tauri-cli 2.11.4 2.12.0
tauri-driver 2.0.6 2.1.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@Legend-Master
Legend-Master marked this pull request as ready for review November 17, 2025 07:38
@Legend-Master
Legend-Master requested review from a team as code owners November 17, 2025 07:38
@Legend-Master Legend-Master added this to the 2.10 milestone Nov 17, 2025
@Legend-Master

Copy link
Copy Markdown
Contributor Author

@Legend-Master

Copy link
Copy Markdown
Contributor Author

Actually, this will cause the app to crash on https://github.com/tauri-apps/tao/blob/3c2b4447aa53151ae96d30a60928d1d71e9bb5fc/src/platform_impl/windows/event_loop/runner.rs#L368 because Restart Manager works a bit differently from system shutdown, it doesn't terminate us right away after returning 0 from WM_ENDSESSION

Not sure if we should just call std::process::exit when we get WM_ENDSESSION to keep the behavior consistent though

@Legend-Master
Legend-Master marked this pull request as ready for review September 9, 2026 07:37
@Legend-Master
Legend-Master merged commit bca4ca5 into tauri-apps:dev Sep 15, 2026
17 checks passed
vinniefalco added a commit to vinniefalco/runvil that referenced this pull request Sep 26, 2026
Tauri 2.12.0 changes the generated `CheckIfAppIsRunning` macro to find a running app through Windows Restart Manager, so the macro now takes the full path of the executable and the template must include `Win\RestartManager.nsh`. The custom `installer.nsi` still passed bare executable names and did not include the header, so the Windows installer build stopped on a missing Restart Manager macro. The template now includes the header and passes `$INSTDIR` paths at all four checks.

- The gateway section still detects a running gateway by process name, and it now stops the gateway through `CheckIfAppIsRunning` at its installed path. The comment above the check says so.
- The upstream change is tauri-apps/tauri#14479, first released in Tauri CLI 2.12.0.
- The template now needs Tauri CLI 2.12.0 or later. An older CLI generates the name-based check, which never matches a full path, so its installers would not stop a running app.
vinniefalco added a commit to vinniefalco/runvil that referenced this pull request Sep 26, 2026
Tauri 2.12.0 changes the generated `CheckIfAppIsRunning` macro to find a running app through Windows Restart Manager, so the macro now takes the full path of the executable and the template must include `Win\RestartManager.nsh`. The custom `installer.nsi` still passed bare executable names and did not include the header, so the Windows installer build stopped on a missing Restart Manager macro. The template now includes the header and passes `$INSTDIR` paths at all four checks.

- The gateway section still detects a running gateway by process name, and it now stops the gateway through `CheckIfAppIsRunning` at its installed path. The comment above the check says so.
- The upstream change is tauri-apps/tauri#14479, first released in Tauri CLI 2.12.0.
- The template now needs Tauri CLI 2.12.0 or later. An older CLI generates the name-based check, which never matches a full path, so its installers would not stop a running app.
jozef2svrcek added a commit to specure/lpdo that referenced this pull request Oct 8, 2026
…371)

The v0.23.0 release's Windows job failed in makensis: "macro named
RestartManager_StartSession not found". Tauri CLI 2.12 (Dependabot #358)
generates an installer whose CheckIfAppIsRunning uses the Windows Restart
Manager (tauri-apps/tauri#14479), a macro the nsis_tauri_utils v0.5.3 it
ships does not have — upstream, with no custom template here.

@tauri-apps/cli is pinned to exactly 2.11.5 (the tauri crates stay at
2.12) and Dependabot told to leave it below 2.12 until a Tauri release
builds the installer again.


Claude-Session: https://claude.ai/code/session_01UF8bgHXeVC7EJk7AitS1Pr

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
itsMattGuenther added a commit to itsMattGuenther/Linger that referenced this pull request Nov 3, 2026
… Tauri 2.12's check closes it (#836)

Tauri CLI 2.12's NSIS template checks for a running app with Restart
Manager and force-closes every process holding the program file, where
2.11 closed only processes named like it (tauri-apps/tauri#14479). So
Explorer reading the icon, the compatibility scanner, or Linger still
quitting after starting an update would be closed, or fail the update with
"Failed to kill" (tauri-apps/tauri#16277, expected behavior to Tauri).
The package check's busy case found it: the uninstaller's check closed the
check itself, which held the program.

LINGER_WAIT_WHILE_HELD asks Restart Manager the same question first and
waits up to ten seconds while anything holds the program, before the
template's check, in PREINSTALL and a new PREUNINSTALL. The hooks are
checked against 2.12.4's template and name it, so the test that they name
the pinned CLI passes. docs/windows-update-checks.md has the details.
itsMattGuenther added a commit to itsMattGuenther/Linger that referenced this pull request Nov 4, 2026
…nswers to what it changed (#836) (#850)

* test(upgrade): checks for the Tauri 2.12 upgrade: matching versions, links in the iPhone simulator, an Xcode 27 canary (#835)

Before Tauri moves (#788), the checks that prove each later step:

- scripts/tauri-versions.mjs fails when the tauri crate, @tauri-apps/api
  and @tauri-apps/cli, or a plugin's crate and package, are on different
  major.minor versions in the two lockfiles, or when it can't read them.
  check.sh and the rules job run it.
- Two iPhone simulator flows open a linger://invite link with the app open
  (link-open) and with it closed (link-closed), and wait for the first
  screen to say the box holds a link. Under the scene life cycle a link
  that starts the app may be lost (tauri-apps/tao#1248); this is the check.
- scripts/ios-flows.test.mjs checks here that every flow is in
  config.yaml's order and the development guide's list, since the flows
  only run on a Mac after a long build.
- ios-simulator.yml takes an xcode input when run by hand: 27.1 builds on
  GitHub's xcode-27 image, the canary for Apple's iOS 27 SDK rule. Pull
  requests and the nightly run stay on Xcode 26.6.
- docs/testing-strategy.md: the new checks, and why updating from the
  release before is checked by hand on a draft release (only main and tags
  can sign an update).

* build(deps): Tauri 2.12, its Rust crates and JavaScript packages together (#836)

tauri 2.12.5 and tauri-build 2.7.4 (tao 0.37.2, wry 0.57.1), with every
plugin at its release for 2.12: deep-link 2.6.3, notification 2.8.0,
opener 2.7.2 (2.7.1 or later links with Xcode 27), single-instance 2.5.5,
updater 2.14.1, window-state 2.5.0. On the JavaScript side, @tauri-apps/cli
and @tauri-apps/api 2.12.4, plugin-notification 2.8.0, plugin-opener 2.7.2.
scripts/tauri-versions.mjs (#835) says the two sides match.

Cargo.toml's minimums are raised to these, so a lockfile can't fall back
below what the code was checked with.

Tauri's drag.js is the same in 2.12.5, so the browser tests' copy of it
(tests/browser/tauri-drag.ts) only moves its version. The 2.12 CLI writes
gen/apple/.tauri/ during iPhone builds, so it's ignored there (Android's
.gitignore already had it). The MSI template is unchanged in 2.12.4.

* fix(icons): the app icons as Tauri 2.12's CLI makes them, and check.sh checks them (#836)

The package check's "Approved artwork is current" failed on the 2.12 branch:
the pinned CLI now writes the icons differently. Regenerated with
scripts/app-icons.mjs, as docs/development.md says. The PNGs are the same
pixels, compressed differently, except Android's hdpi launcher icon, now
72x72 as hdpi should be (2.11.4 wrote 49x49), and the launcher background
written #131A28 (the same color).

Only CI's package check asked this, so a Tauri upgrade that draws the icons
differently showed there first. check.sh now runs it whenever the packages
would be rebuilt, quietly unless it fails.

* fix(ios): the iPhone app declares linger:// in Info.ios.plist, so every build takes links (#835)

The new simulator flow found it: opening linger://invite failed with
LSApplicationWorkspaceErrorDomain 115, no app for the scheme. The scheme was
only in tauri.conf.json, and the deep-link plugin writes it into gen/apple's
Info.plist from its build script, which runs only when its inputs change. A
build restored from the cache, as CI's are, skips it, and the app comes out
without the scheme. ios.yml's TestFlight builds use the same cache, so a
TestFlight build may have shipped without it too.

Info.ios.plist is merged into every build, so it's declared there now, and
scripts/ios-plist.test.mjs (check.sh and the rules job) fails when a scheme
the plugin opens on a phone isn't. Its strict plist reader fails on anything
it can't read.

Also a test that the Windows installer files built on Tauri's templates
(main.wxs, installer-hooks.nsh) name the CLI they were checked against, so
an upgrade can't pass until somebody has compared them.

* fix(ci): the Xcode 27 canary keeps a Rust cache of its own (#835)

Its first run failed linking: the cache restored build scripts' output from
Xcode 26.6 builds, which named Xcode 26.6's libraries, and the xcode-27 Mac
has none. Run with -f xcode=27.1, the cache key is xcode-27; Xcode 26.6
keeps the cache it had, so pull requests still build warm.

* build(windows): the MSI template is Tauri CLI 2.12.4's, the same file as 2.11.4's (#836)

Checked against both tags: crates/tauri-bundler/.../msi/main.wxs has the
same blob. installer-hooks.nsh still names 2.11.4: 2.12's NSIS template
changed, and the hooks aren't checked against it yet, so the test that
they name the CLI keeps failing on this branch until they are (#836).

* fix(ios): the link flows answer iOS's "Open in Linger?" (#835)

On a run where the scheme was there, the link still didn't arrive: iOS
asks before an app opens a link from outside it, and the flows never
tapped Open (the screen at the end showed the question). Both flows tap
it now, optionally, so a run where iOS doesn't ask still goes on.

scripts/ios-flows.test.mjs fails when a flow opens a linger:// link and
its next command isn't that tap.

* fix(windows): an install or uninstall waits for a held program before Tauri 2.12's check closes it (#836)

Tauri CLI 2.12's NSIS template checks for a running app with Restart
Manager and force-closes every process holding the program file, where
2.11 closed only processes named like it (tauri-apps/tauri#14479). So
Explorer reading the icon, the compatibility scanner, or Linger still
quitting after starting an update would be closed, or fail the update with
"Failed to kill" (tauri-apps/tauri#16277, expected behavior to Tauri).
The package check's busy case found it: the uninstaller's check closed the
check itself, which held the program.

LINGER_WAIT_WHILE_HELD asks Restart Manager the same question first and
waits up to ten seconds while anything holds the program, before the
template's check, in PREINSTALL and a new PREUNINSTALL. The hooks are
checked against 2.12.4's template and name it, so the test that they name
the pinned CLI passes. docs/windows-update-checks.md has the details.

* fix(shell): a start that fails says why and exits, without a panic (#836)

single-instance 2.5.5 returns an error when a second copy started for a
link can't hand it to the copy running, where 2.4 exited quietly, and
lib.rs's expect() turned that into a panic message. Matt's call: exit
quietly again. Any failed start now prints one line and exits 1.

Checked by reading: the case needs two copies of the app and a D-Bus
session that doesn't answer, which no test here can set up.

* fix(checks): the upgrade checks' readers skip nothing they can't justify, and the update check is after publishing (#835)

Greptile on #841, three real catches:
- scripts/tauri-versions.mjs passed over a section of the lockfile it didn't
  know and an entry with no version, so a misspelled dependencies: dropped
  every plugin in it and passed. It now reads only the sections it knows,
  reads past the two that hold no versions, and fails on the rest.
- scripts/ios-flows.test.mjs took a flowsOrder under any key; only
  executionOrder's is the order Maestro reads.
- docs/testing-strategy.md said to check updating from the release before
  on a draft, which no installed copy can see. It's the day after
  publishing, as docs/releasing.md step 4 already says.

Missed because the question for the first kind was asked and answered by
the lines read, not the ones skipped, and the doc step was never checked
against the updater. The question now asks for every skip to be justified,
a new one asks whether each step a doc gives works as written, and both
catches are in docs/review-catches.md.

* fix(ios): build tao from Linger's own copy with the cold-start link fix, until tao releases it (#836, #838)

On Tauri 2.12 (tao 0.37), an iPhone on iOS 26 or later lost a linger://
link that starts Linger: the simulator's link-closed flow failed on 2.12 and
passes on 2.11. tao's fix, tauri-apps/tao#1376, is under review with no
date. Matt's call: don't wait.

- client/src-tauri/Cargo.toml takes tao from itsMattGuenther/tao, 0.37.2
  with #1376's two commits, pinned by commit ([patch.crates-io]). Only tao's
  iPhone code changes; every other platform builds the same tao.
- scripts/tauri-versions.mjs fails if Cargo.lock doesn't build a pinned crate
  from its pin, since Cargo drops a pin that stops fitting with only a
  warning, and when a pin names no upstream pull request to wait for.
- scripts/upstream-fixes.mjs, in a new nightly job, opens an issue once the
  fix is in a tao release, or its pull request is closed without it.
- docs/decisions.md records it; docs/testing-strategy.md the two checks.

* fix(ios): Linger stays when iOS lets go of its scene, and opens its window again when it comes back (#836)

On Tauri 2.12, tao 0.37 runs the iPhone app on scenes from iOS 26 even
without a manifest, and reports a scene iOS discards in the background as
the window destroyed (tauri-apps/tao#1261). With no window left Tauri asked
to quit, so Linger was gone, and coming back started it over: the
simulator's share flow, which leaves Linger in the background while it
shares, found a fresh copy where 2.11 had kept the same one.

The run loop now answers Tauri's events (on_run_event, phone_scene.rs): on
an iPhone, a quit asked for because the last window went (no exit code) is
refused, and when iOS brings the scene back (SceneRequested) the window
tauri.ios.conf.json declares opens again; tao puts a new window in a
connected scene that has none. The page loads again; the sign-ins,
connections and any call, kept in Rust, carry on. Both say so in the log.

The answers are tested here (phone_scene's tests); the glue only runs on an
iPhone, so the simulator's share flow is its check.

* fix(checks): the pin readers take every form, and the phone's voice isn't said to survive (#836)

Greptile on #850, three catches:

- tauri-versions.mjs read [patch.crates-io] only as written, so the same
  section written [patch."crates-io"] gave no pins and nothing checked
  them. It reads every TOML spelling of it, a comment after it included,
  and fails on any other patch form ([patch], [patch.<url>],
  [patch.crates-io.tao], [[patch.crates-io]], a dotted key).
- upstream-fixes.mjs read the first page of tags only, and stopped at
  the newest release without the fix. It reads every page (GitHub lists
  tags by name) and asks every release, oldest first, so one from an
  older line counts even when a newer one, cut elsewhere, lacks it.
- phone_scene.rs and docs/decisions.md said a call carries on when the
  page loads again. On a phone voice runs in the page and ends with it;
  staying in voice in the background is #851.

Logged in docs/review-catches.md; the every-form and platform questions
in docs/pr-questions.md name these.
itsMattGuenther added a commit to itsMattGuenther/Linger that referenced this pull request Nov 4, 2026
…ate (#838) (#853)

* test(upgrade): checks for the Tauri 2.12 upgrade: matching versions, links in the iPhone simulator, an Xcode 27 canary (#835)

Before Tauri moves (#788), the checks that prove each later step:

- scripts/tauri-versions.mjs fails when the tauri crate, @tauri-apps/api
  and @tauri-apps/cli, or a plugin's crate and package, are on different
  major.minor versions in the two lockfiles, or when it can't read them.
  check.sh and the rules job run it.
- Two iPhone simulator flows open a linger://invite link with the app open
  (link-open) and with it closed (link-closed), and wait for the first
  screen to say the box holds a link. Under the scene life cycle a link
  that starts the app may be lost (tauri-apps/tao#1248); this is the check.
- scripts/ios-flows.test.mjs checks here that every flow is in
  config.yaml's order and the development guide's list, since the flows
  only run on a Mac after a long build.
- ios-simulator.yml takes an xcode input when run by hand: 27.1 builds on
  GitHub's xcode-27 image, the canary for Apple's iOS 27 SDK rule. Pull
  requests and the nightly run stay on Xcode 26.6.
- docs/testing-strategy.md: the new checks, and why updating from the
  release before is checked by hand on a draft release (only main and tags
  can sign an update).

* build(deps): Tauri 2.12, its Rust crates and JavaScript packages together (#836)

tauri 2.12.5 and tauri-build 2.7.4 (tao 0.37.2, wry 0.57.1), with every
plugin at its release for 2.12: deep-link 2.6.3, notification 2.8.0,
opener 2.7.2 (2.7.1 or later links with Xcode 27), single-instance 2.5.5,
updater 2.14.1, window-state 2.5.0. On the JavaScript side, @tauri-apps/cli
and @tauri-apps/api 2.12.4, plugin-notification 2.8.0, plugin-opener 2.7.2.
scripts/tauri-versions.mjs (#835) says the two sides match.

Cargo.toml's minimums are raised to these, so a lockfile can't fall back
below what the code was checked with.

Tauri's drag.js is the same in 2.12.5, so the browser tests' copy of it
(tests/browser/tauri-drag.ts) only moves its version. The 2.12 CLI writes
gen/apple/.tauri/ during iPhone builds, so it's ignored there (Android's
.gitignore already had it). The MSI template is unchanged in 2.12.4.

* fix(icons): the app icons as Tauri 2.12's CLI makes them, and check.sh checks them (#836)

The package check's "Approved artwork is current" failed on the 2.12 branch:
the pinned CLI now writes the icons differently. Regenerated with
scripts/app-icons.mjs, as docs/development.md says. The PNGs are the same
pixels, compressed differently, except Android's hdpi launcher icon, now
72x72 as hdpi should be (2.11.4 wrote 49x49), and the launcher background
written #131A28 (the same color).

Only CI's package check asked this, so a Tauri upgrade that draws the icons
differently showed there first. check.sh now runs it whenever the packages
would be rebuilt, quietly unless it fails.

* fix(ios): the iPhone app declares linger:// in Info.ios.plist, so every build takes links (#835)

The new simulator flow found it: opening linger://invite failed with
LSApplicationWorkspaceErrorDomain 115, no app for the scheme. The scheme was
only in tauri.conf.json, and the deep-link plugin writes it into gen/apple's
Info.plist from its build script, which runs only when its inputs change. A
build restored from the cache, as CI's are, skips it, and the app comes out
without the scheme. ios.yml's TestFlight builds use the same cache, so a
TestFlight build may have shipped without it too.

Info.ios.plist is merged into every build, so it's declared there now, and
scripts/ios-plist.test.mjs (check.sh and the rules job) fails when a scheme
the plugin opens on a phone isn't. Its strict plist reader fails on anything
it can't read.

Also a test that the Windows installer files built on Tauri's templates
(main.wxs, installer-hooks.nsh) name the CLI they were checked against, so
an upgrade can't pass until somebody has compared them.

* fix(ci): the Xcode 27 canary keeps a Rust cache of its own (#835)

Its first run failed linking: the cache restored build scripts' output from
Xcode 26.6 builds, which named Xcode 26.6's libraries, and the xcode-27 Mac
has none. Run with -f xcode=27.1, the cache key is xcode-27; Xcode 26.6
keeps the cache it had, so pull requests still build warm.

* build(windows): the MSI template is Tauri CLI 2.12.4's, the same file as 2.11.4's (#836)

Checked against both tags: crates/tauri-bundler/.../msi/main.wxs has the
same blob. installer-hooks.nsh still names 2.11.4: 2.12's NSIS template
changed, and the hooks aren't checked against it yet, so the test that
they name the CLI keeps failing on this branch until they are (#836).

* fix(ios): the link flows answer iOS's "Open in Linger?" (#835)

On a run where the scheme was there, the link still didn't arrive: iOS
asks before an app opens a link from outside it, and the flows never
tapped Open (the screen at the end showed the question). Both flows tap
it now, optionally, so a run where iOS doesn't ask still goes on.

scripts/ios-flows.test.mjs fails when a flow opens a linger:// link and
its next command isn't that tap.

* fix(windows): an install or uninstall waits for a held program before Tauri 2.12's check closes it (#836)

Tauri CLI 2.12's NSIS template checks for a running app with Restart
Manager and force-closes every process holding the program file, where
2.11 closed only processes named like it (tauri-apps/tauri#14479). So
Explorer reading the icon, the compatibility scanner, or Linger still
quitting after starting an update would be closed, or fail the update with
"Failed to kill" (tauri-apps/tauri#16277, expected behavior to Tauri).
The package check's busy case found it: the uninstaller's check closed the
check itself, which held the program.

LINGER_WAIT_WHILE_HELD asks Restart Manager the same question first and
waits up to ten seconds while anything holds the program, before the
template's check, in PREINSTALL and a new PREUNINSTALL. The hooks are
checked against 2.12.4's template and name it, so the test that they name
the pinned CLI passes. docs/windows-update-checks.md has the details.

* fix(shell): a start that fails says why and exits, without a panic (#836)

single-instance 2.5.5 returns an error when a second copy started for a
link can't hand it to the copy running, where 2.4 exited quietly, and
lib.rs's expect() turned that into a panic message. Matt's call: exit
quietly again. Any failed start now prints one line and exits 1.

Checked by reading: the case needs two copies of the app and a D-Bus
session that doesn't answer, which no test here can set up.

* fix(checks): the upgrade checks' readers skip nothing they can't justify, and the update check is after publishing (#835)

Greptile on #841, three real catches:
- scripts/tauri-versions.mjs passed over a section of the lockfile it didn't
  know and an entry with no version, so a misspelled dependencies: dropped
  every plugin in it and passed. It now reads only the sections it knows,
  reads past the two that hold no versions, and fails on the rest.
- scripts/ios-flows.test.mjs took a flowsOrder under any key; only
  executionOrder's is the order Maestro reads.
- docs/testing-strategy.md said to check updating from the release before
  on a draft, which no installed copy can see. It's the day after
  publishing, as docs/releasing.md step 4 already says.

Missed because the question for the first kind was asked and answered by
the lines read, not the ones skipped, and the doc step was never checked
against the updater. The question now asks for every skip to be justified,
a new one asks whether each step a doc gives works as written, and both
catches are in docs/review-catches.md.

* fix(ios): build tao from Linger's own copy with the cold-start link fix, until tao releases it (#836, #838)

On Tauri 2.12 (tao 0.37), an iPhone on iOS 26 or later lost a linger://
link that starts Linger: the simulator's link-closed flow failed on 2.12 and
passes on 2.11. tao's fix, tauri-apps/tao#1376, is under review with no
date. Matt's call: don't wait.

- client/src-tauri/Cargo.toml takes tao from itsMattGuenther/tao, 0.37.2
  with #1376's two commits, pinned by commit ([patch.crates-io]). Only tao's
  iPhone code changes; every other platform builds the same tao.
- scripts/tauri-versions.mjs fails if Cargo.lock doesn't build a pinned crate
  from its pin, since Cargo drops a pin that stops fitting with only a
  warning, and when a pin names no upstream pull request to wait for.
- scripts/upstream-fixes.mjs, in a new nightly job, opens an issue once the
  fix is in a tao release, or its pull request is closed without it.
- docs/decisions.md records it; docs/testing-strategy.md the two checks.

* fix(ios): Linger stays when iOS lets go of its scene, and opens its window again when it comes back (#836)

On Tauri 2.12, tao 0.37 runs the iPhone app on scenes from iOS 26 even
without a manifest, and reports a scene iOS discards in the background as
the window destroyed (tauri-apps/tao#1261). With no window left Tauri asked
to quit, so Linger was gone, and coming back started it over: the
simulator's share flow, which leaves Linger in the background while it
shares, found a fresh copy where 2.11 had kept the same one.

The run loop now answers Tauri's events (on_run_event, phone_scene.rs): on
an iPhone, a quit asked for because the last window went (no exit code) is
refused, and when iOS brings the scene back (SceneRequested) the window
tauri.ios.conf.json declares opens again; tao puts a new window in a
connected scene that has none. The page loads again; the sign-ins,
connections and any call, kept in Rust, carry on. Both say so in the log.

The answers are tested here (phone_scene's tests); the glue only runs on an
iPhone, so the simulator's share flow is its check.

* feat(ios): the iPhone app declares UIKit's scene life cycle, run by tao's delegate (#838)

From April 2027 Apple takes only builds made with the iOS 27 SDK, and such
a build that doesn't declare the scene life cycle won't launch (TN3187).
iOS checks the Info.plist, not what the app does, so Info.ios.plist
declares it: one window, so one scene, run by TaoSceneDelegate in a
configuration named outright (an empty one is reported to crash at launch
on the iOS 27 SDK, tauri-apps/tauri#15719).

scripts/ios-plist.test.mjs fails without it, or with it empty. docs/
decisions.md records it. It comes in on Xcode 26, so testers use scenes
before Xcode moves (#839).

* fix(checks): the pin readers take every form, and the phone's voice isn't said to survive (#836)

Greptile on #850, three catches:

- tauri-versions.mjs read [patch.crates-io] only as written, so the same
  section written [patch."crates-io"] gave no pins and nothing checked
  them. It reads every TOML spelling of it, a comment after it included,
  and fails on any other patch form ([patch], [patch.<url>],
  [patch.crates-io.tao], [[patch.crates-io]], a dotted key).
- upstream-fixes.mjs read the first page of tags only, and stopped at
  the newest release without the fix. It reads every page (GitHub lists
  tags by name) and asks every release, oldest first, so one from an
  older line counts even when a newer one, cut elsewhere, lacks it.
- phone_scene.rs and docs/decisions.md said a call carries on when the
  page loads again. On a phone voice runs in the page and ends with it;
  staying in voice in the background is #851.

Logged in docs/review-catches.md; the every-form and platform questions
in docs/pr-questions.md name these.

* test(ios): the scene list is declared once, in Info.ios.plist, not also in gen/apple's (#838)
itsMattGuenther added a commit to itsMattGuenther/Linger that referenced this pull request Nov 4, 2026
…eping Linger's changes (#837) (#855)

* test(upgrade): checks for the Tauri 2.12 upgrade: matching versions, links in the iPhone simulator, an Xcode 27 canary (#835)

Before Tauri moves (#788), the checks that prove each later step:

- scripts/tauri-versions.mjs fails when the tauri crate, @tauri-apps/api
  and @tauri-apps/cli, or a plugin's crate and package, are on different
  major.minor versions in the two lockfiles, or when it can't read them.
  check.sh and the rules job run it.
- Two iPhone simulator flows open a linger://invite link with the app open
  (link-open) and with it closed (link-closed), and wait for the first
  screen to say the box holds a link. Under the scene life cycle a link
  that starts the app may be lost (tauri-apps/tao#1248); this is the check.
- scripts/ios-flows.test.mjs checks here that every flow is in
  config.yaml's order and the development guide's list, since the flows
  only run on a Mac after a long build.
- ios-simulator.yml takes an xcode input when run by hand: 27.1 builds on
  GitHub's xcode-27 image, the canary for Apple's iOS 27 SDK rule. Pull
  requests and the nightly run stay on Xcode 26.6.
- docs/testing-strategy.md: the new checks, and why updating from the
  release before is checked by hand on a draft release (only main and tags
  can sign an update).

* build(deps): Tauri 2.12, its Rust crates and JavaScript packages together (#836)

tauri 2.12.5 and tauri-build 2.7.4 (tao 0.37.2, wry 0.57.1), with every
plugin at its release for 2.12: deep-link 2.6.3, notification 2.8.0,
opener 2.7.2 (2.7.1 or later links with Xcode 27), single-instance 2.5.5,
updater 2.14.1, window-state 2.5.0. On the JavaScript side, @tauri-apps/cli
and @tauri-apps/api 2.12.4, plugin-notification 2.8.0, plugin-opener 2.7.2.
scripts/tauri-versions.mjs (#835) says the two sides match.

Cargo.toml's minimums are raised to these, so a lockfile can't fall back
below what the code was checked with.

Tauri's drag.js is the same in 2.12.5, so the browser tests' copy of it
(tests/browser/tauri-drag.ts) only moves its version. The 2.12 CLI writes
gen/apple/.tauri/ during iPhone builds, so it's ignored there (Android's
.gitignore already had it). The MSI template is unchanged in 2.12.4.

* fix(icons): the app icons as Tauri 2.12's CLI makes them, and check.sh checks them (#836)

The package check's "Approved artwork is current" failed on the 2.12 branch:
the pinned CLI now writes the icons differently. Regenerated with
scripts/app-icons.mjs, as docs/development.md says. The PNGs are the same
pixels, compressed differently, except Android's hdpi launcher icon, now
72x72 as hdpi should be (2.11.4 wrote 49x49), and the launcher background
written #131A28 (the same color).

Only CI's package check asked this, so a Tauri upgrade that draws the icons
differently showed there first. check.sh now runs it whenever the packages
would be rebuilt, quietly unless it fails.

* fix(ios): the iPhone app declares linger:// in Info.ios.plist, so every build takes links (#835)

The new simulator flow found it: opening linger://invite failed with
LSApplicationWorkspaceErrorDomain 115, no app for the scheme. The scheme was
only in tauri.conf.json, and the deep-link plugin writes it into gen/apple's
Info.plist from its build script, which runs only when its inputs change. A
build restored from the cache, as CI's are, skips it, and the app comes out
without the scheme. ios.yml's TestFlight builds use the same cache, so a
TestFlight build may have shipped without it too.

Info.ios.plist is merged into every build, so it's declared there now, and
scripts/ios-plist.test.mjs (check.sh and the rules job) fails when a scheme
the plugin opens on a phone isn't. Its strict plist reader fails on anything
it can't read.

Also a test that the Windows installer files built on Tauri's templates
(main.wxs, installer-hooks.nsh) name the CLI they were checked against, so
an upgrade can't pass until somebody has compared them.

* fix(ci): the Xcode 27 canary keeps a Rust cache of its own (#835)

Its first run failed linking: the cache restored build scripts' output from
Xcode 26.6 builds, which named Xcode 26.6's libraries, and the xcode-27 Mac
has none. Run with -f xcode=27.1, the cache key is xcode-27; Xcode 26.6
keeps the cache it had, so pull requests still build warm.

* build(windows): the MSI template is Tauri CLI 2.12.4's, the same file as 2.11.4's (#836)

Checked against both tags: crates/tauri-bundler/.../msi/main.wxs has the
same blob. installer-hooks.nsh still names 2.11.4: 2.12's NSIS template
changed, and the hooks aren't checked against it yet, so the test that
they name the CLI keeps failing on this branch until they are (#836).

* fix(ios): the link flows answer iOS's "Open in Linger?" (#835)

On a run where the scheme was there, the link still didn't arrive: iOS
asks before an app opens a link from outside it, and the flows never
tapped Open (the screen at the end showed the question). Both flows tap
it now, optionally, so a run where iOS doesn't ask still goes on.

scripts/ios-flows.test.mjs fails when a flow opens a linger:// link and
its next command isn't that tap.

* fix(windows): an install or uninstall waits for a held program before Tauri 2.12's check closes it (#836)

Tauri CLI 2.12's NSIS template checks for a running app with Restart
Manager and force-closes every process holding the program file, where
2.11 closed only processes named like it (tauri-apps/tauri#14479). So
Explorer reading the icon, the compatibility scanner, or Linger still
quitting after starting an update would be closed, or fail the update with
"Failed to kill" (tauri-apps/tauri#16277, expected behavior to Tauri).
The package check's busy case found it: the uninstaller's check closed the
check itself, which held the program.

LINGER_WAIT_WHILE_HELD asks Restart Manager the same question first and
waits up to ten seconds while anything holds the program, before the
template's check, in PREINSTALL and a new PREUNINSTALL. The hooks are
checked against 2.12.4's template and name it, so the test that they name
the pinned CLI passes. docs/windows-update-checks.md has the details.

* fix(shell): a start that fails says why and exits, without a panic (#836)

single-instance 2.5.5 returns an error when a second copy started for a
link can't hand it to the copy running, where 2.4 exited quietly, and
lib.rs's expect() turned that into a panic message. Matt's call: exit
quietly again. Any failed start now prints one line and exits 1.

Checked by reading: the case needs two copies of the app and a D-Bus
session that doesn't answer, which no test here can set up.

* fix(checks): the upgrade checks' readers skip nothing they can't justify, and the update check is after publishing (#835)

Greptile on #841, three real catches:
- scripts/tauri-versions.mjs passed over a section of the lockfile it didn't
  know and an entry with no version, so a misspelled dependencies: dropped
  every plugin in it and passed. It now reads only the sections it knows,
  reads past the two that hold no versions, and fails on the rest.
- scripts/ios-flows.test.mjs took a flowsOrder under any key; only
  executionOrder's is the order Maestro reads.
- docs/testing-strategy.md said to check updating from the release before
  on a draft, which no installed copy can see. It's the day after
  publishing, as docs/releasing.md step 4 already says.

Missed because the question for the first kind was asked and answered by
the lines read, not the ones skipped, and the doc step was never checked
against the updater. The question now asks for every skip to be justified,
a new one asks whether each step a doc gives works as written, and both
catches are in docs/review-catches.md.

* fix(ios): build tao from Linger's own copy with the cold-start link fix, until tao releases it (#836, #838)

On Tauri 2.12 (tao 0.37), an iPhone on iOS 26 or later lost a linger://
link that starts Linger: the simulator's link-closed flow failed on 2.12 and
passes on 2.11. tao's fix, tauri-apps/tao#1376, is under review with no
date. Matt's call: don't wait.

- client/src-tauri/Cargo.toml takes tao from itsMattGuenther/tao, 0.37.2
  with #1376's two commits, pinned by commit ([patch.crates-io]). Only tao's
  iPhone code changes; every other platform builds the same tao.
- scripts/tauri-versions.mjs fails if Cargo.lock doesn't build a pinned crate
  from its pin, since Cargo drops a pin that stops fitting with only a
  warning, and when a pin names no upstream pull request to wait for.
- scripts/upstream-fixes.mjs, in a new nightly job, opens an issue once the
  fix is in a tao release, or its pull request is closed without it.
- docs/decisions.md records it; docs/testing-strategy.md the two checks.

* fix(ios): Linger stays when iOS lets go of its scene, and opens its window again when it comes back (#836)

On Tauri 2.12, tao 0.37 runs the iPhone app on scenes from iOS 26 even
without a manifest, and reports a scene iOS discards in the background as
the window destroyed (tauri-apps/tao#1261). With no window left Tauri asked
to quit, so Linger was gone, and coming back started it over: the
simulator's share flow, which leaves Linger in the background while it
shares, found a fresh copy where 2.11 had kept the same one.

The run loop now answers Tauri's events (on_run_event, phone_scene.rs): on
an iPhone, a quit asked for because the last window went (no exit code) is
refused, and when iOS brings the scene back (SceneRequested) the window
tauri.ios.conf.json declares opens again; tao puts a new window in a
connected scene that has none. The page loads again; the sign-ins,
connections and any call, kept in Rust, carry on. Both say so in the log.

The answers are tested here (phone_scene's tests); the glue only runs on an
iPhone, so the simulator's share flow is its check.

* build(android): the Android project on Tauri 2.12's template, keeping Linger's changes (#837)

Carried over from 2.12.4's template, generated in a scratch folder, never
over gen/: Gradle 9.6.1 and its wrapper, Android Gradle Plugin 9.3.1,
Kotlin 2.2.10, gradle.properties' new settings, BuildTask.kt and
RustPlugin.kt for the configuration cache, and app/build.gradle.kts'
optimization, compilerOptions and file() apply.

Kept: release and Play signing (T-1604) in app/build.gradle.kts, merged by
hand into 2.12's release block; BuildTask's pnpm command; compileSdk and
targetSdk at 36 (37 is Matt's call, #837). The manifest, MainActivity,
proguard rules and Linger's own Kotlin are unchanged, as 2.12 didn't change
them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants