Repository navigation
ShellHost & Launcher: hot-load signed game frameworks from Documents/Frameworks - #1217
Merged
Merged
Conversation
LNPANDY
force-pushed
the
feat/ios-hot-framework-load
branch
from
November 12, 2026 16:06
699fc00 to
4b6b2b0
Compare
LNPANDY
added a commit
that referenced
this pull request
Nov 12, 2026
…Frameworks Promote staged game frameworks inside Documents/Frameworks atomically once .ready matches the signed file count and byte total, merge writable hot frameworks with bundled frameworks while reclaiming redundant copies after a full rebuild or re-sign, inspect Mach-O LC_CODE_SIGNATURE and team IDs before dlopen to avoid fatal codesigning kills on non-JIT iOS, and add ~2-second direct codesign plus hot delivery across macOS install, installBuilt, and installBatch with automatic fallback to xcodebuild.
LNPANDY
force-pushed
the
feat/shared-ipa-repack-and-ext-msl
branch
from
November 12, 2026 19:45
0a36e25 to
0d9e398
Compare
LNPANDY
force-pushed
the
feat/ios-hot-framework-load
branch
from
November 12, 2026 19:45
4b6b2b0 to
2b1615e
Compare
LNPANDY
changed the base branch from
feat/shared-ipa-repack-and-ext-msl
to
main
November 12, 2026 20:07
LNPANDY
added a commit
that referenced
this pull request
Nov 12, 2026
4 of 5 tasks
3 of 4 tasks
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.
Summary
Part 4 of the 4-PR patch queue slimming and shared-app delivery stack (stacked on #1216, following #1214 and #1215).
Lands fast hot-framework loading and delivery inspired by #1165 with zero new engine patches and zero extra Swift packages:
Documents/Frameworksdiscovery and promotion (GameCatalogue,ShellHostModel):GameCatalogue.promoteStagedFrameworks(in:)verifies.staging-<ID>-<token>/.ready(schema: 1,titleID, regular file count, and byte total) before atomically promotingDmGame<ID>.frameworkintoDocuments/Frameworks/. Incomplete transfers without.readystay untouched while recent, and damaged stagings are discarded safely.GameCatalogue.scan(root:hotRoot:)merges writableDocuments/Frameworks/bundles with read-onlyDmShell.app/Frameworks/bundles: a newer hot build overrides an older bundled copy, whereas a later full app build or re-sign that embeds an equal or newerbuilt_atautomatically reclaims the redundant hot copy fromDocuments/Frameworks/.ShellHostModelphysically removes its writableDocuments/Frameworks/DmGame<ID>.frameworkbundle and suppresses any older bundled copy inDmShell.app/Frameworks/. Returning to the foreground refreshes the library so newly pushed games appear right away.ProvisioningProfile,ShellApp.swift,ShellMain.m):DmShellwritesDocuments/.shell-host.jsonoff the main thread with its bundle ID, signing team ID, glue ABI version, shader chain, and provisioning expiration epoch.dlopen,FrameworkSignature.preflightExternalinspects the external Mach-OLC_CODE_SIGNATURESuperBlob andCS_CodeDirectoryteamOffsetin user space: team-signed hosts reject unsigned or mismatched-team external frameworks with a localized 10-language message instead of hitting a fatalEXC_BAD_ACCESS (CODESIGNING)kernel kill on non-JIT iOS, while TrollStore / profile-less installs accept ad-hoc signed frameworks directly.ShellMain.malso registers external signatures viaF_ADDFILESIGS_RETURNbeforedlopenand blocks re-entering a hot-updated framework inside the same running process with a clean restart prompt.ShellHotInstall,ShellInstall,ShellInstall+Batch):install,installBuilt, and multi-gameinstallBatch, whenDmShellis already installed on the paired device under the same signing team (Documents/.shell-host.json), at least 24 hours remain on its provisioning profile, this Mac holds the matchingApple Developmentcertificate, and the built framework carries its own host (loader == "FH"),ShellInstallersignsDmGame<ID>.frameworkdirectly withcodesignand copies it toDocuments/Frameworks/.staging-<ID>-<token>/followed by.readyas the final step, skippingxcodebuildand full.appreinstallation.xcodebuild+devicectl device install apppipeline.Verification
python3 tools/engine.py check-> 42 patches apply cleanly (0 new patches added).python3 tools/l10n_shell_catalogs.py --checkandtest_localization_rules.py-> all 10 language JSON files andLocalizable.xcstringsverified.swift test --package-path frontend-ios --filter "HotFrameworkTests|ShellStringsTests|GameDeletionTests"-> PASS (including realclang -dynamiclib+codesignMach-O signature inspection tests and negative verification).swift test --package-path frontend --filter "ShellHotInstallTests|ShellInstallTests|SourceSizeTests"-> PASS (including all 5 fallback boundaries,install/installBuilt/installBatchcoverage,< 800line limit check, and negative verification).python3 -m unittest frontend-qt/tests/test_swift_parity.py-> realbuild_shell.shiOSDmShell.apptemplate compilation PASS.