Changelog
Changelog
If you have previously read the SDK guide for an earlier version (0.0.1), check this section for changes.
v0.3.1 (2026-11-11) — Current Version
New Features
-
Interstitial ad slot added: reward slots now include an interstitial ad without a reward (
action: 'INTERSTITIAL', slot ID'interstitial_ad'). Where thegetRewardedAdSlot({ slotId: 'interstitial_ad' })lookup succeeds, run it withshowRewardedAd({ slotId: 'interstitial_ad' }).isEndedis alwaysfalse, and the platform shows no loading indicator, retry, or failure notice.- No new methods — it uses the existing reward slot API.
- Detailed guide: Interstitial Ad Slot
Changed
- The
RewardActiontype gained the value'INTERSTITIAL': if you exhaustively checkswitch (slot.action)withneverusingtudada-sdk-types, add a branch so it compiles. Moreactionvalues may be added, so keep a default branch that skips unknown values. - The interstitial ad slot can appear in the slot list regardless of your SDK version: if your game renders every slot from
getRewardedAdSlotsas a reward button, exclude slots whoseactionis'INTERSTITIAL'even if you do not upgrade the SDK.
v0.3.0 (2026-11-05)
New Features
-
ServerTime API added: Server time to use instead of the device clock when deciding timed rewards (daily/weekly). Sync once on entry with
getServerTime(), then read instantly withgetServerTimeSync()when deciding, without calling the server. If no sync has ever succeeded it returnsnull— do not grant in that case.TudadaSDK.getServerTime({ fail: (res) => console.log('hold:', res.reason) });
// when deciding
const t = TudadaSDK.getServerTimeSync();
if (t && t.now >= nextRewardAt) grantDailyReward();- New:
getServerTime()/getServerTimeAsync()/getServerTimeSync() - Guide: ServerTime API
- New:
-
Template share (
share) API added: Opens the share sheet with a template ID and arguments (title, description, etc.) agreed with the platform. It is unrelated to rewards and is meant for shares whose content differs per call, such as multiplayer invitations. See the table in the guide for per-host behavior and the meaning ofcompleted.const res = await TudadaSDK.shareAsync({
templateId: 'default',
templateArgs: { TITLE: 'Play with me!', DESCRIPTION: 'Room code ABCDEF' },
});- New:
share()/shareAsync() - Guide: Share API
- New:
-
Platform custom event (
onPlatformEvent) added: Receives events the platform delivers to the running game (data available at launch comes fromgetLaunchOptions()). Up to 32 events that arrive while no listener is registered are buffered (no production host sends events yet; the channel is reserved for future use).- New:
onPlatformEvent()/offPlatformEvent() - Guide: Lifecycle API → onPlatformEvent
- New:
-
Multiplayer Room API included (documentation provided separately): APIs for creating/joining rooms and sharing state in real time are now part of the SDK. The detailed documentation is not published on this site; it is provided separately to games confirmed for multiplayer integration — do not call these APIs before receiving that guidance.
- Notice: Room API (Multiplayer)
Changed
- The type of
servicePlatformchanged from an enum tostring: current values arekakaotalk,kakaopay,houseandmonimo, and new values may be added. Treat unknown values as the default behavior. If you relied on an exhaustiveswitchwith anevercheck in TypeScript, it may fail to compile withtudada-sdk-types0.3.0 — switch to adefaultbranch.
v0.2.0 (2026-06-24)
New Features
-
Unified Rewarded Slot API added: Rewarded video, banner, and share have been unified into a single slot model. Query the active slots to render them, and run any of them with a single
showRewardedAd({ slotId })call on user tap.// Query active slots
const { slots } = await TudadaSDK.getRewardedAdSlotsAsync();
// Run a slot (action: REWARD_VIDEO / BANNER / SHARE dispatched automatically)
const res = await TudadaSDK.showRewardedAdAsync({ slotId: slots[0].slotId });
if (res.isEnded) giveReward();- New:
getRewardedAdSlots()/getRewardedAdSlot(slotId)(+*Async) showRewardedAd()accepts bothslotId(slot) andadUnitId(video fallback)- See: Ad API → Unified Rewarded Slot
- New:
-
Payment API added: An in-game product purchase API has been added. The game purchases using only a
productId; the payment method, price, verification, and delivery are handled by the platform.const products = await TudadaSDK.payment.getProductsAsync();
const txn = await TudadaSDK.payment.purchaseAsync('coin_100');
if (txn.status === 'GRANTED') { /* delivery complete — finalize on the game server */ }- Split into callback versions (
payment.getProducts()etc., returnvoid) and Promise versions (getProductsAsync()etc.) - All four offer an
*Asyncvariant:getProductsAsync/getProductAsync/purchaseAsync/getTransactionAsync - Errors are branched by
code(callback version viafail,*Asyncversion via reject) - See: Payment API
- Split into callback versions (
-
servicePlatformfield added toSystemInfoandAppBaseInfo: Identifies which host service ('kakaotalk'/'kakaopay'/'house') the game is running in.const info = TudadaSDK.getSystemInfoSync();
console.log(info.servicePlatform); // 'kakaotalk' | 'kakaopay' | 'house'- See: System API
Deprecated
createRewardedVideoAd(legacy) — wx-compatible legacy instance API. Replaced by the unifiedshowRewardedAd()/showRewardedAdAsync(); will be removed in a future version.- Banner Ad API (
getAvailableBannerIds/getBanner/runBannerAction+*Async) — replaced by the Unified Rewarded Slot. UsegetRewardedAdSlots()+showRewardedAd({ slotId })(action=BANNER). Maintained for compatibility. shareForReward/shareForRewardAsync— replaced by the Unified Rewarded Slot. UseshowRewardedAd({ slotId })(action=SHARE). Maintained for compatibility.
v0.1.6 (2026-05-12)
New Features
-
Banner Ad API added (slot model): A new API has been added that lets the game receive banner images per slot, render them itself, and delegate actions to the platform on user tap.
// 1) List active banner slot IDs
TudadaSDK.getAvailableBannerIds({
success: (res) => console.log('slots:', res.bannerIds),
});
// 2) Fetch banner data matched to a slot
TudadaSDK.getBanner({
bannerId: 'main_menu_top',
success: (res) => {
if (res.banner) renderBanner(res.banner.imageUrl);
},
});
// 3) Delegate the action on user tap (reward is handled by the game)
TudadaSDK.runBannerAction({ bannerId: 'main_menu_top' });- Callback / Promise pair: every function ships with an
*Async()variant bannerIddoubles as the game-defined slot namerunBannerActiononly signals success/fail — the game handles reward delivery itself- See: Ad API → Banner Ad
- Callback / Promise pair: every function ships with an
-
TudadaSDK.gameActionaction logging API added (Phase 1): Sends game lifecycle actions to the platform as fire-and-forget events.// Game start
TudadaSDK.gameAction.start();
// Game clear
TudadaSDK.gameAction.complete({ payload: { score: 1200, level: 5 } });
// Game exit (with reason)
TudadaSDK.gameAction.exit({ payload: { reason: 'USER_QUIT' } });start(option?)/complete(option)/exit(option)— lifecycle action signals- The SDK also auto-emits a one-time game-loading-complete signal when initialization finishes
- Calls are fire-and-forget; downstream routing is the platform's responsibility
- See: GameAction API
-
login()response now includes user info credential fieldsThe
login()success response now includes a signed user info credential that the game server can verify on its own using only a shared secret key — no server-to-server call required.TudadaSDK.login({
success: (res) => {
// Existing fields — unchanged
console.log(res.code, res.userId);
// Verify on game server
sendToGameServer({
payload: res.userInfoPayload,
signature: res.userInfoSignature,
});
},
});userInfoPayload: URL-encoded query string (gameUserId, name, profileImageUrl, authDate, attribute)userInfoSignature: HMAC signature over the payload- Existing response signature (
code,userId,errMsg,errCode) is preserved — wx.login compatibility maintained - See: Auth API → User Info Credential
-
getUserInfo()response reshaped to Tudada-fit (Breaking change)The wx-compatible 4 fields (
encryptedData/iv/signature/rawData) are removed fromgetUserInfo(). It now returns the same credential aslogin()(userInfoPayload/userInfoSignature). ThewithCredentialsoption is also removed.// before (v0.1.5)
TudadaSDK.getUserInfo({
withCredentials: true,
success: (res) => {
sendToServer(res.encryptedData, res.iv); // mock-only — not actually verifiable
},
});
// after (v0.1.6)
TudadaSDK.getUserInfo({
success: (res) => {
console.log(res.userInfo.nickName);
sendToGameServer({
payload: res.userInfoPayload, // same value as login()
signature: res.userInfoSignature,
});
},
});wx.getUserInfois removed from the wx-compatibility surface — keep usingTudadaSDK.getUserInfo- See: Auth API → getUserInfo
v0.1.5 (2026-03-30)
New Features
-
shareForReward API added: A new API for granting rewards upon share completion has been added.
TudadaSDK.shareForReward({
url: 'https://example.com/share', // optional
success: (res) => {
if (res.rewarded) console.log('Share complete — reward granted');
},
fail: (err) => console.error('Share failed:', err.errMsg),
});
// Promise pattern
const result = await TudadaSDK.shareForRewardAsync({ url: 'https://example.com/share' });
if (result.rewarded) console.log('Reward granted');shareForReward(): Callback pattern (success/fail/complete)shareForRewardAsync(): Promise pattern- Share handling is automatically managed by the platform
v0.1.4 (2026-03-18)
New Features
-
showRewardedAd API added: Handles everything from loading to displaying a rewarded ad in a single call.
TudadaSDK.showRewardedAd({
adUnitId: 'your-ad-unit-id',
success: (res) => {
if (res.isEnded) console.log('Watch complete — reward granted');
},
fail: (err) => console.error('Ad failed:', err.errMsg),
});
// Promise pattern
const result = await TudadaSDK.showRewardedAdAsync({ adUnitId: 'your-ad-unit-id' });showRewardedAd(): Callback pattern (success/fail/complete) — recommendedshowRewardedAdAsync(): Promise pattern- The platform handles ad loading, display, retries, loading UI, and failure popups automatically
createRewardedVideoAdis maintained as legacy (@deprecated)
-
CheckFeature API added: Allows you to check in advance whether a specific API is supported on the current platform.
TudadaSDK.checkFeature({
apiName: 'startAccelerometerSensor',
success: (res) => console.log('Supported:', res.apiName),
fail: (res) => console.log('Unsupported:', res.status),
});
// Promise pattern
const result = await TudadaSDK.checkFeatureAsync('startAccelerometerSensor');checkFeature(): Callback-based — success (supported) / fail (unsupported)checkFeatureAsync(): Promise-based — both supported and unsupported resolve- Unsupported reasons:
unknown_api|version_required|platform_unsupported|device_unsupported|permission_denied
-
LaunchOptions API added: Allows you to retrieve query parameters and referrer information passed when the game launches.
const options = TudadaSDK.getLaunchOptions();
console.log('Query:', options.query);getLaunchOptions(): Sync — returns pre-cached launch optionsgetLaunchOptionsAsync(): Async — fetches the latest launch options
Changes
wxobject officially classified as legacy: API calls through thewxobject have been officially classified as a legacy compatibility feature for porting existing WeChat games.- Only existing APIs registered up to v0.1.2 are exposed on the
wxobject. - New APIs added from v0.1.3 onwards (accelerometer,
checkFeature,getLaunchOptions, etc.) areTudadaSDK-exclusive and cannot be used through thewxobject. - After porting is complete, we recommend gradually transitioning to direct
TudadaSDKcalls.
- Only existing APIs registered up to v0.1.2 are exposed on the
v0.1.3 (2026-02-26)
New Features
-
Accelerometer API added: Flat accelerometer sensor APIs have been added. This is a TudadaSDK-specific interface that is not compatible with the wx API (
wx.startAccelerometer, etc.) — the API names and parameter structures differ. It cannot be used through thewxobject and must be called directly fromTudadaSDK.TudadaSDK.onAccelerometerChange((res) => {
console.log(`X: ${res.x}, Y: ${res.y}, Z: ${res.z}`);
});
TudadaSDK.startAccelerometerSensor({
sensitivity: 'normal',
success: () => console.log('Sensing started'),
});
TudadaSDK.stopAccelerometerSensor();startAccelerometerSensor(),stopAccelerometerSensor(),onAccelerometerChange(),offAccelerometerChange()- Independent interface different from wx API (e.g.,
startAccelerometerSensorvswx.startAccelerometer) - Receives XYZ-axis acceleration data
- Sensitivity-based control:
'sensitive'|'normal'|'insensitive'
v0.1.2 (2026-02-26)
New Features
-
environmentfield added toSystemInfoandAppBaseInfoA field indicating the current access environment has been added.
const info = TudadaSDK.getSystemInfoSync();
console.log(info.environment); // 'prod' or 'dev'
const appInfo = TudadaSDK.getAppBaseInfo();
console.log(appInfo.environment); // 'prod' or 'dev'Value Description 'prod'Production environment 'dev'Development environment This can be used, for example, to switch resource CDN addresses based on the environment.
const info = TudadaSDK.getSystemInfoSync();
const cdnBase = info.environment === 'prod'
? 'https://cdn.example.com/prod'
: 'https://cdn.example.com/dev';
v0.1.1 (2026-02-20)
- Internal improvements applied (no game code changes required)
v0.1.0 (2026-02-06)
New Features
-
userIdfield added tologin()responseTudadaSDK.login({
success: (res) => {
console.log(res.code); // existing
console.log(res.userId); // newly added
},
}); -
SystemInfo.wifiEnablednow returns the actual valuePreviously returned a fixed value, but now returns the actual Wi-Fi enabled status.
Breaking Changes (Migration Required)
-
checkSession()success callback result type changed// 0.0.1 — success callback included login info
TudadaSDK.checkSession({
success: (res) => {
// res contained code, userId, etc.
},
});
// 0.1.0 onwards — success callback contains only general result
TudadaSDK.checkSession({
success: (res) => {
// res contains only errMsg (GeneralCallbackResult)
// Call login() separately if login info is needed
},
});
v0.0.2
New Features
-
Audio API added: The
createInnerAudioContext()method has been added.const audio = TudadaSDK.createInnerAudioContext();
audio.src = './bgm.mp3';
audio.loop = true;
audio.play();- Audio playback/pause/stop/seek
- Volume and playback speed control
- Various event listeners (onPlay, onEnded, onError, etc.)
v0.0.1 (2026-02-02) — Initial Release
This is the initial release version. The following APIs are included:
- Auth API (login, checkSession, getUserInfo)
- Storage API (set/get/remove/clear + Sync versions)
- TudadaStore API (cloud storage)
- System API (getSystemInfo, getWindowInfo, getDeviceInfo, etc.)
- UI API (getMenuButtonBoundingClientRect)
- Device API (vibration, keyboard)
- Clipboard API
- Ad API (rewarded video ads)
- Lifecycle API (onShow, onHide, exitMiniProgram, restartMiniProgram)