Skip to content

iOS shell: Add on-device resigning for imported iOS games - #1262

Open
n3crosis wants to merge 1 commit into
LNPANDY:mainfrom
n3crosis:pr/on-device-resigning
Open

n3crosis wants to merge 1 commit into
LNPANDY:mainfrom
n3crosis:pr/on-device-resigning

Conversation

@n3crosis

@n3crosis n3crosis commented Nov 13, 2026 •

Copy link
Copy Markdown

Fix or feature

  • Fix
  • Feature

What and why

This builds on the hot-framework loading support added in #1217, adding on-device re-signing for imported games.

Imported games can stop loading when their signing certificate expires or they were signed with a different identity from the installed app. This adds on-device re-signing so users can keep the existing game and saves instead of rebuilding or reimporting it. Optional game sharing and importing between devices can be added after this PR, building on this signing support.

Import a matching P12 and provisioning profile in Settings, then choose Re-sign game in the game’s Settings. Re-signing uses the installed app’s identity.

Checked

  • Tested on a real iPhone, including successful on-device re-signing.
  • Signing, localization and simulator UI tests passed.

Scope and implementation

  • Supports imported frameworks with one native executable. Bundled games are unchanged. Frameworks with nested native code report an unsupported-resource-sealing error.
  • Identity import checks the installed app's signer and profile membership. Credentials stay in device-only Keychain storage.
  • Signing uses a private copy, checks iOS acceptance, then atomically replaces the framework.
  • ShellMain.m passes a file offset to F_ADDFILESIGS_RETURN, as required by XNU, instead of a user-memory pointer. The unnecessary signature allocation/read is removed.
  • Dependency: zsign 0a92e9a, including framework resource sealing and removal of framework entitlements.
  • If this PR is accepted, upstream should host and maintain the zsign fork’s feat/swift-package branch for Swift Package Manager use, keeping the pinned immutable revision available.

Screenshots

View Before After
App Settings (en) App Settings before en App Settings after en
Game Settings (en) Game Settings before en Game Settings after en — Re-sign and expiry
Signing identity (en) New screen; not available before this PR. Signing identity detail en — fictional data
Other languages: de, es, fr, it, ja, ko, pt-BR, sv, zh-Hans
View Before After
App Settings (de) App Settings before de App Settings after de
Game Settings (de) Game Settings before de Game Settings after de — Re-sign and expiry
Signing identity (de) New screen; not available before this PR. Signing identity detail de — fictional data
App Settings (es) App Settings before es App Settings after es
Game Settings (es) Game Settings before es Game Settings after es — Re-sign and expiry
Signing identity (es) New screen; not available before this PR. Signing identity detail es — fictional data
App Settings (fr) App Settings before fr App Settings after fr
Game Settings (fr) Game Settings before fr Game Settings after fr — Re-sign and expiry
Signing identity (fr) New screen; not available before this PR. Signing identity detail fr — fictional data
App Settings (it) App Settings before it App Settings after it
Game Settings (it) Game Settings before it Game Settings after it — Re-sign and expiry
Signing identity (it) New screen; not available before this PR. Signing identity detail it — fictional data
App Settings (ja) App Settings before ja App Settings after ja
Game Settings (ja) Game Settings before ja Game Settings after ja — Re-sign and expiry
Signing identity (ja) New screen; not available before this PR. Signing identity detail ja — fictional data
App Settings (ko) App Settings before ko App Settings after ko
Game Settings (ko) Game Settings before ko Game Settings after ko — Re-sign and expiry
Signing identity (ko) New screen; not available before this PR. Signing identity detail ko — fictional data
App Settings (pt-BR) App Settings before pt-BR App Settings after pt-BR
Game Settings (pt-BR) Game Settings before pt-BR Game Settings after pt-BR — Re-sign and expiry
Signing identity (pt-BR) New screen; not available before this PR. Signing identity detail pt-BR — fictional data
App Settings (sv) App Settings before sv App Settings after sv
Game Settings (sv) Game Settings before sv Game Settings after sv — Re-sign and expiry
Signing identity (sv) New screen; not available before this PR. Signing identity detail sv — fictional data
App Settings (zh-Hans) App Settings before zh-Hans App Settings after zh-Hans
Game Settings (zh-Hans) Game Settings before zh-Hans Game Settings after zh-Hans — Re-sign and expiry
Signing identity (zh-Hans) New screen; not available before this PR. Signing identity detail zh-Hans — fictional data

Scope

  • No engine files are added.
  • Before and after screenshots of the changed views are attached.
  • No keys, game files or extracted game data are included.

@github-actions github-actions Bot added launcher The NX2Apple launcher app ios iPhone or iPad windows Windows (the Qt front end) labels Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ios iPhone or iPad launcher The NX2Apple launcher app windows Windows (the Qt front end)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant