Repository navigation
Install: reinstall from the library or a saved IPA, and tell whether the game is still on the phone - #155
Merged
Conversation
LNPANDY
force-pushed
the
task-145-resign-expiry
branch
from
October 28, 2026 17:50
a479e77 to
544a9c2
Compare
LNPANDY
force-pushed
the
install-reinstall-on-phone
branch
from
October 28, 2026 17:50
76c0109 to
4118a84
Compare
…the phone has Three gaps the owner hit after installing a game: - The build-complete card was the only place with Reinstall. Most reinstalls happen long after the build, when derived data or the build folder may be gone. Manage now has Reinstall for any game recorded on a device, whether or not the cached app is still there. - Reinstall only knew the signed .app from the last build. It now falls back to the IPA the player saved with Save IPA… (recorded per game), and with neither it opens a file picker for an .ipa. An IPA is unpacked (Payload/*.app) to a temporary folder, installed, and the folder removed. - The library said "Open on <device>" for any game that had ever been installed, even after the player deleted it on the phone. It now reads `devicectl device info apps` per paired device (on launch, on selection after a minute, and after every install) and shows "not on <device> (deleted)", with Reinstall as the primary action, when the app is gone. A cleaned build folder no longer forgets where the game was installed (only the cached app path is cleared), and the bundle identifier an install used is recorded so the phone's list can be matched after the app is gone. Verified: swift test --package-path frontend -> 199 tests, 6 skipped, 0 failures (7 new: the install material choice, the device app-list parse and its unknown/empty cases, the IPA reinstall through the fake xcrun including the unpacked path and its cleanup, the install record outliving a cleaned build folder, the saved-IPA/bundle record through the library file, and the Manage row's presence and enabled state). The parsing was also checked against a real `devicectl device info apps --json-output -` capture from the owner's iPhone. Not verified: a real reinstall/picker run and the "not on the phone" state on a device (the owner's).
…t "not built"
Two things the owner saw on the collection card:
- Status and its notes ("· tool update · signature 3 days · not on the
phone") shared one HStack, and two notes were enough to truncate all
of them. The notes are their own row now, under the status, on the
hero and on the card.
- A game whose build folder was cleaned showed "Not built yet" even
though it was installed and can be put back (the install record, a
saved IPA, Manage → Reinstall all survive). A recorded install is a
state of its own: green "Installed before, can be reinstalled"
instead of grey "not built yet". The hero's primary action already
handles it (Reinstall); nothing else changes.
Verified: swift test --package-path frontend -> 248 tests, 7 skipped,
0 failures (1 new: the record survives pruneMissingPaths with no local
paths left, so the status reads the record, not the build folder).
LNPANDY
force-pushed
the
task-145-resign-expiry
branch
from
October 28, 2026 19:24
544a9c2 to
53aa99c
Compare
LNPANDY
force-pushed
the
install-reinstall-on-phone
branch
from
October 28, 2026 19:24
210eec3 to
ae53c60
Compare
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #149/#151 (stacked on #151; retarget to
mainonce the stack merges). Three gaps the owner hit:.app. It now falls back to the IPA saved with Save IPA… (recorded per game, so no picker next time), and with neither it opens Choose the IPA to install…. An IPA is unpacked to a temporary folder (Payload/*.app), installed withdevicectl, and the folder removed. The bundle identifier is read while the unpacked app still exists and recorded, so detection works afterwards.onDeviceonly checked the local record and cached app, so any game ever installed said "Open on ". The launcher now readsxcrun devicectl device info apps --device <UDID> --json-output -per paired device — on launch/devices change, on selection (one-minute cache), and after every install/reinstall/re-sign — and matches the recorded bundle identifier. When the phone no longer has it: the hero says "not on (deleted)" with Reinstall, the card's status line says "· not on ", and the primary button becomes "Reinstall on " instead of an Open that can only fail. When the phone cannot be read (unplugged, locked, old devicectl), nothing is claimed and the previous behaviour stands.Supporting changes:
installedDevice/installedBundleIDsurvive), which is what makes Manage → Reinstall reachable in the owner's scenario.LibraryGamegainsinstalledBundleIDandsavedIPAPath(both backward-compatible inlibrary.json).Verified
swift test --package-path frontend→ 199 tests, 6 skipped, 0 failures.result.apps[].bundleIdentifierparsing (list, empty list, missing key, garbage),isOnDevicetrue/false/unknown, the full IPA reinstall through the fakexcrun(unpacked path exists at install time,…/Payload/DmIOS.app, temp folder removed, bundle id recorded), the install record survivingpruneMissingPaths, the saved-IPA/bundle record through the library file, and the Manage row (present only with a recorded device, disabled while building).devicectl device info apps --json-output -):result.apps[].bundleIdentifier, e.g.com.xindong.torchlight2.Not verified
installedBundleID; the match falls back to the cached app's identifier, then toorg.nxnative.<titleID>, so a team-variant install from before this change can read as "not on the phone" until it is installed once more.