iOS Upgrade Guide
See what changed between your current SDK version and the latest, with the exact steps to migrate.
查看你目前的 SDK 版本與最新版本之間的變更,以及確切的遷移步驟。
查看你当前的 SDK 版本与最新版本之间的变更,以及确切的迁移步骤。
Migration
Remove the old VNGGames SDK frameworks
移除舊的 VNGGames SDK framework
移除旧的 VNGGames SDK framework
- In Xcode, select the app target and open the General tab.
- Under Frameworks, Libraries, and Embedded Content, remove all the old VNGGames SDK frameworks.
- In the Project navigator, remove the old VNGGames SDK configuration file references.
- In Finder, delete the old VNGGames SDK framework and configuration files from your project directory.
- 在 Xcode 選取 App target,開啟 General 頁籤。
- 在 Frameworks, Libraries, and Embedded Content 移除所有舊的 VNGGames SDK framework。
- 在 Project navigator 移除舊的 VNGGames SDK 設定檔參照。
- 在 Finder 中,從專案目錄刪除舊的 VNGGames SDK framework 與設定檔。
- 在 Xcode 选取 App target,打开 General 页签。
- 在 Frameworks, Libraries, and Embedded Content 移除所有旧的 VNGGames SDK framework。
- 在 Project navigator 移除旧的 VNGGames SDK 配置文件引用。
- 在 Finder 中,从工程目录删除旧的 VNGGames SDK framework 与配置文件。
Remove the old VNGGames SDK Package
移除舊的 VNGGames SDK Package
移除旧的 VNGGames SDK Package
- In Xcode, select the project and open the Package Dependencies tab.
- Select the old local VNGGames SDK Package and click the minus button to remove it.
- In the Project navigator, remove the old VNGGames SDK configuration file references.
- In Finder, delete the old local package folder and the old configuration files from your project directory.
- 在 Xcode 選取專案,開啟 Package Dependencies 頁籤。
- 選取舊的本機 VNGGames SDK Package,按下減號按鈕移除。
- 在 Project navigator 移除舊的 VNGGames SDK 設定檔參照。
- 在 Finder 中,從專案目錄刪除舊的本機套件資料夾與舊的設定檔。
- 在 Xcode 选取工程,打开 Package Dependencies 页签。
- 选取旧的本地 VNGGames SDK Package,点击减号按钮移除。
- 在 Project navigator 移除旧的 VNGGames SDK 配置文件引用。
- 在 Finder 中,从工程目录删除旧的本地包文件夹与旧的配置文件。
appsflyerAdRevenue now takes PassAdRevenueMediationNetworkType
The public analytics facade no longer exposes AppsFlyer’s MediationNetworkType. It now wraps it in PassSDK’s own PassAdRevenueMediationNetworkType so integrator code no longer depends on the AppsFlyer enum directly.
公開的 Analytics facade 不再直接暴露 AppsFlyer 的 MediationNetworkType,而是包裝為 PassSDK 自有的 PassAdRevenueMediationNetworkType,讓接入方程式碼不再直接相依於 AppsFlyer 的列舉。
公开的 Analytics facade 不再直接暴露 AppsFlyer 的 MediationNetworkType,而是包装为 PassSDK 自有的 PassAdRevenueMediationNetworkType,让接入方代码不再直接依赖 AppsFlyer 的枚举。
↪ This form is deprecated in 3.18.0, see: Per-provider analytics events consolidated onto VGSDKAnalytics
↪ 此寫法於 3.18.0 已棄用,請參見: 各平台分析事件整合至 VGSDKAnalytics
↪ 此写法于 3.18.0 已弃用,请参见: 各平台分析事件整合到 VGSDKAnalytics
| MediationNetworkType | PassAdRevenueMediationNetworkType |
| import AppsFlyerAdRevenue |
Switch each call to the replacement shown in the table above.
將每個呼叫改為上表所示的替代項目。
将每个调用改为上表所示的替代项。
See the usage and full signature in the Integration guide:
Ad revenue mediation network請在整合指南中查看用法與完整簽名:
廣告收益中介聯播網请在集成指南中查看用法与完整签名:
广告收入聚合网络The old API no longer exists, so your project stops compiling until you migrate.
舊 API 已不存在,未完成遷移前你的專案將無法編譯。
旧 API 已不存在,未完成迁移前你的工程将无法编译。
PassSDKAnalytics.sendLog(data:) replaced by dataPlatformCustomEvent(name:data:)
The Data Platform event name is now a separate, required parameter. The SDK writes it into the “EventType” field internally.
Data Platform 事件名稱現在是獨立的必填參數。SDK 會在內部將其寫入 “EventType” 欄位。
Data Platform 事件名称现在是独立的必填参数。SDK 会在内部将其写入 “EventType” 字段。
| PassSDKAnalytics.sendLog(data:) | dataPlatformCustomEvent(name:data:) |
- Replace every PassSDKAnalytics.sendLog(data:) call with dataPlatformCustomEvent(name:data:).
- Move the event name, previously the EventType entry inside data, into the new required name parameter.
- 將每個 PassSDKAnalytics.sendLog(data:) 呼叫改為 dataPlatformCustomEvent(name:data:)。
- 把事件名稱(原本放在 data 的 EventType 欄位)改用新的必填 name 參數傳入。
- 将每个 PassSDKAnalytics.sendLog(data:) 调用改为 dataPlatformCustomEvent(name:data:)。
- 把事件名称(原本放在 data 的 EventType 字段)改用新的必填 name 参数传入。
The old API no longer exists, so your project stops compiling until you migrate.
舊 API 已不存在,未完成遷移前你的專案將無法編譯。
旧 API 已不存在,未完成迁移前你的工程将无法编译。
New PassSDKAnalytics.cleverTapCustomEvent(name:data:)
3.1.0 adds CleverTap analytics, available once CleverTap is enabled for your game in its SDK configuration.
3.1.0 加入 CleverTap 分析。只要在遊戲的 SDK 設定中啟用 CleverTap 即可使用。
3.1.0 加入 CleverTap 分析。只要在游戏的 SDK 配置中启用 CleverTap 即可使用。
| PassSDKAnalytics.cleverTapCustomEvent(name:data:) |
Keep CleverTap enabled for the game, then record custom CleverTap events with this call.
為遊戲啟用 CleverTap,然後以此方法記錄自訂 CleverTap 事件。
为游戏启用 CleverTap,然后以此方法记录自定义 CleverTap 事件。
See the usage and full signature in the Integration guide:
Send a custom event請在整合指南中查看用法與完整簽名:
傳送自訂事件请在集成指南中查看用法与完整签名:
发送自定义事件This addition is opt-in. Nothing breaks if you skip it: your existing integration keeps working, you just don’t gain this capability.
此新增功能為選用。略過不會造成任何問題:你現有的整合仍可正常運作,只是不會獲得此功能。
此新增功能为可选。跳过不会造成任何问题:你现有的集成仍可正常运行,只是不会获得此功能。
New CleverTap in-app notification listener (PassSDKCleverTap / PassCleverTapListener)
The tapped button’s customExtras dictionary is passed to the closure.
被點擊按鈕的 customExtras 字典會傳入該閉包。
被点击按钮的 customExtras 字典会传入该闭包。
↪ This form is deprecated in 3.18.0, see: Legacy PassSDK* facades deprecated in favor of VGSDK* equivalents
↪ 此寫法於 3.18.0 已棄用,請參見: 舊版 PassSDK* 門面已棄用,改用 VGSDK* 對應類別
↪ 此写法于 3.18.0 已弃用,请参见: 旧版 PassSDK* 门面已弃用,改用 VGSDK* 对应类
| PassSDKCleverTap | |
| PassSDKCleverTap.setListener(_:) | |
| PassCleverTapListener | |
| PassCleverTapListener.inAppNotificationButtonTapped |
Register a PassCleverTapListener through PassSDKCleverTap.setListener(_:) so your closure runs when a CleverTap in-app notification button is tapped.
透過 PassSDKCleverTap.setListener(_:) 註冊 PassCleverTapListener,使用者點擊 CleverTap 應用內通知按鈕時即會執行你的閉包。
通过 PassSDKCleverTap.setListener(_:) 注册 PassCleverTapListener,用户点击 CleverTap 应用内通知按钮时即会执行你的闭包。
See the usage and full signature in the Integration guide:
Set CleverTap listener請在整合指南中查看用法與完整簽名:
設定 CleverTap 監聽器请在集成指南中查看用法与完整签名:
设置 CleverTap 监听器This addition is opt-in. Nothing breaks if you skip it: your existing integration keeps working, you just don’t gain this capability.
此新增功能為選用。略過不會造成任何問題:你現有的整合仍可正常運作,只是不會獲得此功能。
此新增功能为可选。跳过不会造成任何问题:你现有的集成仍可正常运行,只是不会获得此功能。
New PassSDK.quickLogin(_:) for VGA Quick Login
3.3.0 adds a dedicated Quick Login entry point, separate from the standard login(with:) flow.
3.3.0 新增獨立於標準 login(with:) 流程的專用快速登入進入點。
3.3.0 新增独立于标准 login(with:) 流程的专用快速登录入口。
| PassSDK.shared.quickLogin(_:) |
- Call PassSDK.shared.quickLogin to launch the VGA Quick Login flow.
- Read the PassUserInfo or NSError from its completion.
- 呼叫 PassSDK.shared.quickLogin 以啟動 VGA 快速登入流程。
- 從完成回呼取得 PassUserInfo 或 NSError。
- 调用 PassSDK.shared.quickLogin 以启动 VGA 快速登录流程。
- 从完成回调取得 PassUserInfo 或 NSError。
See the usage and full signature in the Integration guide:
Quick login請在整合指南中查看用法與完整簽名:
快速登入请在集成指南中查看用法与完整签名:
快速登录This addition is opt-in. Nothing breaks if you skip it: your existing integration keeps working, you just don’t gain this capability.
此新增功能為選用。略過不會造成任何問題:你現有的整合仍可正常運作,只是不會獲得此功能。
此新增功能为可选。跳过不会造成任何问题:你现有的集成仍可正常运行,只是不会获得此功能。
New PassSDK.manageAccount(_:) with PassManageAccountAction enum
3.3.0 adds account management (bind / switch / delete / close) surfaced through a new public PassManageAccountAction enum and the manageAccount(_:) completion.
3.3.0 新增帳號管理(綁定 / 切換 / 刪除 / 關閉),透過新的公開 PassManageAccountAction 列舉與 manageAccount(_:) 回呼提供。
3.3.0 新增账号管理(绑定 / 切换 / 删除 / 关闭),通过新的公开 PassManageAccountAction 枚举与 manageAccount(_:) 回调提供。
| PassSDK.shared.manageAccount(_:) | |
| PassManageAccountAction |
- Call PassSDK.shared.manageAccount to present account management.
- Branch on the returned PassManageAccountAction and refresh from the updated PassUserInfo.
- 呼叫 PassSDK.shared.manageAccount 以顯示帳號管理介面。
- 依回傳的 PassManageAccountAction 分支處理,並以更新後的 PassUserInfo 刷新狀態。
- 调用 PassSDK.shared.manageAccount 以显示账号管理界面。
- 根据返回的 PassManageAccountAction 分支处理,并以更新后的 PassUserInfo 刷新状态。
See the usage and full signature in the Integration guide:
Open account managementPassManageAccountAction請在整合指南中查看用法與完整簽名:
開啟帳號管理PassManageAccountAction请在集成指南中查看用法与完整签名:
打开账号管理PassManageAccountActionThis addition is opt-in. Nothing breaks if you skip it: your existing integration keeps working, you just don’t gain this capability.
此新增功能為選用。略過不會造成任何問題:你現有的整合仍可正常運作,只是不會獲得此功能。
此新增功能为可选。跳过不会造成任何问题:你现有的集成仍可正常运行,只是不会获得此功能。
New PassSDKThinkingData analytics facade (setRole)
3.3.0 integrates the ThinkingData analytics SDK (ThinkingSDK 3.0.3). appId and serverUrl are read from game info, and the new PassSDKThinkingData class exposes role identification.
3.3.0 整合 ThinkingData 分析 SDK(ThinkingSDK 3.0.3)。appId 與 serverUrl 由遊戲設定讀取,新增的 PassSDKThinkingData 類別提供角色識別。
3.3.0 集成 ThinkingData 分析 SDK(ThinkingSDK 3.0.3)。appId 与 serverUrl 从游戏配置读取,新增的 PassSDKThinkingData 类提供角色识别。
↪ This form is deprecated in 3.4.0, see: Legacy analytics facades deprecated
↪ 此寫法於 3.4.0 已棄用,請參見: 舊版分析門面已標記為棄用
↪ 此写法于 3.4.0 已弃用,请参见: 旧版分析门面已标记为弃用
| PassSDKThinkingData | |
| PassSDKThinkingData.setRole(id:name:) |
Bind the current role after login with PassSDKThinkingData.setRole(id:name:).
於登入後以 PassSDKThinkingData.setRole(id:name:) 綁定目前角色。
在登录后以 PassSDKThinkingData.setRole(id:name:) 绑定当前角色。
See the usage and full signature in the Integration guide:
Configure analytics請在整合指南中查看用法與完整簽名:
設定分析请在集成指南中查看用法与完整签名:
配置分析This addition is opt-in. Nothing breaks if you skip it: your existing integration keeps working, you just don’t gain this capability.
此新增功能為選用。略過不會造成任何問題:你現有的整合仍可正常運作,只是不會獲得此功能。
此新增功能为可选。跳过不会造成任何问题:你现有的集成仍可正常运行,只是不会获得此功能。
New PassSDKAnalytics.thinkingDataCustomEvent(name:data:)
3.3.0 adds a public static entry point on the existing PassSDKAnalytics facade for ThinkingData custom events.
3.3.0 在既有的 PassSDKAnalytics 門面上新增用於 ThinkingData 自訂事件的公開靜態進入點。
3.3.0 在既有的 PassSDKAnalytics 门面上新增用于 ThinkingData 自定义事件的公开静态入口。
| PassSDKAnalytics.thinkingDataCustomEvent(name:data:) |
Send custom ThinkingData events with this call, once ThinkingData is enabled for your game.
在遊戲已啟用 ThinkingData 後,以此方法送出自訂 ThinkingData 事件。
在游戏已启用 ThinkingData 后,以此方法发送自定义 ThinkingData 事件。
See the usage and full signature in the Integration guide:
Send a custom event請在整合指南中查看用法與完整簽名:
傳送自訂事件请在集成指南中查看用法与完整签名:
发送自定义事件This addition is opt-in. Nothing breaks if you skip it: your existing integration keeps working, you just don’t gain this capability.
此新增功能為選用。略過不會造成任何問題:你現有的整合仍可正常運作,只是不會獲得此功能。
此新增功能为可选。跳过不会造成任何问题:你现有的集成仍可正常运行,只是不会获得此功能。
New unified VGSDKAnalytics event API
3.4.0 adds VGSDKAnalytics, a typed game-event facade: one call reports a game event to every analytics provider your game has configured, instead of wiring the same event up per provider. It is an addition, not a replacement. The per-provider PassSDKAnalytics event methods are unchanged by this release.
3.4.0 新增 VGSDKAnalytics,一個型別化的遊戲事件門面:單一呼叫即可將遊戲事件回報給遊戲已設定的所有分析平台,不必再為每個平台分別接上同一個事件。這是新增而非取代。各平台的 PassSDKAnalytics 事件方法在本版並未變動。
3.4.0 新增 VGSDKAnalytics,一个类型化的游戏事件门面:单一调用即可将游戏事件上报给游戏已配置的所有分析提供商,不必再为每个提供商分别接上同一个事件。这是新增而非取代。各提供商的 PassSDKAnalytics 事件方法在本版并未变动。
| VGSDKAnalytics | |
| VGSDKAdRevenueMediationNetwork |
Report game events through the typed VGSDKAnalytics static events (the sc, misc, iap, mda, nru and reg families) instead of wiring the same event up per analytics provider.
改用 VGSDKAnalytics 的型別化靜態事件(sc、misc、iap、mda、nru 與 reg 系列)回報遊戲事件,不必再為每個分析平台分別接上同一個事件。
改用 VGSDKAnalytics 的类型化静态事件(sc、misc、iap、mda、nru 与 reg 系列)上报游戏事件,不必再为每个分析提供商分别接上同一个事件。
See the usage and full signature in the Integration guide:
SetupCustom eventConversion RateOnboardingMain & Daily ActivitiesSocial & CommunitiesOtherThis addition is opt-in. Nothing breaks if you skip it: your existing integration keeps working, you just don’t gain this capability.
此新增功能為選用。略過不會造成任何問題:你現有的整合仍可正常運作,只是不會獲得此功能。
此新增功能为可选。跳过不会造成任何问题:你现有的集成仍可正常运行,只是不会获得此功能。
Legacy analytics facades deprecated
PassSDKThinkingData and the legacy analytics classes are now deprecated and scheduled for removal in a future release.
PassSDKThinkingData 與舊版分析類別現已標記為棄用,並將於未來版本移除。
PassSDKThinkingData 与旧版分析类现已标记为弃用,并将在未来版本中移除。
↪ This form is deprecated in 3.18.0, see: Legacy PassSDK* facades deprecated in favor of VGSDK* equivalents
↪ 此寫法於 3.18.0 已棄用,請參見: 舊版 PassSDK* 門面已棄用,改用 VGSDK* 對應類別
↪ 此写法于 3.18.0 已弃用,请参见: 旧版 PassSDK* 门面已弃用,改用 VGSDK* 对应类
| PassSDKThinkingData.setRole(id:name:) | VGSDKAnalytics.miscConfigAnalytics(_:roleName:) |
Migrate PassSDKThinkingData and the legacy GT analytics functions to the equivalent VGSDKAnalytics events.
將 PassSDKThinkingData 及舊版 GT 分析函式遷移至對應的 VGSDKAnalytics 事件。
将 PassSDKThinkingData 及旧版 GT 分析函数迁移至对应的 VGSDKAnalytics 事件。
It still works today, but is scheduled for removal. Your build breaks once a later release deletes it.
目前仍可運作,但已列入移除計畫。待日後版本刪除後,你的建置將失敗。
目前仍可运行,但已列入移除计划。待日后版本删除后,你的构建将失败。
PassSDKAnalytics webhook-log methods removed
PassSDKAnalytics no longer exposes its four public logging methods. They were removed, so existing calls no longer compile.
PassSDKAnalytics 不再提供其四個公開日誌方法。這些方法已移除,因此原有呼叫將無法編譯。
PassSDKAnalytics 不再提供其四个公开日志方法。这些方法已移除,因此原有调用将无法编译。
| PassSDKAnalytics.startCDNDownloadLog(data:) | VGSDKAnalytics.regCDNDownloadStart(_:extraData:) |
| PassSDKAnalytics.endCDNDownloadLog(data:) | VGSDKAnalytics.regCDNDownloadFinish(_:extraData:) |
| PassSDKAnalytics.startResoucesExtractionLog(data:) | VGSDKAnalytics.regExtractResourceStart(_:extraData:) |
| PassSDKAnalytics.endResoucesExtractionLog(data:) | VGSDKAnalytics.regExtractResourceFinish(_:extraData:) |
Switch each call to the replacement shown in the table above.
將每個呼叫改為上表所示的替代項目。
将每个调用改为上表所示的替代项。
The old API no longer exists, so your project stops compiling until you migrate.
舊 API 已不存在,未完成遷移前你的專案將無法編譯。
旧 API 已不存在,未完成迁移前你的工程将无法编译。
Payment API replaced by VGSDKPayment
The public PassSDKPayment facade, PassIAPStatus enum, and the public PassIAPInfo model were removed (PassIAPInfo is now internal). Products are surfaced as VGSDKPaymentProduct wrappers rather than raw StoreKit SKProduct.
公開的 PassSDKPayment 門面、PassIAPStatus 列舉與公開的 PassIAPInfo 模型皆已移除(PassIAPInfo 改為內部)。商品以 VGSDKPaymentProduct 包裝呈現,而非原生 StoreKit 的 SKProduct。
公开的 PassSDKPayment 门面、PassIAPStatus 枚举与公开的 PassIAPInfo 模型均已移除(PassIAPInfo 改为内部)。商品以 VGSDKPaymentProduct 包装呈现,而非原生 StoreKit 的 SKProduct。
| PassSDKPayment | VGSDKPayment |
| PassSDKPayment.getProducts(items:completion:) | VGSDKPayment.getProducts(ids:listener:) |
| PassSDKPayment.purchase(with:completion:) | VGSDKPayment.purchase(info:listener:) |
| PassIAPInfo | VGSDKPaymentInfo |
| PassIAPStatus | VGSDKPaymentPurchaseStatus |
| PassIAPStatus.cancel | VGSDKPaymentPurchaseStatus.canceled |
| PassIAPStatus.inProgress | VGSDKPaymentPurchaseStatus.processing |
| SKProduct | VGSDKPaymentProduct |
- Replace PassSDKPayment with VGSDKPayment.
- Change getProducts(items:completion:) to getProducts(ids:listener:), which returns [VGSDKPaymentProduct] instead of [SKProduct].
- Change purchase(with:completion:) to purchase(info:listener:), passing VGSDKPaymentInfo instead of PassIAPInfo.
- Update your status switch from PassIAPStatus to VGSDKPaymentPurchaseStatus.
- 以 VGSDKPayment 取代 PassSDKPayment。
- 將 getProducts(items:completion:) 改為 getProducts(ids:listener:),其回傳 [VGSDKPaymentProduct] 而非 [SKProduct]。
- 將 purchase(with:completion:) 改為 purchase(info:listener:),並傳入 VGSDKPaymentInfo 而非 PassIAPInfo。
- 將狀態 switch 由 PassIAPStatus 改為 VGSDKPaymentPurchaseStatus。
- 以 VGSDKPayment 取代 PassSDKPayment。
- 将 getProducts(items:completion:) 改为 getProducts(ids:listener:),其返回 [VGSDKPaymentProduct] 而非 [SKProduct]。
- 将 purchase(with:completion:) 改为 purchase(info:listener:),并传入 VGSDKPaymentInfo 而非 PassIAPInfo。
- 将状态 switch 由 PassIAPStatus 改为 VGSDKPaymentPurchaseStatus。
The old API no longer exists, so your project stops compiling until you migrate.
舊 API 已不存在,未完成遷移前你的專案將無法編譯。
旧 API 已不存在,未完成迁移前你的工程将无法编译。
PassSDKFacebook.inviteFriend loses recipients parameter
The recipients: [String]? parameter was dropped from the public inviteFriend signature (the ‘Remove recipient list in Facebook invite friend’ change).
公開的 inviteFriend 簽章移除了 recipients: [String]? 參數(對應「Remove recipient list in Facebook invite friend」變更)。
公开的 inviteFriend 签名移除了 recipients: [String]? 参数(对应「Remove recipient list in Facebook invite friend」变更)。
↪ This form is deprecated in 3.18.0, see: Legacy PassSDK* facades deprecated in favor of VGSDK* equivalents
↪ 此寫法於 3.18.0 已棄用,請參見: 舊版 PassSDK* 門面已棄用,改用 VGSDK* 對應類別
↪ 此写法于 3.18.0 已弃用,请参见: 旧版 PassSDK* 门面已弃用,改用 VGSDK* 对应类
| inviteFriend(_:message:recipients:filter:) | inviteFriend(_:message:filter:) |
Remove the recipients: argument from every PassSDKFacebook.inviteFriend call to match the new inviteFriend(_:message:filter:completion:) signature.
移除所有 PassSDKFacebook.inviteFriend 呼叫中的 recipients: 參數,以符合新的 inviteFriend(_:message:filter:completion:) 簽章。
移除所有 PassSDKFacebook.inviteFriend 调用中的 recipients: 参数,以符合新的 inviteFriend(_:message:filter:completion:) 签名。
The old API no longer exists, so your project stops compiling until you migrate.
舊 API 已不存在,未完成遷移前你的專案將無法編譯。
旧 API 已不存在,未完成迁移前你的工程将无法编译。
Meta Ads (Facebook Audience Network) in-app advertising
3.5.0 introduces a new public VGSDKMetaAds facade. It supports interstitial, rewarded-video, and rewarded-interstitial ads. The ad module is only wired up when the game config enables the metaAds module.
3.5.0 新增公開的 VGSDKMetaAds facade。支援插頁廣告、獎勵影片與獎勵插頁廣告。只有在遊戲設定啟用 metaAds 模組時才會載入該廣告模組。
3.5.0 新增公开的 VGSDKMetaAds facade。支持插页广告、激励视频与激励插页广告。只有在游戏配置启用 metaAds 模块时才会加载该广告模块。
| VGSDKMetaAds | |
| VGSDKMetaAds.showInterstitial(_:listener:) | |
| VGSDKMetaAds.showRewardedVideo(_:userId:currency:listener:) | |
| VGSDKMetaAds.showRewardedInterstitial(_:userId:currency:listener:) | |
| VGSDKMetaAdsInterstitialListener | |
| VGSDKMetaAdsRewardedVideoListener | |
| VGSDKMetaAdsRewardedInterstitialListener |
Show each ad format through VGSDKMetaAds and handle the result on its matching listener.
透過 VGSDKMetaAds 顯示各種廣告格式,並以對應的 listener 處理結果。
通过 VGSDKMetaAds 展示各种广告格式,并以对应的 listener 处理结果。
See the usage and full signature in the Integration guide:
Show interstitialShow rewarded videoShow rewarded interstitialThis addition is opt-in. Nothing breaks if you skip it: your existing integration keeps working, you just don’t gain this capability.
此新增功能為選用。略過不會造成任何問題:你現有的整合仍可正常運作,只是不會獲得此功能。
此新增功能为可选。跳过不会造成任何问题:你现有的集成仍可正常运行,只是不会获得此功能。
One custom-event API for every analytics provider
3.6.0 adds VGSDKAnalytics.sendCustomEvent, which takes the provider as data (a VGSDKAnalyticsPlatform built from a VGSDKAnalyticsProvider case) rather than making you pick a different method name per provider, and delivers one call to every provider you list. This is now the way to send a custom event. Expect two differences from the per-provider methods: the prefix you pass is prepended to your event name, and the SDK merges its own default data into your parameters.
3.6.0 新增 VGSDKAnalytics.sendCustomEvent,改以資料形式指定平台(由 VGSDKAnalyticsProvider 列舉值建立的 VGSDKAnalyticsPlatform),不必再依平台選用不同的方法名稱,單一呼叫即可送達你列出的所有平台。這是現在發送自訂事件的方式。與各平台專屬方法相比有兩點不同:你傳入的 prefix 會加在事件名稱前面,且 SDK 會把自身的預設資料併入你的 parameters。
3.6.0 新增 VGSDKAnalytics.sendCustomEvent,改以数据形式指定提供商(由 VGSDKAnalyticsProvider 枚举值构建的 VGSDKAnalyticsPlatform),不必再按提供商选用不同的方法名,单一调用即可送达你列出的所有提供商。这是现在发送自定义事件的方式。与各提供商专属方法相比有两点不同:你传入的 prefix 会加在事件名称前面,且 SDK 会把自身的默认数据并入你的 parameters。
| VGSDKAnalytics.sendCustomEvent(_:parameters:platforms:) | |
| VGSDKAnalyticsPlatform | |
| VGSDKAnalyticsProvider |
| PassSDKAnalytics.sendLog(data:) | VGSDKAnalytics.sendCustomEvent(_:parameters:platforms:) |
| PassSDKAnalytics.dataPlatformCustomEvent(name:data:) | VGSDKAnalytics.sendCustomEvent(_:parameters:platforms:) |
| PassSDKAnalytics.cleverTapCustomEvent(name:data:) | VGSDKAnalytics.sendCustomEvent(_:parameters:platforms:) |
| PassSDKAnalytics.thinkingDataCustomEvent(name:data:) | VGSDKAnalytics.sendCustomEvent(_:parameters:platforms:) |
| PassSDKAnalytics.appsflyerCustomEvent(name:data:) | VGSDKAnalytics.sendCustomEvent(_:parameters:platforms:) |
| PassSDKAnalytics.firebaseCustomEvent(name:data:) | VGSDKAnalytics.sendCustomEvent(_:parameters:platforms:) |
| PassSDKAnalytics.facebookCustomEvent(name:data:) | VGSDKAnalytics.sendCustomEvent(_:parameters:platforms:) |
Switch each call to the replacement shown in the table above.
將每個呼叫改為上表所示的替代項目。
将每个调用改为上表所示的替代项。
See the usage and full signature in the Integration guide:
Send a custom event請在整合指南中查看用法與完整簽名:
傳送自訂事件请在集成指南中查看用法与完整签名:
发送自定义事件Nothing breaks and your existing per-provider custom-event calls keep working, but you keep a separate call site for every provider and your events go out without the default data sendCustomEvent merges in.
不會有任何中斷,你現有的各平台自訂事件呼叫仍可運作,但你仍需為每個平台維護獨立的呼叫點,且事件送出時不會帶上 sendCustomEvent 併入的預設資料。
不会有任何中断,你现有的各提供商自定义事件调用仍可使用,但你仍需为每个提供商维护独立的调用点,且事件发送时不会带上 sendCustomEvent 并入的默认数据。
Minimum iOS deployment target raised to 13.0
The minimum supported iOS version is now 13.0 (was 12.0). Raise your app’s deployment target. The public API surface is otherwise unchanged in this release.
最低支援的 iOS 版本現為 13.0(原為 12.0)。請提升你 App 的部署目標。本次發佈的公開 API 介面並無其他變更。
最低支持的 iOS 版本现为 13.0(原为 12.0)。请提升你 App 的部署目标。本次发布的公开 API 接口并无其他变更。
Raise your app’s iOS Deployment Target to 13.0 or later before upgrading to SDK 3.8.0.
升級至 SDK 3.8.0 前,請將 App 的 iOS Deployment Target 提升至 13.0 或以上。
升级至 SDK 3.8.0 前,请将 App 的 iOS Deployment Target 提升至 13.0 或以上。
Unless the iOS Deployment Target is raised to 13.0 or later, the app cannot build against SDK 3.8.0, and iOS 12 is no longer supported.
除非將 iOS Deployment Target 提升至 13.0 或以上,否則 App 無法對 SDK 3.8.0 進行建置,且不再支援 iOS 12。
除非将 iOS Deployment Target 提升至 13.0 或以上,否则 App 无法对 SDK 3.8.0 进行构建,且不再支持 iOS 12。
New Quick Auth API: VGSDKQuickAuth with listener-based flows
3.9.0 adds a dedicated Quick Auth facade, separate from the existing quickLogin callback, exposing show-login, play-as-guest, and channel-selection flows through a single listener object.
3.9.0 新增獨立的 Quick Auth 門面,與既有的 quickLogin 回呼分開,透過單一監聽器物件提供顯示登入、以訪客身分遊玩與頻道選擇等流程。
3.9.0 新增独立的 Quick Auth 门面,与既有的 quickLogin 回调分开,通过单一监听器对象提供显示登录、以访客身份游玩与频道选择等流程。
| VGSDKQuickAuth | |
| VGSDKQuickAuth.showLogin(listener:) | |
| VGSDKQuickAuth.playAsGuest(listener:) | |
| VGSDKQuickAuth.showChannelSelection(listener:) | |
| VGSDKAuthenticationListener |
- Start each Quick Auth flow through VGSDKQuickAuth.
- Pass a VGSDKAuthenticationListener to receive the signed-in PassUserInfo or an NSError.
- 透過 VGSDKQuickAuth 啟動各項 Quick Auth 流程。
- 傳入 VGSDKAuthenticationListener 以接收登入後的 PassUserInfo 或 NSError。
- 通过 VGSDKQuickAuth 启动各项 Quick Auth 流程。
- 传入 VGSDKAuthenticationListener 以接收登录后的 PassUserInfo 或 NSError。
See the usage and full signature in the Integration guide:
Sign inPlay as guestShow channel selectionThis addition is opt-in. Nothing breaks if you skip it: your existing integration keeps working, you just don’t gain this capability.
此新增功能為選用。略過不會造成任何問題:你現有的整合仍可正常運作,只是不會獲得此功能。
此新增功能为可选。跳过不会造成任何问题:你现有的集成仍可正常运行,只是不会获得此功能。
PassUserInfo.email is now always empty (PII compliance)
For PII compliance, 3.9.0 no longer includes the email in the user info returned by login, quickLogin, and manageAccount callbacks. The field remains but is always empty.
為符合 PII 合規,3.9.0 不再於 login、quickLogin 與 manageAccount 回呼所回傳的使用者資訊中包含電子郵件。該欄位保留但一律為空。
为符合 PII 合规,3.9.0 不再于 login、quickLogin 与 manageAccount 回调所返回的用户信息中包含电子邮件。该字段保留但一律为空。
| PassUserInfo.email |
- Stop depending on PassUserInfo.email.
- Retrieve the email from your own backend if you still need it.
- 請勿再依賴 PassUserInfo.email。
- 若仍需要電子郵件,請改由自家後端取得。
- 请勿再依赖 PassUserInfo.email。
- 若仍需要电子邮件,请改由自家后端获取。
Code that reads PassUserInfo.email keeps compiling but now receives an empty string for every login type, so any email-dependent logic silently breaks.
讀取 PassUserInfo.email 的程式碼仍可編譯,但現在不論何種登入類型都會取得空字串,因此任何依賴電子郵件的邏輯都會悄悄失效。
读取 PassUserInfo.email 的代码仍可编译,但现在无论何种登录类型都会得到空字符串,因此任何依赖邮箱的逻辑都会悄悄失效。
PassSDK now auto-initializes and the manual AppDelegate lifecycle calls are removed
3.11.0 initializes the SDK automatically and reads its configuration from a bundled VGSDKService-Info.plist, so the old manual AppDelegate entry points were removed.
3.11.0 會自動初始化 SDK,並從內建的 VGSDKService-Info.plist 讀取設定,因此移除了舊的手動 AppDelegate 進入點。
3.11.0 会自动初始化 SDK,并从内置的 VGSDKService-Info.plist 读取配置,因此移除了旧的手动 AppDelegate 入口。
| PassSDK.shared.application(_:didFinishLaunchingWithOptions:) | |
| PassSDK.shared.applicationDidBecomeActive() |
- Delete your calls to PassSDK.shared.application(_:didFinishLaunchingWithOptions:) and PassSDK.shared.applicationDidBecomeActive().
- Place the VGSDKService-Info.plist you were given in your project folder and add it to the app target.
- 刪除對 PassSDK.shared.application(_:didFinishLaunchingWithOptions:) 與 PassSDK.shared.applicationDidBecomeActive() 的呼叫。
- 將你收到的 VGSDKService-Info.plist 放入專案資料夾,並加入 App target。
- 删除对 PassSDK.shared.application(_:didFinishLaunchingWithOptions:) 与 PassSDK.shared.applicationDidBecomeActive() 的调用。
- 将你收到的 VGSDKService-Info.plist 放入工程文件夹,并加入 App target。
The removed application(_:didFinishLaunchingWithOptions:) and applicationDidBecomeActive() calls no longer compile. If VGSDKService-Info.plist is not in the app bundle, the SDK crashes on launch.
已移除的 application(_:didFinishLaunchingWithOptions:) 與 applicationDidBecomeActive() 呼叫將無法編譯。若 App 套件中沒有 VGSDKService-Info.plist,SDK 會在啟動時崩潰。
已移除的 application(_:didFinishLaunchingWithOptions:) 与 applicationDidBecomeActive() 调用将无法编译。若 App 包中没有 VGSDKService-Info.plist,SDK 会在启动时崩溃。
New App Inbox module (VGSDKAppInbox, CleverTap-backed)
Adds an in-app message inbox with a styleable UI (VGSDKAppInboxCleverTapStyle: title, tabs, and colors) plus the VGSDKAppInboxProvider protocol and VGSDKAppInboxMessage/VGSDKAppInboxMessageContent model protocols.
新增應用程式內訊息收件匣,提供可自訂樣式的介面(VGSDKAppInboxCleverTapStyle:標題、分頁與顏色),以及 VGSDKAppInboxProvider 協定與 VGSDKAppInboxMessage/VGSDKAppInboxMessageContent 模型協定。
新增应用内消息收件箱,提供可自定义样式的界面(VGSDKAppInboxCleverTapStyle:标题、标签页与颜色),以及 VGSDKAppInboxProvider 协议与 VGSDKAppInboxMessage/VGSDKAppInboxMessageContent 模型协议。
↪ This form is replaced in 3.12.0, see: AppInbox onItemClicked now passes raw CleverTap types
↪ 此寫法於 3.12.0 已被取代,請參見: AppInbox onItemClicked 現在直接傳回原生 CleverTap 型別
↪ 此写法于 3.12.0 已被取代,请参见: AppInbox onItemClicked 现在直接传回原生 CleverTap 类型
| VGSDKAppInbox | |
| VGSDKAppInbox.open(provider:listener:) | |
| VGSDKAppInboxCleverTapProvider | |
| VGSDKAppInboxCleverTapStyle | |
| VGSDKAppInboxListener | |
| VGSDKAppInboxProvider | |
| VGSDKAppInboxMessage | |
| VGSDKAppInboxMessageContent |
Open the inbox with VGSDKAppInbox.open(provider:listener:), passing a styled VGSDKAppInboxCleverTapProvider and a listener that handles the tapped item.
使用 VGSDKAppInbox.open(provider:listener:) 開啟收件匣,傳入已設定樣式的 VGSDKAppInboxCleverTapProvider 與處理點擊項目的 listener。
使用 VGSDKAppInbox.open(provider:listener:) 打开收件箱,传入已设置样式的 VGSDKAppInboxCleverTapProvider 与处理点击项目的 listener。
See the usage and full signature in the Integration guide:
Open the app inbox請在整合指南中查看用法與完整簽名:
開啟應用程式收件匣请在集成指南中查看用法与完整签名:
打开应用收件箱This addition is opt-in. Nothing breaks if you skip it: your existing integration keeps working, you just don’t gain this capability.
此新增功能為選用。略過不會造成任何問題:你現有的整合仍可正常運作,只是不會獲得此功能。
此新增功能为可选。跳过不会造成任何问题:你现有的集成仍可正常运行,只是不会获得此功能。
IronSource (IAA) config moved from PassIronSourceConfig.json to VGSDKIronSource-Info.plist
The IronSource in-app-ads module now reads its configuration from VGSDKIronSource-Info.plist instead of PassIronSourceConfig.json.
IronSource 應用內廣告模組現在改由 VGSDKIronSource-Info.plist 讀取設定,不再使用 PassIronSourceConfig.json。
IronSource 应用内广告模块现在改由 VGSDKIronSource-Info.plist 读取配置,不再使用 PassIronSourceConfig.json。
| PassIronSourceConfig.json | VGSDKIronSource-Info.plist |
- Delete PassIronSourceConfig.json from your project.
- Add the VGSDKIronSource-Info.plist you were given to your project folder and the app target.
- 從專案中刪除 PassIronSourceConfig.json。
- 將你收到的 VGSDKIronSource-Info.plist 加入專案資料夾與 App target。
- 从工程中删除 PassIronSourceConfig.json。
- 将你收到的 VGSDKIronSource-Info.plist 加入工程文件夹与 App target。
If you use the IronSource in-app-ads module and don’t migrate the config, IronSource initialization fails: a missing VGSDKIronSource-Info.plist reports ironSourceMissingConfig and a malformed one reports ironSourceConfigInvalidFormat.
若你使用 IronSource 應用內廣告模組卻未遷移設定,IronSource 初始化會失敗:缺少 VGSDKIronSource-Info.plist 會回報 ironSourceMissingConfig,格式錯誤則回報 ironSourceConfigInvalidFormat。
若你使用 IronSource 应用内广告模块却未迁移配置,IronSource 初始化会失败:缺少 VGSDKIronSource-Info.plist 会报告 ironSourceMissingConfig,格式错误则报告 ironSourceConfigInvalidFormat。
GVoice voice-chat API removed
The entire GVoice module (the PassSDKGVoice facade plus its GTSDKVoiceChatDelegate / GTSDKVoiceMessageDelegate delegates and the GTSDKVoiceErrorCode enum) was deleted in 3.12.0.
整個 GVoice 模組(PassSDKGVoice 門面連同其 GTSDKVoiceChatDelegate / GTSDKVoiceMessageDelegate 委派與 GTSDKVoiceErrorCode 列舉)已在 3.12.0 中刪除。
整个 GVoice 模块(PassSDKGVoice 门面连同其 GTSDKVoiceChatDelegate / GTSDKVoiceMessageDelegate 委托与 GTSDKVoiceErrorCode 枚举)已在 3.12.0 中删除。
| PassSDKGVoice | |
| GTSDKVoiceChatDelegate | |
| GTSDKVoiceMessageDelegate | |
| GTSDKVoiceErrorCode |
Remove every call to PassSDKGVoice and its GTSDKVoiceChatDelegate, GTSDKVoiceMessageDelegate and GTSDKVoiceErrorCode types.
移除所有對 PassSDKGVoice 及其 GTSDKVoiceChatDelegate、GTSDKVoiceMessageDelegate 與 GTSDKVoiceErrorCode 型別的呼叫。
移除所有对 PassSDKGVoice 及其 GTSDKVoiceChatDelegate、GTSDKVoiceMessageDelegate 与 GTSDKVoiceErrorCode 类型的调用。
The old API no longer exists, so your project stops compiling until you migrate.
舊 API 已不存在,未完成遷移前你的專案將無法編譯。
旧 API 已不存在,未完成迁移前你的工程将无法编译。
AIHelp customer-support facade removed
The PassSDKAIHelp facade and its PassAIHelpUser / PassAIHelpApiConfig models were deleted.
PassSDKAIHelp 門面及其 PassAIHelpUser / PassAIHelpApiConfig 模型已刪除。
PassSDKAIHelp 门面及其 PassAIHelpUser / PassAIHelpApiConfig 模型已删除。
| PassSDKAIHelp.show(with:) | |
| PassSDKAIHelp.setUser(with:) | |
| PassAIHelpUser | |
| PassAIHelpApiConfig |
- Remove every call to PassSDKAIHelp.setUser(with:) and PassSDKAIHelp.show(with:).
- Delete every use of the PassAIHelpUser and PassAIHelpApiConfig models.
- 移除所有對 PassSDKAIHelp.setUser(with:) 與 PassSDKAIHelp.show(with:) 的呼叫。
- 刪除所有使用 PassAIHelpUser 與 PassAIHelpApiConfig 模型的程式碼。
- 移除所有对 PassSDKAIHelp.setUser(with:) 与 PassSDKAIHelp.show(with:) 的调用。
- 删除所有使用 PassAIHelpUser 与 PassAIHelpApiConfig 模型的代码。
The old API no longer exists, so your project stops compiling until you migrate.
舊 API 已不存在,未完成遷移前你的專案將無法編譯。
旧 API 已不存在,未完成迁移前你的工程将无法编译。
fetchRemoteConfig now returns typed VGSDKFirebaseRemoteConfigValue
The completion signature changed from ([String: Any]?, Error?) to ([String: VGSDKFirebaseRemoteConfigValue]?, Error?) with a new VGSDKFirebaseRemoteConfigValue wrapper, and the callback is now delivered on the main thread.
完成回呼簽章由 ([String: Any]?, Error?) 變更為 ([String: VGSDKFirebaseRemoteConfigValue]?, Error?),並新增 VGSDKFirebaseRemoteConfigValue 包裝型別,且回呼現在於主執行緒上派送。
完成回调签名由 ([String: Any]?, Error?) 变更为 ([String: VGSDKFirebaseRemoteConfigValue]?, Error?),并新增 VGSDKFirebaseRemoteConfigValue 包装类型,且回调现在在主线程上派发。
| [String: Any] | [String: VGSDKFirebaseRemoteConfigValue] |
Switch each call to the replacement shown in the table above.
將每個呼叫改為上表所示的替代項目。
将每个调用改为上表所示的替代项。
The old API no longer exists, so your project stops compiling until you migrate.
舊 API 已不存在,未完成遷移前你的專案將無法編譯。
旧 API 已不存在,未完成迁移前你的工程将无法编译。
AppInbox onItemClicked now passes raw CleverTap types
The VGSDKAppInboxMessage / VGSDKAppInboxMessageContent wrapper protocols were removed and the callback now exposes CleverTap’s own message objects directly.
VGSDKAppInboxMessage / VGSDKAppInboxMessageContent 包裝協定已移除,回呼現在直接暴露 CleverTap 自身的訊息物件。
VGSDKAppInboxMessage / VGSDKAppInboxMessageContent 包装协议已移除,回调现在直接暴露 CleverTap 自身的消息对象。
| VGSDKAppInboxMessage | CleverTapInboxMessage |
| VGSDKAppInboxMessageContent | CleverTapInboxMessageContent |
Switch each call to the replacement shown in the table above.
將每個呼叫改為上表所示的替代項目。
将每个调用改为上表所示的替代项。
The old API no longer exists, so your project stops compiling until you migrate.
舊 API 已不存在,未完成遷移前你的專案將無法編譯。
旧 API 已不存在,未完成迁移前你的工程将无法编译。
New VGSDK.setGameContext for role/server context
3.12.0 adds the VGSDK facade with setGameContext(context:) and the VGSDKGameContext(roleId:serverId:) model. A context with an empty roleId or serverId is ignored.
3.12.0 新增 VGSDK 門面的 setGameContext(context:) 與 VGSDKGameContext(roleId:serverId:) 模型。roleId 或 serverId 為空的情境會被忽略。
3.12.0 新增 VGSDK 门面的 setGameContext(context:) 与 VGSDKGameContext(roleId:serverId:) 模型。roleId 或 serverId 为空的上下文会被忽略。
| VGSDK | |
| VGSDK.setGameContext(context:) | |
| VGSDKGameContext |
Call VGSDK.setGameContext(context:) with a VGSDKGameContext once the player has picked a role and server.
在玩家選好角色與伺服器後,以 VGSDKGameContext 呼叫 VGSDK.setGameContext(context:)。
在玩家选好角色与服务器后,以 VGSDKGameContext 调用 VGSDK.setGameContext(context:)。
See the usage and full signature in the Integration guide:
Set the game context請在整合指南中查看用法與完整簽名:
設定遊戲情境请在集成指南中查看用法与完整签名:
设置游戏上下文This addition is opt-in. Nothing breaks if you skip it: your existing integration keeps working, you just don’t gain this capability.
此新增功能為選用。略過不會造成任何問題:你現有的整合仍可正常運作,只是不會獲得此功能。
此新增功能为可选。跳过不会造成任何问题:你现有的集成仍可正常运行,只是不会获得此功能。
In-app purchase errors now reach the purchase listener
Previously a thrown StoreKit error inside the purchase task left the completion unfired, so the listener never returned and the flow appeared to hang. The purchase now reports .failed with the underlying error.
先前購買任務中拋出的 StoreKit 錯誤會導致完成回呼不被觸發,監聽器永遠不會回傳,流程看似卡住。購買現在會以底層錯誤回報 .failed。
此前购买任务中抛出的 StoreKit 错误会导致完成回调不被触发,监听器永远不会回传,流程看似卡住。购买现在会以底层错误回报 .failed。
| VGSDKPaymentPurchaseStatus.failed |
Handle the .failed status wherever you switch over VGSDKPaymentPurchaseStatus, treating it as a purchase that failed with the underlying StoreKit error.
在所有對 VGSDKPaymentPurchaseStatus 進行 switch 的位置處理 .failed 狀態,並將其視為因底層 StoreKit 錯誤而失敗的購買。
在所有对 VGSDKPaymentPurchaseStatus 进行 switch 的位置处理 .failed 状态,并将其视为因底层 StoreKit 错误而失败的购买。
See the usage and full signature in the Integration guide:
PurchaseVGSDKPaymentPurchaseStatus請在整合指南中查看用法與完整簽名:
購買VGSDKPaymentPurchaseStatus请在集成指南中查看用法与完整签名:
购买VGSDKPaymentPurchaseStatusIf your VGSDKPayment.purchase listener doesn’t handle the .failed status, StoreKit purchase errors that now surface (previously the flow silently hung) are ignored, so a failed purchase produces no reaction in your game.
若你的 VGSDKPayment.purchase 監聽器未處理 .failed 狀態,現在會浮現的 StoreKit 購買錯誤(先前流程會靜默卡住)將被忽略,導致購買失敗時你的遊戲毫無反應。
若你的 VGSDKPayment.purchase 监听器未处理 .failed 状态,现在会浮现的 StoreKit 购买错误(此前流程会静默卡住)将被忽略,导致购买失败时你的游戏毫无反应。
New VGSDKFirebase.fetchRemoteConfig returns plain string values
PassSDKFirebase.fetchRemoteConfig is deprecated and will be removed in a future release. Its completion still returns [String: VGSDKFirebaseRemoteConfigValue]?, whose wrapper objects are replaced by plain strings in the new VGSDKFirebase API.
PassSDKFirebase.fetchRemoteConfig 已棄用,並將於未來版本移除。其回呼仍回傳 [String: VGSDKFirebaseRemoteConfigValue]?,新的 VGSDKFirebase API 已用純字串取代這些包裝物件。
PassSDKFirebase.fetchRemoteConfig 已弃用,并将在未来版本中移除。其回调仍返回 [String: VGSDKFirebaseRemoteConfigValue]?,新的 VGSDKFirebase API 已用纯字符串取代这些包装对象。
| VGSDKFirebase | |
| VGSDKFirebase.fetchRemoteConfig(_:) |
| PassSDKFirebase.fetchRemoteConfig(_:) | VGSDKFirebase.fetchRemoteConfig(_:) |
- Replace every PassSDKFirebase.fetchRemoteConfig call with VGSDKFirebase.fetchRemoteConfig.
- Read each value directly as a String and remove the .boolValue, .stringValue, .numberValue and .jsonValue accessors.
- 將每個 PassSDKFirebase.fetchRemoteConfig 呼叫改為 VGSDKFirebase.fetchRemoteConfig。
- 直接以 String 讀取每個值,並移除 .boolValue、.stringValue、.numberValue 與 .jsonValue 等存取器。
- 将每个 PassSDKFirebase.fetchRemoteConfig 调用改为 VGSDKFirebase.fetchRemoteConfig。
- 直接以 String 读取每个值,并移除 .boolValue、.stringValue、.numberValue 与 .jsonValue 等访问器。
See the usage and full signature in the Integration guide:
Fetch Firebase Remote Config請在整合指南中查看用法與完整簽名:
取得 Firebase Remote Config请在集成指南中查看用法与完整签名:
获取 Firebase Remote ConfigPassSDKFirebase.fetchRemoteConfig still works today, but it is deprecated and scheduled for removal. Your build breaks once a later release deletes it, and you keep unwrapping VGSDKFirebaseRemoteConfigValue objects instead of reading strings.
PassSDKFirebase.fetchRemoteConfig 目前仍可運作,但已棄用並列入移除計畫。待日後版本刪除後你的建置將失敗,而且你仍需拆解 VGSDKFirebaseRemoteConfigValue 物件,而非直接讀取字串。
PassSDKFirebase.fetchRemoteConfig 目前仍可运行,但已弃用并列入移除计划。待日后版本删除后你的构建将失败,而且你仍需拆解 VGSDKFirebaseRemoteConfigValue 对象,而非直接读取字符串。
New VGSDKSupport module for the Customer Support Portal
In 3.15.0 PassSDK.shared.showCustomerSupport(with:completion:) is deprecated. Use the equivalent function in the new VGSDKSupport module for continued support and its listener-based callbacks.
在 3.15.0 中,PassSDK.shared.showCustomerSupport(with:completion:) 已棄用。請改用新 VGSDKSupport 模組中的對應函式,以獲得持續支援與其 listener 回呼機制。
在 3.15.0 中,PassSDK.shared.showCustomerSupport(with:completion:) 已弃用。请改用新 VGSDKSupport 模块中的对应函数,以获得持续支持与其 listener 回调机制。
| VGSDKSupport | |
| VGSDKSupport.openSupportCenter(info:listener:) |
| PassSDK.shared.showCustomerSupport(with:completion:) | VGSDKSupport.openSupportCenter(info:listener:) |
Migrate calls of PassSDK.shared.showCustomerSupport(with:completion:) to VGSDKSupport.openSupportCenter(info:listener:).
將 PassSDK.shared.showCustomerSupport(with:completion:) 的呼叫遷移到 VGSDKSupport.openSupportCenter(info:listener:)。
将 PassSDK.shared.showCustomerSupport(with:completion:) 的调用迁移到 VGSDKSupport.openSupportCenter(info:listener:)。
See the usage and full signature in the Integration guide:
Open support centerVGSDKSupportInfo請在整合指南中查看用法與完整簽名:
開啟支援中心VGSDKSupportInfo请在集成指南中查看用法与完整签名:
打开客户支持中心VGSDKSupportInfoPassSDK.shared.showCustomerSupport(with:completion:) still works today, but it is deprecated and scheduled for removal. Your build breaks once a later release deletes it, and you keep the old completion callback instead of the listener callbacks.
PassSDK.shared.showCustomerSupport(with:completion:) 目前仍可運作,但已棄用並列入移除計畫。待日後版本刪除後你的建置將失敗,而且你仍使用舊的 completion 回呼,而非 listener 回呼。
PassSDK.shared.showCustomerSupport(with:completion:) 目前仍可运行,但已弃用并列入移除计划。待日后版本删除后你的构建将失败,而且你仍使用旧的 completion 回调,而非 listener 回调。
PassSDK.shared.scene(_:openURLContexts:) removed
3.15.0 removes the public scene(_:openURLContexts:) forwarding method from PassSDK. The SDK now handles scene URL opens automatically. Any integrator still calling the old method will fail to compile.
3.15.0 從 PassSDK 移除了公開的 scene(_:openURLContexts:) 轉發方法。SDK 現在會自動處理 scene 的 URL 開啟。仍呼叫舊方法的接入方將無法通過編譯。
3.15.0 从 PassSDK 移除了公开的 scene(_:openURLContexts:) 转发方法。SDK 现在会自动处理 scene 的 URL 打开。仍调用旧方法的接入方将无法通过编译。
| PassSDK.shared.scene(_:openURLContexts:) |
Delete every PassSDK.shared.scene(_:openURLContexts:) call from your UISceneDelegate.
從你的 UISceneDelegate 中刪除所有 PassSDK.shared.scene(_:openURLContexts:) 呼叫。
从你的 UISceneDelegate 中删除所有 PassSDK.shared.scene(_:openURLContexts:) 调用。
The old API no longer exists, so your project stops compiling until you migrate.
舊 API 已不存在,未完成遷移前你的專案將無法編譯。
旧 API 已不存在,未完成迁移前你的工程将无法编译。
iOS 15 deployment target required by the Firebase 12.12.1 variant
The SDK ships two Firebase variants and the minimum iOS version follows the one you take. Firebase 12.12.1 requires an iOS 15 deployment target. Firebase 11.15.0 still supports iOS 13. No public SDK facade or model changed in this release.
SDK 提供兩種 Firebase 版本,最低 iOS 版本取決於你採用的版本。Firebase 12.12.1 需要 iOS 15 部署目標。Firebase 11.15.0 仍支援 iOS 13。本版本未變更任何公開的 SDK facade 或 model。
SDK 提供两种 Firebase 版本,最低 iOS 版本取决于你采用的版本。Firebase 12.12.1 需要 iOS 15 部署目标。Firebase 11.15.0 仍支持 iOS 13。本版本未变更任何公开的 SDK facade 或 model。
- Raise your app’s iOS deployment target to 15.0 or higher if your build takes Firebase 12.12.1.
- Stay on the Firebase 11.15.0 variant if you must keep supporting iOS 13 or 14.
- 若你的建置採用 Firebase 12.12.1,請將 App 的 iOS 部署目標提升至 15.0 或以上。
- 若你必須繼續支援 iOS 13 或 14,請維持使用 Firebase 11.15.0 版本。
- 若你的构建采用 Firebase 12.12.1,请将 App 的 iOS 部署目标提升至 15.0 或以上。
- 若你必须继续支持 iOS 13 或 14,请保持使用 Firebase 11.15.0 版本。
An app still targeting iOS 13 or 14 will not build against the Firebase 12.12.1 variant. It continues to build against Firebase 11.15.0.
仍以 iOS 13 或 14 為目標的 App 無法與 Firebase 12.12.1 版本建置,但仍可使用 Firebase 11.15.0 版本建置。
仍以 iOS 13 或 14 为目标的 App 无法与 Firebase 12.12.1 版本构建,但仍可使用 Firebase 11.15.0 版本构建。
Register a deep-link listener for native in-app messages
3.17.0 adds the deep-link listener the integrator must register to receive deep links from Apollo in-app messages: without it, a deep link carried by an in-app message is not delivered to the game.
3.17.0 新增了整合方必須註冊的 deep-link 監聽器,用以接收來自 Apollo 應用內訊息的 deep link:若未註冊,應用內訊息所攜帶的 deep link 不會傳遞給遊戲。
3.17.0 新增了接入方必须注册的 deep-link 监听器,用以接收来自 Apollo 应用内消息的 deep link:若未注册,应用内消息所携带的 deep link 不会传递给游戏。
| VGSDKInAppMessageDeepLinkListener | |
| VGSDKAppInbox.setInAppMessageDeepLinkListener(listener:) |
- Register a VGSDKInAppMessageDeepLinkListener with VGSDKAppInbox.setInAppMessageDeepLinkListener(listener:).
- Route the deep link your onDeepLink closure receives.
- 以 VGSDKAppInbox.setInAppMessageDeepLinkListener(listener:) 註冊 VGSDKInAppMessageDeepLinkListener。
- 在 onDeepLink closure 收到 deep link 時於遊戲內導頁。
- 以 VGSDKAppInbox.setInAppMessageDeepLinkListener(listener:) 注册 VGSDKInAppMessageDeepLinkListener。
- 在 onDeepLink closure 收到 deep link 时于游戏内跳转。
See the usage and full signature in the Integration guide:
Set in-app-message deep-link listener請在整合指南中查看用法與完整簽名:
設定應用程式內訊息深層連結監聽器请在集成指南中查看用法与完整签名:
设置应用内消息深链监听器This addition is opt-in. Nothing breaks if you skip it: your existing integration keeps working, you just don’t gain this capability.
此新增功能為選用。略過不會造成任何問題:你現有的整合仍可正常運作,只是不會獲得此功能。
此新增功能为可选。跳过不会造成任何问题:你现有的集成仍可正常运行,只是不会获得此功能。
Swift Package Manager integration now supported
3.18.0 adds Swift Package Manager as an integration option alongside the existing manual framework embedding. You can add the SDK as a Swift Package instead of embedding the VNGGames SDK frameworks by hand. The manual-framework path is still fully supported, so adopting SPM is opt-in.
3.18.0 新增 Swift Package Manager 作為整合方式,與既有的手動嵌入 framework 並存。你可以改用 Swift Package 加入 SDK,而不必手動嵌入 VNGGames SDK framework。手動嵌入 framework 的方式仍完整支援,因此採用 SPM 為選用。
3.18.0 新增 Swift Package Manager 作为集成方式,与既有的手动嵌入 framework 并存。你可以改用 Swift Package 添加 SDK,而不必手动嵌入 VNGGames SDK framework。手动嵌入 framework 的方式仍完整支持,因此采用 SPM 为可选。
Integrate the SDK via Swift Package Manager by following the Get Started section of the Integration guide.
依照整合指南的 Get Started 章節,以 Swift Package Manager 整合 SDK。
按照集成指南的 Get Started 章节,以 Swift Package Manager 集成 SDK。
This addition is opt-in. Nothing breaks if you skip it: your existing integration keeps working, you just don’t gain this capability.
此新增功能為選用。略過不會造成任何問題:你現有的整合仍可正常運作,只是不會獲得此功能。
此新增功能为可选。跳过不会造成任何问题:你现有的集成仍可正常运行,只是不会获得此功能。
Legacy PassSDK* facades deprecated in favor of VGSDK* equivalents
3.18.0 introduces the VGSDK-prefixed facade layer. The legacy Pass* classes are deprecated (they still work) and are slated for removal in a future release.
3.18.0 導入 VGSDK 前綴的門面層。舊版 Pass* 類別已棄用(仍可運作),並將於未來版本移除。
3.18.0 引入 VGSDK 前缀的门面层。旧版 Pass* 类已弃用(仍可使用),并将在未来版本中移除。
| PassSDKFacebook | VGSDKFacebook |
| PassSDKThinkingData | VGSDKThinkingData |
| PassSDKCleverTap | VGSDKCleverTap |
| PassSDKInstagram | VGSDKInstagram |
| PassSDKIronSource | VGSDKIronSource |
| PassSDKUtilities | VGSDKUtilities |
Switch each call to the replacement shown in the table above.
將每個呼叫改為上表所示的替代項目。
将每个调用改为上表所示的替代项。
It still works today, but is scheduled for removal. Your build breaks once a later release deletes it.
目前仍可運作,但已列入移除計畫。待日後版本刪除後,你的建置將失敗。
目前仍可运行,但已列入移除计划。待日后版本删除后,你的构建将失败。
Per-provider analytics events consolidated onto VGSDKAnalytics
3.18.0 mirrors every AppsFlyer/Facebook/Firebase/CleverTap/DataPlatform/ThinkingData event method onto the single VGSDKAnalytics facade.
3.18.0 將所有 AppsFlyer/Facebook/Firebase/CleverTap/DataPlatform/ThinkingData 事件方法鏡射到單一的 VGSDKAnalytics 門面。
3.18.0 将所有 AppsFlyer/Facebook/Firebase/CleverTap/DataPlatform/ThinkingData 事件方法镜像到单一的 VGSDKAnalytics 门面。
| PassSDKAnalytics | VGSDKAnalytics |
Switch each call to the replacement shown in the table above.
將每個呼叫改為上表所示的替代項目。
将每个调用改为上表所示的替代项。
It still works today, but is scheduled for removal. Your build breaks once a later release deletes it.
目前仍可運作,但已列入移除計畫。待日後版本刪除後,你的建置將失敗。
目前仍可运行,但已列入移除计划。待日后版本删除后,你的构建将失败。
New .pending case on VGSDKPaymentPurchaseStatus
3.18.0 adds case pending to the public @objc enum VGSDKPaymentPurchaseStatus, so integrators gain a distinct pending outcome and any exhaustive switch over the enum must be updated.
3.18.0 於公開的 @objc enum VGSDKPaymentPurchaseStatus 新增 case pending,因此整合方多了一個獨立的待處理結果,且所有窮舉式 switch 都必須更新。
3.18.0 在公开的 @objc enum VGSDKPaymentPurchaseStatus 新增 case pending,因此接入方多了一个独立的待处理结果,且所有穷举式 switch 都必须更新。
| VGSDKPaymentPurchaseStatus.pending |
Handle the new .pending case wherever you switch over VGSDKPaymentPurchaseStatus, treating it as a purchase that is accepted but not yet completed.
在任何對 VGSDKPaymentPurchaseStatus 進行 switch 的地方處理新的 .pending 狀態,並將它視為已被接受但尚未完成的交易。
在任何对 VGSDKPaymentPurchaseStatus 进行 switch 的地方处理新的 .pending 状态,并将它视为已被接受但尚未完成的交易。
See the usage and full signature in the Integration guide:
PurchaseVGSDKPaymentPurchaseStatus請在整合指南中查看用法與完整簽名:
購買VGSDKPaymentPurchaseStatus请在集成指南中查看用法与完整签名:
购买VGSDKPaymentPurchaseStatusA Swift exhaustive switch with no default won’t compile until .pending is handled. Objective-C keeps building, so an unhandled .pending is silently treated as another outcome.
沒有 default 的 Swift 窮舉式 switch 在處理 .pending 之前無法編譯。Objective-C 仍可建置,因此未處理的 .pending 會被靜默當成其他結果。
没有 default 的 Swift 穷举式 switch 在处理 .pending 之前无法编译。Objective-C 仍可构建,因此未处理的 .pending 会被静默当成其他结果。
Show and hide the App Inbox floating button from your game
3.19.0 hands the App Inbox floating button over to the game, so it can be taken off a cutscene or a full-screen shop and put back in the lobby. The first call in either direction takes control for the rest of the session, and the SDK stops showing or hiding the button on its own.
3.19.0 將 App Inbox 浮動按鈕交由遊戲控制,可在過場動畫或全螢幕商店中移除,並在大廳重新顯示。任一方向的第一次呼叫即會取得本次工作階段的控制權,SDK 不再自行顯示或隱藏該按鈕。
3.19.0 将 App Inbox 浮动按钮交由游戏控制,可在过场动画或全屏商店中移除,并在大厅重新显示。任一方向的第一次调用即会取得本次会话的控制权,SDK 不再自行显示或隐藏该按钮。
| VGSDKAppInbox.showFloatingButton() | |
| VGSDKAppInbox.hideFloatingButton() |
- Call VGSDKAppInbox.hideFloatingButton() when your game enters a screen the button must stay off.
- Call VGSDKAppInbox.showFloatingButton() when the player reaches a screen where it may appear again.
- Re-issue the call your screen needs after a logout, because the next session starts with the SDK deciding again.
- Read the SDK log for the outcome of each call, because neither method returns a value.
- 在遊戲進入不應顯示按鈕的畫面時呼叫 VGSDKAppInbox.hideFloatingButton()。
- 在玩家回到允許顯示按鈕的畫面時呼叫 VGSDKAppInbox.showFloatingButton()。
- 登出後重新發出該畫面所需的呼叫,因為下一個工作階段會交回 SDK 決定。
- 從 SDK 日誌確認每次呼叫的結果,因為兩個方法都不會回傳值。
- 在游戏进入不应显示按钮的界面时调用 VGSDKAppInbox.hideFloatingButton()。
- 在玩家回到允许显示按钮的界面时调用 VGSDKAppInbox.showFloatingButton()。
- 登出后重新发出该界面所需的调用,因为下一个会话会交回 SDK 决定。
- 从 SDK 日志确认每次调用的结果,因为两个方法都不会返回值。
See the usage and full signature in the Integration guide:
Show the app inbox floating buttonHide the app inbox floating buttonNothing breaks and the App Inbox keeps working, but the SDK alone decides when the floating button is on screen, so it can sit over a cutscene or a full-screen shop with no way for your game to move it out of the way.
不會有任何中斷,App Inbox 仍照常運作,但浮動按鈕何時出現完全由 SDK 決定,因此它可能疊在過場動畫或全螢幕商店上,而遊戲無法將它移開。
不会有任何中断,App Inbox 仍照常运作,但浮动按钮何时出现完全由 SDK 决定,因此它可能叠在过场动画或全屏商店上,而游戏无法将它移开。
Hiding the App Inbox button now also holds back in-app messages
The same two App Inbox visibility calls now also decide whether in-app messages may appear, so a hide keeps banners and modals off a match screen with no second API to call. Content that becomes eligible while hidden is kept and released one at a time after the next show call, in its existing priority order.
同樣的兩個 App Inbox 顯示與隱藏呼叫,現在也決定 In-App Message 是否能出現,因此隱藏即可讓橫幅與彈窗不出現在戰鬥畫面,不需要另一個 API。隱藏期間符合條件的內容會被保留,並在下一次顯示呼叫後依原本的優先順序逐一釋出。
同样的两个 App Inbox 显示与隐藏调用,现在也决定 In-App Message 是否能出现,因此隐藏即可让横幅与弹窗不出现在战斗界面,不需要另一个 API。隐藏期间符合条件的内容会被保留,并在下一次显示调用后按原本的优先顺序逐一释出。
| VGSDKAppInbox.hideFloatingButton() | |
| VGSDKAppInbox.showFloatingButton() |
- Review every VGSDKAppInbox.hideFloatingButton() call site, because each one now also stops in-app messages from appearing.
- Keep the hide calls only on screens where holding back banners and modals is also what you want.
- Call VGSDKAppInbox.showFloatingButton() as soon as the player reaches a safe screen, so held content is released one at a time.
- Re-test your in-app message flow across a hide and show round trip, including content that arrives while hidden.
- 檢視每一處 VGSDKAppInbox.hideFloatingButton() 呼叫,因為現在每一次都會同時讓 In-App Message 不再出現。
- 只在同時希望暫停橫幅與彈窗的畫面保留隱藏呼叫。
- 玩家一回到安全畫面就呼叫 VGSDKAppInbox.showFloatingButton(),讓保留的內容逐一釋出。
- 重新測試隱藏與顯示往返的 In-App Message 流程,包含隱藏期間送達的內容。
- 检视每一处 VGSDKAppInbox.hideFloatingButton() 调用,因为现在每一次都会同时让 In-App Message 不再出现。
- 只在同时希望暂停横幅与弹窗的界面保留隐藏调用。
- 玩家一回到安全界面就调用 VGSDKAppInbox.showFloatingButton(),让保留的内容逐一释出。
- 重新测试隐藏与显示往返的 In-App Message 流程,包含隐藏期间送达的内容。
See the usage and full signature in the Integration guide:
Show the app inbox floating buttonHide the app inbox floating buttonYour existing calls keep compiling and the button still hides, but any screen where you hid it purely for layout now also holds back in-app messages, so content piles up until you call show again and anything whose own validity window closes while hidden is never seen.
現有呼叫仍可正常編譯,按鈕也照樣隱藏,但凡是僅為版面而隱藏的畫面,現在也會一併暫停 In-App Message,內容會持續累積到再次呼叫顯示為止,而在隱藏期間就過期的內容將永遠不會被看到。
现有调用仍可正常编译,按钮也照样隐藏,但凡是仅为版面而隐藏的界面,现在也会一并暂停 In-App Message,内容会持续累积到再次调用显示为止,而在隐藏期间就过期的内容将永远不会被看到。
Facebook sharing now opens in the Facebook app
Share dialogs now open in the native Facebook app instead of the iOS share sheet, which is what makes them work again on Facebook SDK 18.1.0. Sharing a link now fails with error 9027 when the Facebook app is missing, the same guard photo sharing already applied.
分享對話框現在改為在原生 Facebook 應用程式中開啟,不再使用 iOS 分享表單,這正是它們在 Facebook SDK 18.1.0 上恢復運作的原因。當裝置未安裝 Facebook 應用程式時,分享連結現在會回傳錯誤 9027,與分享相片原本就有的檢查一致。
分享对话框现在改为在原生 Facebook 应用中打开,不再使用 iOS 分享表单,这正是它们在 Facebook SDK 18.1.0 上恢复运作的原因。当设备未安装 Facebook 应用时,分享链接现在会返回错误 9027,与分享照片原本就有的检查一致。
| VGSDKFacebook.shareLink(url:completion:) | |
| VGSDKFacebook.sharePhoto(_:completion:) |
- Handle error 9027 on your Facebook share callback and tell the player the Facebook app is required.
- Drop any assumption that sharing falls back to the iOS share sheet, because the dialog now opens only in the Facebook app.
- Re-test Facebook photo and link sharing on a device with the Facebook app removed.
- 在 Facebook 分享的回呼中處理錯誤 9027,並告知玩家需要安裝 Facebook 應用程式。
- 不要再假設分享會退回 iOS 分享表單,因為對話框現在只會在 Facebook 應用程式中開啟。
- 在已移除 Facebook 應用程式的裝置上,重新測試 Facebook 相片與連結分享。
- 在 Facebook 分享的回调中处理错误 9027,并告知玩家需要安装 Facebook 应用。
- 不要再假设分享会退回 iOS 分享表单,因为对话框现在只会在 Facebook 应用中打开。
- 在已移除 Facebook 应用的设备上,重新测试 Facebook 照片与链接分享。
See the usage and full signature in the Integration guide:
Share link to FacebookShare photo to FacebookSocial (9xxx)請在整合指南中查看用法與完整簽名:
分享連結到 Facebook分享相片到 Facebook社群(9xxx)请在集成指南中查看用法与完整签名:
分享链接到 Facebook分享照片到 Facebook社交 (9xxx)Your code keeps compiling and sharing still works for players who have the Facebook app, but a player without it now gets error 9027 where the iOS share sheet used to open, so an unhandled callback leaves the share doing nothing.
程式碼仍可正常編譯,對有安裝 Facebook 應用程式的玩家分享也照常運作,但未安裝的玩家現在會在原本開啟 iOS 分享表單的位置收到錯誤 9027,因此未處理的回呼會讓分享毫無反應。
代码仍可正常编译,对已安装 Facebook 应用的玩家分享也照常运作,但未安装的玩家现在会在原本打开 iOS 分享表单的位置收到错误 9027,因此未处理的回调会让分享毫无反应。
Direct login can open the Guest account recovery screen
3.19.2 adds .recoveryAccount to the public @objc enum PassLoginType, so a game that builds its own login UI can send a player to Guest account recovery through the directLogin it already calls. PassSDK gains no method, and the channel is Legacy only.
3.19.2 於公開的 @objc enum PassLoginType 新增 .recoveryAccount,因此自行製作登入介面的遊戲可以透過原本就會呼叫的 directLogin,將玩家帶往訪客帳號尋回。PassSDK 沒有新增任何方法,這個頻道也僅在 Legacy 登入平台上提供。
3.19.2 在公开的 @objc enum PassLoginType 新增 .recoveryAccount,因此自行制作登录界面的游戏可以通过原本就会调用的 directLogin,将玩家带往访客账号寻回。PassSDK 没有新增任何方法,这个渠道也仅在 Legacy 登录平台上提供。
| PassLoginType.recoveryAccount |
- Add .recoveryAccount to any Swift switch over PassLoginType that has no default clause, because the switch must cover every case the enum has. The arm only has to compile, since the SDK never reports this case.
- Call PassSDK.shared.directLogin(.recoveryAccount) from your own recovery entry point, on a Legacy game only.
- Keep the completion you already pass, and read the PassUserInfo it returns as a Guest session, because the SDK maps recovery onto Guest before it reports anything.
- Handle the cancel-login error your completion already receives, because closing the screen cancels the call, and so do the back action and dismissing the confirmation the SDK shows when the device already holds a Guest account.
- Handle error 9050 on the same completion. It arrives when the SDK cannot read the recovery entry in your support configuration.
- 在任何沒有 default 分支、且對 PassLoginType 進行 switch 的位置補上 .recoveryAccount,因為 switch 必須涵蓋列舉現有的每一個 case。由於 SDK 永遠不會回報這個 case,該分支只需要能編譯即可。
- 在你自己的尋回入口呼叫 PassSDK.shared.directLogin(.recoveryAccount),且僅限 Legacy 遊戲。
- 沿用原本傳入的 completion,並將它回傳的 PassUserInfo 視為 Guest 工作階段,因為 SDK 會先把尋回對應成 Guest 才回報。
- 處理 completion 原本就會收到的取消登入錯誤,因為關閉畫面會取消這次呼叫,返回動作以及關閉裝置上已有訪客帳號時顯示的確認對話框也一樣。
- 在同一個 completion 上處理錯誤 9050。當 SDK 無法讀取支援設定中的尋回項目時就會收到它。
- 在任何没有 default 分支、且对 PassLoginType 进行 switch 的位置补上 .recoveryAccount,因为 switch 必须涵盖枚举现有的每一个 case。由于 SDK 永远不会报告这个 case,该分支只需要能编译即可。
- 在你自己的寻回入口调用 PassSDK.shared.directLogin(.recoveryAccount),且仅限 Legacy 游戏。
- 沿用原本传入的 completion,并将它返回的 PassUserInfo 视为 Guest 会话,因为 SDK 会先把寻回映射成 Guest 才报告。
- 处理 completion 原本就会收到的取消登录错误,因为关闭界面会取消这次调用,返回动作以及关闭设备上已有访客账号时显示的确认对话框也一样。
- 在同一个 completion 上处理错误 9050。当 SDK 无法读取支持配置中的寻回条目时就会收到它。
See the usage and full signature in the Integration guide:
Recover a Guest account請在整合指南中查看用法與完整簽名:
尋回訪客帳號请在集成指南中查看用法与完整签名:
寻回访客账号A Swift switch over PassLoginType with no default stops compiling until .recoveryAccount is handled, and the arm you add is unreachable, because a recovered player is reported on .guest. Objective-C only warns. On a VGA game the call raises a fatal error instead of answering your completion.
沒有 default 分支且對 PassLoginType 進行 switch 的 Swift 程式碼,在處理 .recoveryAccount 之前無法編譯,而你補上的分支其實不會被執行,因為尋回成功的玩家會以 .guest 回報。Objective-C 只會出現警告。若在 VGA 遊戲上採用,這次呼叫會引發致命錯誤,而不是回應你的 completion。
没有 default 分支且对 PassLoginType 进行 switch 的 Swift 代码,在处理 .recoveryAccount 之前无法编译,而你补上的分支其实不会被执行,因为寻回成功的玩家会以 .guest 报告。Objective-C 只会出现警告。若在 VGA 游戏上采用,这次调用会引发致命错误,而不是响应你的 completion。
New Age Assurance API (VGSDKCompliance)
Adds one call that returns the store’s age band for the signed in account, in a single result shape that is identical on every platform. It replaces nothing, and no existing call changes.
新增一個呼叫,回傳商店針對已登入帳號的年齡區間,並以在各平台完全一致的單一結果結構呈現。它沒有取代任何東西,既有的呼叫也都沒有變動。
新增一个调用,返回商店针对已登录账号的年龄区间,并以在各平台完全一致的单一结果结构呈现。它没有取代任何东西,既有的调用也都没有变动。
| VGSDKCompliance | |
| VGSDKCompliance.requestAgeSignals(listener:) | |
| VGSDKAgeSignal | |
| VGSDKAgeAccess | |
| VGSDKAgeReason | |
| VGSDKAgeRange | |
| VGSDKAgeSource | |
| VGSDKAgeAssurance | |
| VGSDKAgeSetBy | |
| VGSDKAgeError | |
| VGSDKAgeSignalListener |
- Ask VNGGames to add the AgeAssurance feature key to your build before you ship the call, because without it the SDK halts your application instead of answering.
- Add the com.apple.developer.declared-age-range entitlement as a capability on your own app target, because without it every call answers UNAVAILABLE with DEVICE_NOT_ELIGIBLE and only a developer log names the cause.
- Call VGSDKCompliance.requestAgeSignals and read access on the result before any other field.
- Branch on access for its five states, and read reason when you need the cause behind a state.
- Expect reason DISABLED_BY_CONFIG until the feature is switched on for your game, because it ships off on every platform.
- Read range only when access is SHARED, because it is absent on every other outcome, and treat both of its bounds as optional.
- Re-test on a device below iOS 26, where the call reaches no store and answers UNAVAILABLE with DEVICE_NOT_ELIGIBLE, which is the same answer a missing entitlement gives.
- 在正式推出這個呼叫之前,請向 VNGGames 申請為你的版本加上 AgeAssurance 功能金鑰,否則 SDK 會讓應用程式中止,而不是回應你。
- 請在你自己的 app target 上加入 com.apple.developer.declared-age-range entitlement 作為 capability,否則每次呼叫都會以 DEVICE_NOT_ELIGIBLE 回傳 UNAVAILABLE,而且只有開發者層級的日誌會說明原因。
- 呼叫 VGSDKCompliance.requestAgeSignals,並在讀取其他欄位之前先讀取結果的 access。
- 針對 access 的五種狀態分支處理,需要知道狀態背後的原因時再讀取 reason。
- 在此功能為你的遊戲開啟之前,請預期 reason 會是 DISABLED_BY_CONFIG,因為它在每個平台上都以關閉狀態出貨。
- 僅在 access 為 SHARED 時讀取 range,因為其他結果都不會帶有它,並且要把它的上下限都當成可能不存在。
- 在低於 iOS 26 的裝置上重新測試,此時呼叫不會連到商店,並以 DEVICE_NOT_ELIGIBLE 回傳 UNAVAILABLE,這和缺少 entitlement 時得到的答案一樣。
- 在正式推出这个调用之前,请向 VNGGames 申请为你的版本加上 AgeAssurance 功能密钥,否则 SDK 会让应用程序中止,而不是响应你。
- 请在你自己的 app target 上加入 com.apple.developer.declared-age-range entitlement 作为 capability,否则每次调用都会以 DEVICE_NOT_ELIGIBLE 返回 UNAVAILABLE,而且只有开发者层级的日志会说明原因。
- 调用 VGSDKCompliance.requestAgeSignals,并在读取其他字段之前先读取结果的 access。
- 针对 access 的五种状态分支处理,需要知道状态背后的原因时再读取 reason。
- 在此功能为你的游戏开启之前,请预期 reason 会是 DISABLED_BY_CONFIG,因为它在每个平台上都以关闭状态发布。
- 仅在 access 为 SHARED 时读取 range,因为其他结果都不会带有它,并且要把它的上下限都当成可能不存在。
- 在低于 iOS 26 的设备上重新测试,此时调用不会连到商店,并以 DEVICE_NOT_ELIGIBLE 返回 UNAVAILABLE,这和缺少 entitlement 时得到的答案一样。
See the usage and full signature in the Integration guide:
Request age signals請在整合指南中查看用法與完整簽名:
請求年齡訊號请在集成指南中查看用法与完整签名:
请求年龄信号Skipping the call breaks nothing and no existing call changes, but your game then has no store backed age band and keeps asking players for a date of birth. Adopt it and the call raises a fatal carrying Age Assurance feature not requested in any build without the AgeAssurance key, rather than answering your callback: no result is produced and no analytics event is emitted. A build that reads access and ignores reason also cannot tell a player who declined from a device that was never asked.
跳過這個呼叫不會造成任何損壞,既有的呼叫也不會改變,但你的遊戲就沒有來自商店的年齡區間,只能繼續自行向玩家詢問出生日期。若要採用,在任何沒有 AgeAssurance 金鑰的版本上,這次呼叫會引發帶有 Age Assurance feature not requested 的致命錯誤,而不是回應你的 callback:不會產生結果,也不會送出分析事件。只讀取 access 而忽略 reason 的版本,也無法分辨是玩家拒絕分享,還是裝置根本沒有被詢問。
跳过这个调用不会造成任何损坏,既有的调用也不会改变,但你的游戏就没有来自商店的年龄区间,只能继续自行向玩家询问出生日期。若要采用,在任何没有 AgeAssurance 密钥的版本上,这次调用会引发带有 Age Assurance feature not requested 的致命错误,而不是响应你的回调:不会产生结果,也不会发送分析事件。只读取 access 而忽略 reason 的版本,也无法分辨是玩家拒绝分享,还是设备根本没有被询问。
New Advanced Commerce purchase call
Adds a second purchase entry point for a game that declares the item at purchase time instead of registering every item as its own store product. It replaces nothing, and the existing purchase call and the model it takes are unchanged.
為在購買當下宣告商品、而非將每個商品都註冊成獨立商店產品的遊戲,新增第二個購買進入點。它沒有取代任何東西,既有的購買呼叫與它所接受的模型都維持不變。
为在购买当下声明商品、而非将每个商品都注册成独立商店产品的游戏,新增第二个购买入口。它没有取代任何东西,既有的购买调用与它所接受的模型都维持不变。
| VGSDKPayment.purchaseAdvancedCommerce(info:listener:) | |
| VGSDKPayment.isAdvancedCommerceSupported | |
| VGSDKIAPInfo | |
| VGSDKAdvancedCommerceInfo |
- Ask VNGGames to add the AdvancedCommerce feature key to your build before you ship the purchase call, because without it purchaseAdvancedCommerce halts your application. The device check carries no such guard on iOS and answers normally either way.
- Read isAdvancedCommerceSupported before you show a shop that sells declared items, because this flow needs iOS 15 or above.
- Build a VGSDKAdvancedCommerceInfo with the item id, the server id, the amount, the currency and the generic product id, which are all required at construction.
- Call the Advanced Commerce purchase with it and keep the purchase listener you already pass, because the outcome arrives on that same shape.
- Handle this flow’s four new codes 9054 to 9057 alongside the existing payment codes, because it reports both rather than replacing them.
- Leave your existing purchase calls exactly as they are, because they still reach the existing flow.
- 在推出購買呼叫之前,請向 VNGGames 申請為你的版本加上 AdvancedCommerce 功能金鑰,否則 purchaseAdvancedCommerce 會讓應用程式中止。iOS 上的裝置檢查沒有這道防護,有沒有金鑰都會正常回答。
- 在顯示販售宣告式商品的商店之前先讀取 isAdvancedCommerceSupported,因為此流程需要 iOS 15 以上。
- 建立 VGSDKAdvancedCommerceInfo,並帶入 item id、server id、金額、幣別與 generic product id,這些在建構時都是必填。
- 以它呼叫 Advanced Commerce 購買,並沿用你原本傳入的購買 listener,因為結果會以同樣的形式回傳。
- 除了既有的付款錯誤碼,也要處理此流程新增的 9054 到 9057,因為它兩套都會回報,而不是取代。
- 既有的購買呼叫請原封不動保留,因為它們仍然走既有的流程。
- 在推出购买调用之前,请向 VNGGames 申请为你的版本加上 AdvancedCommerce 功能密钥,否则 purchaseAdvancedCommerce 会让应用程序中止。iOS 上的设备检查没有这道防护,有没有密钥都会正常回答。
- 在显示销售声明式商品的商店之前先读取 isAdvancedCommerceSupported,因为此流程需要 iOS 15 以上。
- 构建 VGSDKAdvancedCommerceInfo,并带入 item id、server id、金额、币种与 generic product id,这些在构造时都是必填。
- 以它调用 Advanced Commerce 购买,并沿用你原本传入的购买 listener,因为结果会以同样的形式返回。
- 除了既有的支付错误码,也要处理此流程新增的 9054 到 9057,因为它两套都会报告,而不是取代。
- 既有的购买调用请原封不动保留,因为它们仍然走既有的流程。
See the usage and full signature in the Integration guide:
Purchase a declared itemCheck device supportNothing breaks and your existing purchase calls keep working. The purchase call raises a fatal carrying Advanced Commerce feature not requested in any build without the AdvancedCommerce key: the SDK reports no error, fires no listener callback, and never runs the existing flow in its place, because a call your build never carried is an integration defect rather than a player-reachable outcome. The device check has no such guard on iOS, so it cannot warn you first. A shop built on the new call without the device check refuses every purchase below iOS 15.
不會有任何損壞,既有的購買呼叫也照常運作。在任何沒有 AdvancedCommerce 金鑰的版本上,購買呼叫會引發帶有 Advanced Commerce feature not requested 的致命錯誤:SDK 不會回報錯誤,不會觸發 listener callback,也不會改以既有流程代為執行,因為呼叫一個版本從未納入的方法屬於整合缺陷,而不是玩家會遇到的結果。iOS 上的裝置檢查沒有這道防護,因此無法事先警告你。若在未做裝置檢查的情況下以新呼叫建置商店,所有低於 iOS 15 的購買都會被拒絕。
不会有任何损坏,既有的购买调用也照常运作。在任何没有 AdvancedCommerce 密钥的版本上,购买调用会引发带有 Advanced Commerce feature not requested 的致命错误:SDK 不会报告错误,不会触发 listener 回调,也不会改以既有流程代为执行,因为调用一个版本从未纳入的方法属于集成缺陷,而不是玩家会遇到的结果。iOS 上的设备检查没有这道防护,因此无法事先警告你。若在未做设备检查的情况下以新调用构建商店,所有低于 iOS 15 的购买都会被拒绝。