Repository navigation
Hand games to and from Provenance through the shared App Group - #111
Conversation
Whitespace only (two-space indent, per .swiftformat), ahead of the drop-box change that rewrites most of these files.
… App Group iCube's side of the drop box Provenance, iFly and iCube share in group.org.provenance-emu.provenance (contract version 1, the same text as iFly's EcosystemHandoff.swift). - Presence: Apps/dolphinios.json is written at launch and on every activation (handoff 1, accepts game, systems gamecube and wii). - Send: "Send to Provenance" and an approved requestGame clone the disc image into Handoff/<peer>/ under a staging name, rename it, then open <peer>://handoff. Used when the peer is installed and its presence entry takes a game for the title's system; otherwise, and when staging fails, the share sheet as before. Apple TV has no share sheet, so its context menu offers the send only when the direct route exists. - Receive: on activation and on dolphinios://handoff, every complete hand-off addressed to iCube is moved into Software/ through ImportStaging (the importer's staged move) and deleted. Manifest paths must be relative with no empty, dot-prefixed or .. components, the file must be a regular file with a disc-image extension, and an existing library file is never replaced. - Clean-up: iCube's own hand-offs older than 7 days and staging directories older than an hour are removed on activation. ImportFileManager.importFiles(at:) is not used for the receive: it is iOS-only, asks Copy/Move/Cancel for a single disc image, refuses URLs that are not security-scoped and reports no completion to delete the hand-off after. EcosystemBridge.peerInstalled now probes on tvOS too (canOpenURL exists there). Settings › Connected Apps describes the new route.
Core.strings: both sides appended entries at the end of the file; kept both.
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 428b95f784
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…mes apart, probe peers on tvOS Review findings on the drop-box receiver: - A move that fails (no space, an unwritable folder) no longer deletes the hand-off. It stays in the inbox, the next activation tries again, files an earlier pass moved count as present, and the user is told once per launch that the import will be retried instead of being told the format is unsupported. - A file already in the library under the same name is only treated as the same game when its bytes match. A different file is placed beside it as "name (2).ext". Size alone cannot tell: every full GameCube image is the same size. - Info-TV.plist had no LSApplicationQueriesSchemes, so canOpenURL could never see Provenance on Apple TV and the direct send was never offered there.
What this adds
iCube's side of the drop box Provenance, iFly and iCube share on one device, in the App Group
group.org.provenance-emu.provenance. A game moves between the apps without the system share sheet and without the sender staying alive.This is contract version 1, the same contract as iFly
developd7178e576(the header of itsEcosystemHandoff.swift) and the Provenance branchfeature/ecosystem-handoff-inbox. Nothing in the contract was changed for iCube. Part of #55 (the "iCube ↔ Provenance on one iPhone/iPad" journey); it does not close it.Ecosystem/Apps/dolphinios.jsonis written at launch and on every activation:handoff: 1,accepts: ["game"],systems: ["gamecube", "wii"].dolphinios://requestGameclone the disc image intoHandoff/provenance/.<id>.staging/, rename it to<id>, then openprovenance://handoff?id=…&from=dolphinios. This route is taken when Provenance is installed and its presence entry takes a game for the title's system. For an older Provenance, or when staging fails, the share sheet is used as before.dolphinios://handoff, every complete hand-off addressed to iCube is moved intoSoftware/and its directory deleted. A manifest path must be relative, with no empty, dot-prefixed or..component; the file must be a regular file with a disc-image extension; a file already in the library is never replaced. Staging directories, a newerversion, anotherkindand anothertoare left alone.Things a reviewer may want to know
ImportFileManager.importFiles(at:). That call is iOS-only, asks Copy/Move/Cancel for a single disc image, refuses URLs that are not security-scoped, and reports no completion to delete the hand-off after. The receive usesImportStaging.stagedMove, the staged move that importer itself uses.EcosystemBridge.peerInstallednow probes on tvOS as well (canOpenURLexists there); it used to return false off iOS.swiftformatof the four existing ecosystem files, kept separate so the feature diff is readable.develop(Scan-to-pair QR, add-source choices and a compact empty library #110 landed while this was in progress); both sides had appended entries toCore.strings, and both are kept.Project/Entitlements/Public.entitlements/Private.entitlements, which do not list the shared group. Those builds get no presence and no direct route, and keep the share sheet. Not changed here.Checks
Run on the merged branch (
428b95f784):EcosystemHandoffTests(21, new),EcosystemBridgeTests(21),ConnectedAppsModelBuilderTests(4),UniversalLinkRouterTests(13). The new tests use a temporary directory in place of the group container and cover the staging layout and wire format, the rename into place, presence gating, inbox filtering, unsafe paths and symbolic links, and clean-up.make gate-release: Release (Non-Jailbroken) compiles for iOS and tvOS.Not checked
canOpenURL/openreach Provenance on Apple TV are untested.EcosystemHandoff.sharedRootreturns nil there unless the group container is writable; that guard is untested.