Skip to content

iOS shell host: catalogue, settings, game data, cloud saves, log and the launcher seam - #248

Merged
v0lumehi merged 1 commit into
v0lumehi/ios-shell-ui-2from
v0lumehi/ios-shell-wiring
Oct 30, 2026
Merged

v0lumehi merged 1 commit into
v0lumehi/ios-shell-ui-2from
v0lumehi/ios-shell-wiring

Conversation

@v0lumehi

Copy link
Copy Markdown
Collaborator

What and why

Stacked on #226 (the views). This is the host layer behind them, a new ShellHost library in frontend-ios/ that the real shell app and the demo can both use. ShellUI stays view-only, every file is read in ShellHost.

Wired:

  • Catalogue. Games/<title ID>/ with game.manifest.json (schema 1 from docs/launcher-c-plan.md), launcher.json (docs/launcher.schema.json), the manifest's framework folder and optional banner and icon. Malformed or missing files keep the game in the list as broken with a readable reason.
  • State. Broken, then needs app update (chain differs from the host's, or min_os above the running OS), then needs game data, else playable.
  • Settings. One UserDefaults suite per game, keys launcher.<VAR> as in dm/ios/Sources/LauncherSettings.swift (only non-default values stored, saved values the game no longer offers read as default). Reset restores the tested defaults.
  • Game data. Folder picker (UIDocumentPickerViewController), security-scoped bookmark per game (pickedDataBookmark, as DataBookmark.m), resolved on start. Use app data goes back to Documents/games/<title ID>/ (patch 0003's layout).
  • Cloud saves. Choice stored as cloudSavesBookmark, no sync logic.
  • Log and update. Show log reads the tail of log.txt from the data folder into a read-only sheet. Update app opens a configurable URL.
  • Controllers. GamepadAdapter feeds ControllerInfo and ShellInput through the model.
  • Demo. --host runs the views on fixture bundles (no game data, no pictures).

The GameLauncher seam

GameLauncher.launch(_ game: LaunchableGame) async throws. LaunchableGame carries the manifest, bundle and framework URLs, the data folder, the app folder, every DM_* value and the cloud-save folder. StubGameLauncher only logs and shows "Launching is not available yet." M2 (#144, @LNPANDY) plugs in the real launcher that sets the environment, dlopens the framework and starts the host. Nothing else changes, it is passed as launcher:. Documented in frontend-ios/README.md.

Not done

No engine and no launching. dm/, scripts/, docs/, ref/ and patches/ are untouched. "App version vs required version" uses the manifest's chain and min_os only, since the manifest has no minimum shell version key. No cloud sync.

Checked

  • Tests: swift build and swift test in frontend-ios (52 new Swift Testing tests: parsing incl. malformed files, state, data location, settings and reset, bookmarks in a temporary folder, stub launcher, model actions). python3 scripts/patches.py check passes.
  • Visual QA: no view changed. The 16 UI tests pass on an iOS 27 iPhone 17 Pro simulator (xcodebuild ... build test), including 3 new ones for --host.
  • Run on a device or Mac: simulator only, nothing installed on a device.

Screenshots

None, no UI change.

Scope

  • No vendored file (dm/, scripts/, docs/, ref/, AGENTS.md) is edited directly
  • No engine or game profile fix, so no seedds/nxnative PR is needed
  • No keys, game files or data extracted from a game in the change

…the launcher seam

New ShellHost library behind the ShellUI views: reads Games/<title ID> bundles
(manifest and launcher.json), derives each game's state, keeps settings per game
under launcher.<VAR>, stores security-scoped bookmarks for game data and cloud
saves, shows log.txt, opens the update URL, bridges controllers, and hands Play
to a GameLauncher (a stub until M2). The demo gets a --host mode on fixtures.
@v0lumehi v0lumehi added enhancement New feature or request ios iPhone or iPad labels Oct 30, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 30, 2026
@v0lumehi
v0lumehi merged commit 965327c into v0lumehi/ios-shell-ui-2 Oct 30, 2026
9 checks passed
@v0lumehi

v0lumehi commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Folded into #226, the commits are on v0lumehi/ios-shell-ui-2 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request ios iPhone or iPad

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant