Changelog
Notable changes between SDK versions.
Versions follow semver. Format borrows from
Keep a Changelog. The currently shipping
version is shown in the Get it button on every page of these docs and is
always whatever packages/sdk/package.json reports at build time.
When something in here surprises you mid-upgrade, check
Migrating from gamee-js — most breaking changes from the
legacy SDK are documented there in detail.
Unreleased#
Nothing yet.
v3.1.0 — 2026-09-17#
Note. The 3.1.0 build was refreshed on 2026-09-24 to add the
showRewardedVideoplaceoption below. A 3.1.0 zip downloaded before that date does not have it — re-download from Install.
Added#
showRewardedVideotakes an optionalplace. Label where in the game the ad was triggered from —gamee.showRewardedVideo({ place: 'savelife' })or the shorthandgamee.showRewardedVideo('savelife'). The platform records the label with the ad so ad performance can be compared per place; it never changes which ad is shown. Names are yours to choose: 1–20 characters ofa–z,A–Z,0–9,-, anything else rejects withVALIDATION. Omitted /nullkeeps sendingdata: null, so existing games and platform builds are unaffected. New exported typeShowRewardedVideoOptions. See Methods →showRewardedVideo.
Fixed#
- iPad and Mac in the GAMEE iOS app no longer hang on
BRIDGE_TIMEOUT. iPadOSWKWebViewreports a desktopMacintoshuser agent (iPadOS 13+), and so does the iOS app running on Apple Silicon Macs. 3.0.0 detected the platform from the user agent first, mistook both forweb, picked thepostMessagebridge, andinit()timed out after 30 s. Rebuild the game against 3.1.0 — the iOS app itself is unchanged. See Troubleshooting.
Changed#
- Platform detection checks the native bridge handle before the user
agent.
createBridge()resolvesioswheneverwindow.webkit.messageHandlers.callbackHandleris installed andandroidwheneverwindow._toDeviceis, regardless of the user agent. The 3.0.0 user-agent rules remain as a fallback for browser embeds. See Architecture → Platform detection. - Android detection no longer depends on the
gamee/X.Y.Zuser-agent suffix. The Android app may send a stock WebView user agent to games on 3.1.0 or newer. Never sniff the UA forgamee— readsdk.platformafterinit()instead. - Versioned downloads. Every release is served as
gamee-sdk-<version>.zipnext to the latestgamee-sdk.zip, and the zip unpacks into agamee-sdk/folder that carries apackage.jsonwith its version. See Install → Which version do I have?.
v3.0.0 — 2026-05-13#
The first stable release of the rewritten SDK. Wire-compatible with the
legacy gamee-js platforms (iOS, Android, web), but the JavaScript surface
is breaking — there is no compatibility shim.
Note. 3.0.0 was rebuilt several times under the same version number before versioned downloads existed. The final 3.0.0 build (2026-09-15) contains everything below, including the Later 3.0.0 builds items. If your copy predates that,
purchaseItemWithGemsmay still use the old{ success }reply anduserIdmay be missing — upgrade to 3.1.0.
Later 3.0.0 builds#
Added#
GameInitResponse.userId— optional numeric GAMEE user id of the player, passed through from the platform’sinitreply. The emulator’s Init tab has a matching field (empty by default, which omits it). See Methods →GameInitResponse.
Fixed#
purchaseItemWithGemsmatches the platform’s purchase contract. 3.0.0 typed the reply as{ success }and sent onlygemsCost/itemName. The platform replies with{ purchaseStatus, gemsLeft? }and expects the legacygamee-jsdetailspayload, soPurchaseDetailsnow carriesgemsCost,itemName,itemImage(base64),silentPurchase, and an optionaldeveloperPayload(a JSON string, sent as-is), andPurchaseResultis{ purchaseStatus, gemsLeft? }. Breaking for games on an earlier 3.0.0 build: add the two new required fields and branch onresult.purchaseStatusinstead ofresult.success. The emulator mirrors the contract — it shows the item image, honourssilentPurchase, and charges a configurable gem balance that comes back asgemsLeft. See Methods →purchaseItemWithGems.
Changed#
- Platform contract:
showRewardedVideoandpurchaseItemWithGemsare no longer wrapped inpause/resume. Older platform builds sentpausebefore the ad / purchase dialog andresumeafter the reply. Current builds pause their own gameplay-time counter internally and dispatch neither event. Games must freeze their loop/audio/input before the call and thaw once the promise settles. The emulator mirrors this (no events around either dialog) and its protocol lint now flagsupdateScore/updateMissionProgresssent while an ad or purchase is pending. See player-paced calls → lifecycle.
Added#
- Typed Promise API. Every method returns a
Promise<T>; every event payload is typed. - Capability system. Declare every gated feature
(
saveState,rewardedAds,logEvents,missions,gems,platformExtraLife) ininit({ capabilities }). Gated methods reject synchronously withCAPABILITY_MISSINGwhen the capability is missing. See Capabilities. - Typed errors. Every failure is a
GameeErrorwith a branchablecode. The seven codes (VALIDATION,CAPABILITY_MISSING,BRIDGE_TIMEOUT,BRIDGE_ERROR,BRIDGE_OVERFLOW,INVALID_STATE,NOT_SUPPORTED) form an exhaustive union. hasPlatformContext()synchronous utility — returnstrueonly when the page is loaded inside a GAMEE host (iframe, iOSWKWebView, AndroidWebView). Guard your boot with it. See Utilities.sdk.platformgetter — read the current platform afterinit()resolves.@gamee/sdk-test-utils—MockBridgefor unit-testing games without a real platform. See Unit testing.- Bundled emulator with a live bridge-traffic panel. Open from any
docs page or
/emulator. - Local validation —
logEvent(24 char name / 160 char value cap),updateScore(finite score, non-negativeplayTime), andupdateMissionProgress([0, 100] range) all validate at the call site. SdkOptions—allowedOrigins,requestTimeoutMs,maxPendingRequests,silentMode, custombridge. See Configuration.- AI-agent briefing. Drop the
llm-contextbundle into your repo (asCLAUDE.md,.cursor/rules/,AGENTS.md, …) and your AI tool gets every method, event, error code, and wire detail in context. Also discoverable at/llms.txtand/llms-full.txtfor tools that follow the llmstxt.org convention.
Changed#
init()is one-shot per SDK instance. A second call rejects withINVALID_STATE. UsecreateSdk()to spin up a fresh instance (mostly in tests). See Methods →initis one-shot.- Subscribe before
gameReady(). The SDK no longer queues events for late subscribers. See Events → subscribe first. - Events auto-ack. You no longer call
ev.detail.callback()— the SDK acknowledges every inbound event itself. - Method signatures.
gameOver,updateScore,logEvent, and others now take a single options object (with sugar shorthands for the common case). The full mapping is in the migration guide.
Removed#
gamee.controller.*— games are fullscreen; wire DOM input yourself. See the controllers → native input table.gamee.share()— was a stub ingamee-js.gamee.gameLoadingProgress()— render your own loading UI.gamee.requestPlayerData(),gamee.requestPlayerReplay(),gamee.requestPlayerSaveState(),gamee.requestSocial(),gamee.requestBattleData()— no platform support. ReadinitResponse.gameContextfor battle/mission context instead.- Capabilities
ghostMode,replay,playerData,socialData— the platform retired the underlying features. - Events
ghostShow/ghostHide— gone withghostMode.
Wire protocol#
The wire protocol is unchanged from gamee-js. Existing host
implementations (iOS, Android, web) need no updates. The wire-level field
names are documented in Architecture → four traffic patterns.