Skip to content

frontend: show iPhone activity title and preserve library state during iOS re-sign - #1028

Merged
LNPANDY merged 1 commit into
mainfrom
fix/ios-activity-bar-target
Nov 9, 2026
Merged

LNPANDY merged 1 commit into
mainfrom
fix/ios-activity-bar-target

Conversation

@LNPANDY

@LNPANDY LNPANDY commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Fixes #1059

Summary

  • Track the active operation's platform via BuildStore.runningTarget and distinguish full game builds (buildingGame = true) from standalone post-build iOS actions (resignOnDevice, reinstallOnDevice, saveIPA, sendGameData, copyToDrive, confirmShellMove).
  • Reset buildingGame = true at the start of every build pipeline entry point (run, verifyShellDevice, packArchive, exportShell, and installShell) and restore runningTarget = target when running returns to false, so OutcomeCard and BuildRecorder always see the expected target after a standalone action finishes.
  • Show activity.ios ("iPhone build in progress" / "正在构建 iPhone 版") in LauncherView.activityBar and BuildPage when running a standalone iOS action even while the Build page target selector sits on mac-app.
  • Avoid calling library.rememberInputs(m) or recordBuild() during standalone iOS re-sign/reinstall/copy/cache-move actions so the game left in the Build form is not falsely marked as ● BUILDING in the library hero and card row.

Testing

  • cd frontend && swift test --filter "BuildRecorderTests|ShellInstallTests|LibraryTests|SourceSizeTests" (and full test suite via pre-push hook)

@github-actions github-actions Bot added the launcher The NX2Apple launcher app label Nov 9, 2026
@v0lumehi

v0lumehi commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

@LNPANDY this changes what the launcher shows, so please link or open an issue first. I also have two code questions.

  1. buildingGame is set back to true only in run and verifyShellDevice, not in packArchive, exportShell or installShell. After a standalone re-sign, a retry through shellRetry could skip rememberInputs and the notification. Please reset it there or explain why that cannot happen.
  2. runningTarget stays ios after a standalone action while the picker sits on mac. OutcomeCard and recordBuild now read it. Please add a test for that case, and tests for the other actions and for the library BUILDING state.

@LNPANDY
LNPANDY force-pushed the fix/ios-activity-bar-target branch 2 times, most recently from 6894be3 to 04f4821 Compare November 9, 2026 16:14
@LNPANDY

LNPANDY commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

Thanks for the review @v0lumehi! Addressed all points in the latest push:

  1. Linked issue:
  2. Resetting buildingGame = true in packArchive, exportShell, and installShell:
    • Added buildingGame = true at the start of packArchive (BuildStore+Archive.swift), exportShell (BuildStore+Export.swift), and installShell (BuildStore+Install.swift), in addition to run and verifyShellDevice. A data-copy retry (retryShellData -> installShell) or any subsequent archive/export/install step after a standalone re-sign now always has buildingGame == true.
  3. Restoring runningTarget after standalone actions and adding unit tests:
    • In BuildStore.running's didSet, when !running, runningTarget is restored to target so OutcomeCard and BuildRecorder never read a stale ios target while the picker sits on mac.
    • Added BuildRecorderTests.testStandaloneIOSActionsKeepMacTargetOutOfBuildingStateAndBuildStepsRestoreBuildingGame and updated ShellInstallTests to cover:
      • Running reinstallOnDevice, resignOnDevice, saveIPA, sendGameData, copyToDrive, and confirmShellMove while target == BuildTarget.mac with an unbuilt game in the Build form: verifying runningTarget == .ios and buildingGame == false during the action, recorder.activeBuildID == nil (the Build form's game is never marked as BUILDING in GameLibrary), and runningTarget == .mac once the action ends.
      • Verifying that packArchive, exportShell, and installShell reset buildingGame back to true after a standalone action.

@LNPANDY
LNPANDY force-pushed the fix/ios-activity-bar-target branch from 04f4821 to 782bc43 Compare November 9, 2026 22:03
@LNPANDY
LNPANDY merged commit e43c6d6 into main Nov 9, 2026
16 checks passed
@LNPANDY
LNPANDY deleted the fix/ios-activity-bar-target branch November 9, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

launcher The NX2Apple launcher app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standalone iOS re-sign or reinstall shows 'Mac build in progress' and marks the Build form's game as BUILDING when target sits on mac-app

2 participants