Repository navigation
Conversation
A device build ends in `devicectl device install app`, so it never writes an .ipa: deleting the app on the phone meant a full rebuild (extraction, shaders, signing) to get it back, and nothing could hand the signed build to another Mac or a sideloader. The signed .app already sits in xcode-derived-data. The install card now has: - Reinstall: `devicectl device install app` of that app as it is — no unpack, no signing, no packing. The bundle ID does not change, so the device keeps the app's Documents (game data and saves). - Save IPA…: NSSavePanel, then the app as Payload/<name>.app, an ordinary IPA a sideloader or another Mac installs while the signature lasts. The game data is not in it (it stays in Documents/romfs.img), and --norsrc keeps __MACOSX out. A missing cached app, an expired signature (devicectl's own error line) and a failed pack each say what happened and what to do, in both languages. Verified: swift test --package-path frontend -> 183 tests, 6 skipped, 0 failures (5 new: the reinstall command and that it does not build or pack again, the Payload zip listing, the two missing-app paths, the IPA name). Not verified: a real device (the owner's).
…ding A free Apple ID's provisioning profile lasts 7 days: the game stops starting a week after it was installed, and nothing in the launcher said when. A sideloader cannot renew it either, so the only way back was a full rebuild. The launcher now reads the date from the profile the install signed with (<app>/embedded.mobileprovision, `security cms -D`): - the game's status line says how many days are left, orange at two days or fewer, and the hero shows the date; - at two days or fewer the hero offers Re-sign: the install's xcodebuild line (same project, scheme, destination, derived data, team, DM_COPY_ROMFS=NO), which reuses every compiled product and only signs again, then devicectl installs the app over itself. PRODUCT_BUNDLE_IDENTIFIER is passed as the installed app's own, so the device keeps its Documents (game data, saves); - a missing cached project, no chosen team and a failed sign each say what happened and what to do (the certificate in Xcode → Settings → Accounts → Manage Certificates, or the network). Verified: swift test --package-path frontend -> 192 tests, 6 skipped, 0 failures (9 new: the profile parse, calendar-day count, urgency, the wording in both languages, the re-sign command and the paths derived from the installed app, the re-sign flow through the fake xcrun, and its missing-project/team paths). Not verified: a real 7-day expiry and a real re-sign on a device (the owner's).
Renewing an app's signature early is as valid as renewing it just in time (a trip, a demo, a device handed to someone else), and the owner asked for the button at any time. The hero shows the line for every app installed on a device; the count stays orange at two days or fewer, and the button is always there. When the profile cannot be read (an app signed by something else), the line says unknown and still offers the re-sign.
LNPANDY
force-pushed
the
task-145-reinstall-saveipa
branch
from
October 28, 2026 17:30
d99fff2 to
9fe5038
Compare
Owner
Author
|
#149 merged. This PR is stacked on its branch, which is now deleted; rebase |
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.
Second half of #145. Stacked on #149 (it edits the same install card and string table): review/merge #149 first, then retarget this to
main.A free Apple ID's provisioning profile lasts 7 days. The game stops starting a week after install, no sideloader can renew it, and the only way back was a full rebuild.
What changes
embedded.mobileprovision(CMS-wrapped plist) is read withsecurity cms -Dand itsExpirationDateshown: the game card's status line gets "· 3 days of signature left" (orange at two days or fewer, help text with the date), and the hero shows the full date. Whole calendar days, so the switch happens on the day iOS would refuse to start the app.xcodebuildline — same project, scheme, destination,-derivedDataPath,-allowProvisioningUpdates,DEVELOPMENT_TEAM,DM_COPY_ROMFS=NO— so Xcode reuses every compiled product and only signs again; thendevicectl device install appover itself.PRODUCT_BUNDLE_IDENTIFIERis passed as the installed app's own, not re-derived: the device keeps the app's Documents (game data, saves). The install's taken-App-ID retry must not run here for exactly that reason.<work>/xcode-derived-data/Build/Products/...), so no stored build state is needed.Verified
swift test --package-path frontend→ 192 tests, 6 skipped, 0 failures (L10n.selfCheck()included).xcrunfixture (one morexcodebuild -project, no second romfs pack, thendevicectl install), and the missing-project/no-team messages.Not verified