Skip to content

Conversation

@nattb8
Copy link
Collaborator

@nattb8 nattb8 commented Jan 7, 2026

Summary

The Sequence SDK requires requests to have a valid origin, but loading index.html via file:// URLs results in a null origin.

On iOS/Mac, WKWebView provides loadHTMLString:baseURL: which allows setting a custom base URL as the origin.

On Windows, we use the UnityWebBrowser library which wraps Chromium (CEF). Chromium doesn't have an equivalent mechanism, the origin is derived directly from the loaded URL. Since we can't set a custom origin, this PR introduces GameBridgeServer, a lightweight local HTTP server that serves the GameBridge index.html from http://localhost:<port>.

ID-4221

@nattb8 nattb8 requested a review from a team as a code owner January 7, 2026 20:07
@nattb8 nattb8 force-pushed the feat/windows-game-bridge branch from 2d62f01 to 66964e8 Compare January 8, 2026 02:56
@nattb8 nattb8 enabled auto-merge January 8, 2026 05:57
@nattb8 nattb8 merged commit 437c0f4 into main Jan 8, 2026
52 of 68 checks passed
@nattb8 nattb8 deleted the feat/windows-game-bridge branch January 8, 2026 19:58
rodrigo-fournier-immutable added a commit that referenced this pull request Jan 29, 2026
Expand GameBridgeServer to include macOS builds to enable viem/Fetch API compatibility.

Changes:
- GameBridgeServer.cs: Add UNITY_STANDALONE_OSX to compilation directives
- GreeBrowserClient.cs: Use GameBridgeServer on macOS instead of file:// URLs
- IWebBrowserClient.cs: Include macOS in Dispose() interface requirement
- Passport.cs: Call Dispose() for macOS to cleanup GameBridgeServer

Background:
- viem (used in ts-immutable-sdk 2.12.4+) requires Fetch API
- file:// URLs have CORS/Fetch API restrictions
- GameBridgeServer serves via http://localhost:51990/ to provide proper origin
- Windows already uses this approach (PR #646)
- macOS now needs same solution for viem compatibility

This resolves the "App stuck in Initialisation" issue on macOS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants