Repository navigation
iOS shell: art-led library, Cover Flow, settings and the host layer for iPhone and iPad - #226
Merged
Merged
Conversation
Collaborator
Author
v0lumehi
added a commit
that referenced
this pull request
Oct 29, 2026
v0lumehi
added a commit
that referenced
this pull request
Oct 29, 2026
This was referenced Oct 29, 2026
3 tasks done
v0lumehi
marked this pull request as draft
October 30, 2026 01:42
v0lumehi
added a commit
that referenced
this pull request
Oct 30, 2026
3 tasks done
This was referenced Oct 30, 2026
This was referenced Oct 30, 2026
v0lumehi
force-pushed
the
v0lumehi/ios-shell-ui-2
branch
from
October 30, 2026 23:03
ebd9441 to
afb70f7
Compare
3 of 5 tasks
v0lumehi
marked this pull request as ready for review
October 30, 2026 23:23
This was referenced Oct 31, 2026
Collaborator
Author
|
@LNPANDY this is ready for your review. CI is green on Since your last look:
It is installed on my iPhone with my games and saves. The screenshots in the description show the current state. This changes the product, so I will not merge it without your review. |
A choice row stays segmented only with 2 to 4 options whose labels fit their segment at the current width and text size (ChoicePresentation). Every other choice is a compact row with the current value and a chevron that opens a list of the options with a checkmark, in the shell's look and with the controller focus (A picks, B closes). The settings keep their Library button in a non-scrolling bar with an opaque backing, so scrolled content never shows under it. A test checks that a setting changed in the views reaches the engine's environment.
… and HUD changes into 0039
A game rebuilt since its last install had a fresh framework without banner.jpg, and only the game being installed got one.
main added the German catalog. The shell tests compare the notes with the app's own language.
…when it is off t_gfx_suspend and t_nvn link hle_nvn.c without the host stubs, so dm_prof() from 0042 was undefined there and the Mac host build check failed. Present snapshots (Frame buffering) now also log a line when they are off, so the log shows the setting in both states.
…y, with MetalFX's rows Metal reads MTL_HUD_ENABLED when the first device is made, and the library makes one long before Play. The shell now turns Metal's HUD on at every start and the game view sets its layer's HUD mode from DM_METAL_HUD, so a change in the library applies at the next Play. MTL_HUD_HIDE_METALFX_METRICS stays unset, so the HUD shows the MetalFX scaler while Upscaling is MetalFX. Every setting the shell passes is logged at boot. 0041 moves before 0039 so the front_ios.m change lives in the shell patch.
The shell's engine writes Documents/log.txt, which the log sheet never read, so it always said there is no log. It now shows that file when its first lines name the game's framework.
The shell app and the demo app had no icon on the home screen. Both now use frontend-ios/AppIcon.icon, a Liquid Glass icon made in Icon Composer. The shell project sets ASSETCATALOG_COMPILER_APPICON_NAME to AppIcon and the shell build test checks that the built app carries it.
… bar and Back The settings pane put Back in an opaque page-coloured bar above the banner, so the banner started below a black strip. Back now floats over the banner in its material chip and the banner starts at the top edge of the screen.
Both are overlays over the library, not a navigation stack, so UIKit's back swipe never applied to them. A UIScreenEdgePanGestureRecognizer on the window drags the open page with the finger. A swipe past a third of the page or a fling closes it, anything shorter springs back. The recognizer only starts at the screen edge, so sliders and the cover carousel are not affected.
… gone The Builds page has two targets now: This Mac, and iPhone / iPad. The iPhone / iPad card builds the game into the one shared app on the device (its subtitle: "One app on your iPhone or iPad for all your games."). The separate shared-app card and the per-game IPA target are removed, with the build path, the single-game sign-and-install, the transfer question, the install guide and their strings in every language. Older builds: a game that was built as its own app or IPA stays in the library and nothing on disk is deleted. It shows as "Older iPhone build". Build makes it again for the shared app, and Re-sign explains that instead of failing. A shared-app build clears the old IPA path. Settings: a saved "ios" or "ios-shell" build target (and a library game's last target) becomes the iPhone / iPad target. A missing value still means iPhone / iPad. scripts/build_ipa_from_nsp.py and frontend-qt are not touched.
The top bar sat 4 pt below the screen edge when the phone is turned, because there is no status bar there. It now sits 12 pt below it, and the space the cards keep clear follows the bar instead of a second number. The title and the chips already share one centred row. At the largest text sizes the glyph hints in that row wrapped into a tall block and the centred title and chips sank into the screen. The row now stops growing at xxLarge on a phone on its side, as the title under the card does.
… pre-build tests The Qt table follows Localization.swift again after the removed strings. The pre-build tests (failure rows, override, cloud folder) now choose the Mac target themselves, because the iPhone / iPad target stops first at the device check. The Qt escape test reads the unescape helper directly, as no table entry carries a tab any more.
…sh the runtime profile patch Main's series now uses 0034 to 0041 for other patches, so the route C patches (0034 to 0042 here) move to 0045 to 0053, keeping their order. The runtime profile patch (now 0053) is refreshed onto the current upstream pin (hle_svc.c, hle_uecvar.c and the test Makefile moved). Numbers named in patch messages and in the launcher plan are updated.
…ts the per-game IPA path The per-game IPA target is gone, so BuildModel has no ipaPath.
…new pin Main's refresh of the iOS game data folder patch (aoc_locate comment) moved the context of the main.m hunk.
v0lumehi
force-pushed
the
v0lumehi/ios-shell-ui-2
branch
from
October 31, 2026 16:43
d6e79ca to
3d51109
Compare
1 of 2 tasks
This was referenced Nov 1, 2026
Merged
5 of 6 tasks
lucaszhongsj
pushed a commit
to lucaszhongsj/nxnative
that referenced
this pull request
Nov 19, 2026
Upstream-Status: fork-only (declined seedds#492) Reason: One host binary runs multiple games in the iPhone shell, so profile constants are read at run time Issue: LNPANDY/NX2Apple#226
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.













Fix or feature
What and why
Route C, end to end (M1, M2, M3)
This PR is now the complete Route C shell. It folds in #144 (M1, patches 0045 to 0049) and adds M2 and M3 on top of the views and the host layer described further down.
What works end to end. In the Mac launcher, pick a game and choose the iPhone / iPad target. It is the only iPhone target, there is no per-game IPA any more. The launcher builds only that game's framework (the NSP script's
--shell-framework,build_ipa.sh DM_FRAMEWORK_ONLY), adds it to the shell library (shell.jsonin the shell folder), generates the shell withdm/ios/tools/build_shell.sh(dm/ios/project-shell.yml: the engine host plus every embedded framework, thefrontend-iospackage linked as a local Swift package), signs it with the player's team, installs it over the existing app and copies only the game files the device lacks. On the device there is one app (named NX2Apple under its icon, no wordmark in its screens) whose library lists every game from its embedded framework, with the eShop banner the launcher caches. Play sets the game's environment (EngineLaunchPlan:DM_PROFILEfrom the framework, the data inDocuments/games/<title ID>/, the player's per-game settings with the per-game app's keys), dlopens the framework, callsdm_set_game_image_header, starts the host and hands the window to the game view. One game per process: leaving the game is a relaunch. A normal start always opens the library (DM_SHELL_PLAYin a devicectl launch environment is a test switch only).The Builds page has two targets, This Mac and iPhone / iPad. A game that an earlier version built as its own app or IPA stays in the library as an "Older iPhone build", and Build makes it again for the shared app.
How the install target works. The pure parts are in
frontend/Sources/NSPortBuilder/ShellInstall.swiftand also run headless (NSPortBuilder --install-shell …). The game data copy compares the device's listing with the local game folder by path and size and copies file by file, never with--remove-existing-content(a fake devicectl in the tests models that it wipes siblings). Before a copy the launcher checks the device's free space (the shell writes it toDocuments/shell-log.txt) and says how the device is connected: over a cable keep it unlocked, over Wi-Fi an estimate and a way to wait for a cable. A device that was never paired gets the steps before the build starts. A copy that stops midway leaves an incomplete-data row whose Retry finishes it, and the shell does not treat a shortromfs.imgas data (the manifest's identity names the size). A team whose profile cannot carry the Increased Memory Limit gets a shell signed without it, and the log says so.How re-signing keeps the data. The shell's bundle ID is chosen once (
org.nxnative.shell, ororg.nxnative.shell.<team>when the plain one is taken) and stored inshell.json. Every later install and the 7-day re-sign build with that same ID and install over the existing app, soDocuments(game data, saves) stays.Engine patches (fork-only unless said otherwise, see
patches/): 0050 the shell project, its glue and the framework-only build, 0051 the NSP script's--shell-framework, 0052 the front ends' progress hook (forwarded as seedds/nxnative#742, not used by the shell yet), 0053 the runtime profile read by every host site, so one host binary runs every game of the shell.Verified on a device (iPhone 17 Pro Max, iOS 27.0.1, installed through the launcher's code path, data copied over the cable):
DmGame01007EF00011E000.framework(boot: game framework …, the module bases of main, subsdk0 and sdk), mounts its RomFS image and both DLC fromDocuments/games/01007EF00011E000/and plays in the shell.Documentsstayed untouched by the reinstall.Settings reach the game. Play passes the game's settings from the shell as the engine's environment, and the boot log lists every setting it passes. A change in the library applies at the next Play. The performance HUD needs
MTL_HUD_ENABLEDbefore Metal makes its first device, so the shell turns Metal's HUD on at every start and the game view sets its layer's HUD mode fromDM_METAL_HUD. While Upscaling is MetalFX the HUD shows MetalFX's rows.Follow-ups: M4 (external drive, per-game msl, pso and profile overrides, DLC beyond
aoc/), M5 (incremental frameworks, broken-framework tolerance on a device, re-sign timing), the shell's own "Preparing shaders" screen on the progress hook of 0052, Increased Memory Limit for the shell (it needs the team's current Program License Agreement accepted in the developer account).The views (
frontend-ios/) and the host layerRoute C (#144) needs one shell app that holds several games. This PR is its view layer for iPhone and iPad, in a new Swift package
frontend-ios/with aShellUIlibrary, a smallShellControllerslibrary and a demo app. It builds on the first pass Codex made (the input types, the focus model and its tests, the size-driven layouts, the state handling, the palette and Manrope), and replaces its visual design, which read as a grid of identical grey boxes.ShellUIstays view-only. It does no file access, persistence, picker logic or networking. Views take plain values and report through closures, and the host layer below (ShellHost, in this PR too) fills them:GameTile,GameDetail,SettingSection,SettingRow(toggle, choice, range),ControllerInfoGameState: playable, needs game data, needs an app update, or broken with a shortreason(such as "Game files damaged") and an optionaldetailArtwork: a game's picture decoded once by the host, from file bytes or aCGImage.GameTile.banneris the 16:9 key art (the eShop banner the Mac launcher caches per title ID, or adocs/imagespicture),GameTile.iconthe optional square NACP icon. Without either, a calm placeholder is drawn from the title.ShellActions:onSelect,onPlay,onChange(game, setting, value),onPickGameData,onUseAppData,onPickCloudSaves,onDisableCloudSaves,onResetDefaults,onShowLog,onAppUpdate,onBack. No closure was added for the How to fix and How to update explanations: they are local UI and callonShowLogandonAppUpdatefrom inside.ShellInput: an optional semantic controller event (direction, A, B, X, Y) with the device that sent it, so the hints draw that device's glyphsShellControllersis kept apart from the views:GamepadAdapterreads every GameController controller and reportsShellInputactions and the connected controllers with their battery, mirroring the Mac console (the same mapping by label, deadzone and repeat on hold). The demo uses it, the real shell can too.Design note
The reference is the Mac launcher: big 16:9 key art, a status dot, a cream Play capsule, a collection of wide banner tiles, Manrope throughout. The iOS shell keeps that and adds the console's Cover Flow when the screen is on its side.
ShellTypeinShellStyle.swift): the same Manrope file, the same weight per role, the same tracking for capitals, sizes adapted to iOS and scaled with Dynamic Type.Layouts per form factor
Only the available size decides (
ShellLayout), never the device model, idiom or orientation.Settings are one view in one place for every layout, so open settings stay open, with their scroll position and edits, across a fold, a rotation or a Stage Manager resize.
The game page's banner runs edge to edge behind the status bar, with Back floating over it in a blurred chip. Game settings and Controllers also close with the system's left-edge swipe, which follows the finger and can be cancelled halfway.
Controller first: the D-pad and stick move a cream focus ring, A activates, B backs out, X opens settings, Y opens controllers. The glyphs follow the device used last (letters for Xbox and Nintendo, the shapes for PlayStation, key caps for a keyboard) and touch hides them again. A hardware keyboard works the same way: arrows, Return, Escape, O for settings, Y for controllers. Dynamic Type works up to the largest accessibility size.
The foldable
Xcode 27.1 lists the
iPhone Duodevice type, but it needs an iOS 27.1 Simulator runtime and only iOS 27.0 is installed, sosimctl createfails. Instead the demo's--fold-testputs the running shell in a frame that switches between a 1.4:1 folded size (375 x 525) and a larger nearly square unfolded size (626 x 890), in both orientations, on an iPad Pro 11-inch (M5) Simulator. These sizes exist only in the demo harness.testFoldKeepsSelectionSettingsAndScrollchecks that the selected game, an edited toggle, the open settings and their scroll position survive folding, unfolding and folding again.Host layer (
ShellHost)A second library turns real files into the view values and acts on the closures. It was folded in from #248 so the views and their wiring are reviewed together.
Games/<titleID>/folder, each withgame.manifest.json(the schema indocs/launcher-c-plan.md) andlauncher.json(docs/launcher.schema.json), plus an optional banner and icon. The state follows from what is there: a reachable game-data folder, the shader chain andmin_osagainst this build, a missing framework or a damaged manifest (broken, with the reason).LauncherSettings, so the engine can read them later. Reset restores the tested defaults fromlauncher.json. Dependent rows (such as Sharpness under FSR) follow the profile.Documents/games/<titleID>/(patch 0003's layout).Documents/log.txtwhen its first lines name the game's framework), and a link to the releases page.GameLauncherprotocol with a stub that says launching is not available yet. M2 of Route C (Route C M1: the game's modules as a framework (opt-in) #144, @LNPANDY) plugs the real launcher in there, without touching the views.--samplesbrings back the sample games.Open points for M2: the manifest has no minimum shell version yet (the state uses
chainandmin_os), and whether the engine reads the shell's per-game suite or the shell copies the values over.Checked
swift buildandswift testinfrontend-ios/(focus navigation, the size-to-layout and settings-overlay rules, the Cover Flow snap, and the controller mapping, deadzone, repeat timing and glyph families). The demo builds withxcodebuild -sdk iphonesimulator. UI tests on the iPhone 17 Pro and iPad Pro 11-inch (M5) Simulators, iOS 27.0: all pass on both (the fold tests run on iPad only). They cover controller input, touch swipes and taps in Cover Flow (iPhone, iPad and the unfolded stand-in), a slow drag followed by a quick swipe, the How to fix sheet, the short shelf, rotation and the fold.python3 scripts/patches.py checkpasses, nothing vendored changes.NX_LAUNCHER_CAPTURE_DIR).swift buildandswift testinfrontend/pass,python3 scripts/patches.py checkpasses with main's 0032 before this PR's 0045 to 0053, and the frontend-qt, patches and.github/scriptsunit tests pass.frontend-ios/AppIcon.iconinto the shell and the demo app. The shell build test checks that the app namesAppIconand has anAssets.car. The shell with the icon was installed over the existing app on the iPhone 17 Pro Max, and the games and saves stayed.Screenshots
There is no before: the shell is a new app. The demo captures below show the layouts. The first three are the shell built from this branch on an iPhone 17 Pro Max: the library with two games, and the performance HUD and the German game language chosen in the shell, in Hades (with MetalFX's rows) and in Breath of the Wild.
The app icon is
frontend-ios/AppIcon.icon, made in Icon Composer:Phone on its side, Cover Flow with the state dot and the action line, then a ready game, then a damaged one:
Settings as the Controllers-style overlay, a banner game and a square-art game:
Phone held upright, library and the full-screen settings page:
iPad with the settings overlay in landscape and portrait, and the library alone:
The foldable stand-in, folded and unfolded on its side:
The controller focus ring with the glyph hints, and the largest text size:
Scope
dm/,scripts/,docs/,ref/,AGENTS.md) is edited directly: a change there is a patch inpatches/(scripts/patches.py export, andpatches.py checkpasses), with itsUpstream-StatusA product change: it waits 48 hours before merging, and @LNPANDY owns Route C.