How lnpandy/nx2apple works
NX2Apple builds Switch-game applications for Apple devices, then provides a Mac library and an iOS/iPadOS shell for launching them. The principal workflow is selecting game inputs and a target, building and packaging the game, transferring or installing it, then launching it from a library. The repository also includes a Windows launcher and documented controller, cloud-save, settings, and touch-control capabilities. Relationships below follow README workflow statements and the shown source references; unsampled subsystems are represented by their tree paths without assuming internal calls.
Main entry points: BuildStore.swift Build orchestration · GameCatalogue.swift Shell game library · ShellApp.swift iOS shell app · BuildArchive.swift Build output
Components 22
Desktop launchers
- Mac launcher UI
frontend/Sources/NX2Apple/LauncherView.swift - Windows launcher
frontend-qt/nspb_qt/ui.py
Build and engine
- Build orchestration
frontend/Sources/NXModel/BuildStore.swift - Build queue
frontend/Sources/NXCore/BuildQueue.swift - Game inputs
frontend/Sources/NXCore/GameFolder.swift - Engine selection
frontend/Sources/NXModel/EngineSyncStore.swift - Engine updates
frontend/Sources/NXCore/EngineUpdater.swift - Build processes
frontend/Sources/NXCore/ProcessRunner.swift - Mac game builder
frontend/Sources/NXCore/MacNativeGamesBuilder.swift - Switch 2 builder
frontend/Sources/NXCore/S2ArmBuilder.swift - Build output
frontend/Sources/NXCore/BuildArchive.swift - Device install
frontend/Sources/NXCore/ShellInstall.swift
Game libraries
- Mac game library
frontend/Sources/NX2Apple/Library.swift
iOS shell
- iOS shell app
frontend-ios/Shell/App/ShellApp.swift - Shell game library
frontend-ios/Sources/ShellHost/GameCatalogue.swift - Engine launch plan
frontend-ios/Sources/ShellHost/EngineLaunchPlan.swift
Play capabilities
- Native gameplay
frontend-ios/Shell/App/ShellEngine.h - Controller support
frontend-ios/Sources/ShellControllers/GamepadAdapter.swift - Touch controls
frontend-ios/Sources/ShellUI/TouchLayout.swift - Cloud saves
frontend/Sources/NXCore/CloudSaveSync.swift - Per-game mods
frontend-ios/Sources/ShellHost/GameMods.swift
Other components
- Player
Connections 26
- Player → Mac launcher UI: chooses target
README.md - Player → Windows launcher: builds games
README.md - Mac launcher UI → Build orchestration: configures builds
- Windows launcher → Build orchestration: configures builds
- Build orchestration → Game inputs: uses inputs
frontend/Sources/NXModel/BuildStore.swift - Build orchestration → Build queue: queues builds
frontend/Sources/NXModel/BuildStore.swift - Build orchestration → Engine selection: selects engine
frontend/Sources/NXModel/BuildStore.swift - Engine selection → Engine updates: checks updates
frontend/Sources/NXModel/EngineSyncStore.swift - Build orchestration → Mac game builder: builds Mac games
frontend/Sources/NXModel/BuildStore.swift - Build orchestration → Switch 2 builder: builds Switch 2
frontend/Sources/NXModel/BuildStore.swift - Build orchestration → Build processes: runs processes
frontend/Sources/NXModel/BuildStore.swift - Mac game builder → Build output: packages game
- Switch 2 builder → Build output: packages game
- Build orchestration → Device install: installs shell
- Player → Mac game library: manages games
README.md - Build output → Mac game library: adds built game
README.md - Build output → Device install: copies game
README.md - Device install → iOS shell app: installs app
README.md - iOS shell app → Shell game library: shows games
- Player → Shell game library: selects game
README.md - Shell game library → Engine launch plan: prepares launch
- Engine launch plan → Native gameplay: configures engine
frontend-ios/Sources/ShellHost/EngineLaunchPlan.swift - iOS shell app → Controller support: accepts input
- iOS shell app → Touch controls: offers controls
- Shell game library → Cloud saves: syncs saves
- Shell game library → Per-game mods: loads mods