iOS Integration Guide
Everything you need to bring VNGGames to your game: sign-in, in-app purchase, analytics, ads, and player engagement: in one complete reference. Every method spells out its inputs and outputs field by field, and each one is directly linkable so you can jump straight to the call you need.
打造遊戲接入 VNGGames 所需的一切: 登入、應用程式內購買、分析、廣告與玩家互動: 全部整合於一份完整參考中。每個方法都逐一欄位說明其輸入與輸出,且每個方法都可直接連結,讓你能快速跳到所需的呼叫。
打造游戏接入 VNGGames 所需的一切: 登录、应用内购买、分析、广告与玩家互动: 全部整合于一份完整参考中。每个方法都逐一字段说明其输入与输出,且每个方法都可直接链接,让你能快速跳到所需的调用。
Get started
Integrate the VNGGames SDK for iOS. Complete the prerequisites, then install either with Swift Package Manager or manually. Follow the steps for your chosen method below.
整合 iOS 版 VNGGames SDK。請先完成先決條件,然後選擇以 Swift Package Manager 或手動方式安裝,再依照下方所選方式的步驟操作。
集成 iOS 版 VNGGames SDK。请先完成前提条件,然后选择以 Swift Package Manager 或手动方式安装,再按照下方所选方式的步骤操作。
Prerequisites
- VNGGames SDK package: obtain the latest VNGGames SDK zip file.
- Xcode: version 26 or later. Use the iOS / iPadOS SDK that ships with it.
- Minimum iOS version: iOS 13.
- Device support: physical devices and the Simulator.
- Configuration files:
VGSDKService-Info.plist,VGSDKIronSource-Info.plist, andGoogleService-Info.plist.
- VNGGames SDK 套件: 取得最新的 VNGGames SDK zip 檔案。
- Xcode: 版本 26 或以上。使用其隨附的 iOS / iPadOS SDK。
- 最低 iOS 版本: iOS 13。
- 裝置支援: 實體裝置與模擬器。
- 設定檔:
VGSDKService-Info.plist、VGSDKIronSource-Info.plist與GoogleService-Info.plist。
- VNGGames SDK 包: 获取最新的 VNGGames SDK zip 文件。
- Xcode: 版本 26 或更高。使用其随附的 iOS / iPadOS SDK。
- 最低 iOS 版本: iOS 13。
- 设备支持: 物理设备与模拟器。
- 配置文件:
VGSDKService-Info.plist、VGSDKIronSource-Info.plist与GoogleService-Info.plist。
Dependencies
Every third-party library the SDK brings into your build. Swift Package Manager resolves them when you add the VNGGames SDK package, and the SDK links all of them whatever your game enabled. Check this list before adding any of these libraries yourself.
SDK 帶進你建置中的所有第三方函式庫。當你加入 VNGGames SDK 套件時,Swift Package Manager 會一併解析它們,而且無論你的遊戲啟用了哪些功能,SDK 都會全部連結。在自行加入這些函式庫之前請先查看本清單。
SDK 带进你构建中的所有第三方库。当你加入 VNGGames SDK 包时,Swift Package Manager 会一并解析它们,而且无论你的游戏启用了哪些功能,SDK 都会全部链接。在自行加入这些库之前请先查看本清单。
Never add IronSource, UnityAds, AppsFlyer, or Firebase Crashlytics as separate frameworks. They are statically baked into
PassSDK.xcframework. Adding any of them again double-links the same archive and causes a duplicate-symbol / duplicate-class crash.
切勿將 IronSource、UnityAds、AppsFlyer 或 Firebase Crashlytics 另外當作獨立 framework 加入。 它們已靜態合併進
PassSDK.xcframework。再次加入其中任何一個都會重複連結同一份封存檔,導致重複符號/重複類別(duplicate-symbol / duplicate-class)當機。
切勿将 IronSource、UnityAds、AppsFlyer 或 Firebase Crashlytics 另外当作独立 framework 添加。 它们已静态合并进
PassSDK.xcframework。再次添加其中任何一个都会重复链接同一份归档,导致重复符号/重复类别(duplicate-symbol / duplicate-class)崩溃。
| Library | Version | Group |
|---|---|---|
Reachability | 3.7.7 | Core |
KeychainAccess | 4.2.2 | Core |
SwiftCentrifuge | 0.8.2 | Core |
FirebaseCore | 11.15.0 | Core |
FirebaseInstallations | 11.15.0 | Core |
FirebaseCrashlytics | 11.15.0 | Core |
FirebaseCoreInternal | 11.15.0 | Core |
FirebaseSharedSwift | 11.15.0 | Core |
GoogleUtilities | 8.1.0 | Core |
GoogleDataTransport | 10.1.0 | Core |
nanopb | 2.30910.0 | Core |
FBLPromises | 2.4.0 | Core |
AppCheckCore | 11.2.0 | Core |
SwiftProtobuf | 1.38.0 | Core |
FBSDKCoreKit | 18.0.3 | Login channels |
FBSDKCoreKit_Basics | 18.0.3 | Login channels |
FBAEMKit | 18.0.3 | Login channels |
FBSDKLoginKit | 18.0.3 | Login channels |
GoogleSignIn | 8.0.0 | Login channels |
AppAuth | 1.7.6 | Login channels |
GTMAppAuth | 4.1.1 | Login channels |
GTMSessionFetcher | 3.5.0 | Login channels |
AppsFlyerLib | 6.17.9 | Analytics |
FirebaseAnalytics | 11.15.0 | Analytics |
ThinkingSDK | 3.4.0 | Analytics |
ThinkingDataCore | 1.3.3 | Analytics |
GoogleAdsOnDeviceConversion | 2.1.0 | Analytics |
GoogleAppMeasurement | 11.15.0 | Analytics |
FBSDKShareKit | 18.0.3 | Social |
FBSDKGamingServicesKit | 18.0.3 | Social |
IronSource | 8.3.0 | In-App Ads |
IronSourceAdQualitySDK | 7.21.0 | In-App Ads |
IASDKCore | 8.3.1 | In-App Ads |
ISFacebookAdapter | 4.3.46 | In-App Ads |
ISFyberAdapter | 4.3.36.2 | In-App Ads |
ISAdMobAdapter | 4.3.57 | In-App Ads |
ISUnityAdsAdapter | 4.3.43 | In-App Ads |
UnityAds | 4.16.1 | In-App Ads |
GoogleMobileAds | 11.10.0 | In-App Ads |
FBAudienceNetwork | 6.21.1 | In-App Ads |
GoogleUserMessagingPlatform | 2.7.0 | In-App Ads |
CleverTapSDK | 7.7.0 | Engage |
CTNotificationService | 0.1.7 | Engage |
CTNotificationContent | 1.3.0 | Engage |
FirebaseMessaging | 11.15.0 | Engage |
FirebaseRemoteConfig | 11.15.0 | Engage |
FirebaseInAppMessaging | 11.15.0 | Engage |
FirebaseABTesting | 11.15.0 | Engage |
FirebaseRemoteConfigInterop | 11.15.0 | Engage |
SDWebImage | 5.21.0 | Engage |
| 函式庫 | 版本 | 分組 |
|---|---|---|
Reachability | 3.7.7 | 核心 |
KeychainAccess | 4.2.2 | 核心 |
SwiftCentrifuge | 0.8.2 | 核心 |
FirebaseCore | 11.15.0 | 核心 |
FirebaseInstallations | 11.15.0 | 核心 |
FirebaseCrashlytics | 11.15.0 | 核心 |
FirebaseCoreInternal | 11.15.0 | 核心 |
FirebaseSharedSwift | 11.15.0 | 核心 |
GoogleUtilities | 8.1.0 | 核心 |
GoogleDataTransport | 10.1.0 | 核心 |
nanopb | 2.30910.0 | 核心 |
FBLPromises | 2.4.0 | 核心 |
AppCheckCore | 11.2.0 | 核心 |
SwiftProtobuf | 1.38.0 | 核心 |
FBSDKCoreKit | 18.0.3 | 登入管道 |
FBSDKCoreKit_Basics | 18.0.3 | 登入管道 |
FBAEMKit | 18.0.3 | 登入管道 |
FBSDKLoginKit | 18.0.3 | 登入管道 |
GoogleSignIn | 8.0.0 | 登入管道 |
AppAuth | 1.7.6 | 登入管道 |
GTMAppAuth | 4.1.1 | 登入管道 |
GTMSessionFetcher | 3.5.0 | 登入管道 |
AppsFlyerLib | 6.17.9 | 分析 |
FirebaseAnalytics | 11.15.0 | 分析 |
ThinkingSDK | 3.4.0 | 分析 |
ThinkingDataCore | 1.3.3 | 分析 |
GoogleAdsOnDeviceConversion | 2.1.0 | 分析 |
GoogleAppMeasurement | 11.15.0 | 分析 |
FBSDKShareKit | 18.0.3 | 社群 |
FBSDKGamingServicesKit | 18.0.3 | 社群 |
IronSource | 8.3.0 | 應用程式內廣告 |
IronSourceAdQualitySDK | 7.21.0 | 應用程式內廣告 |
IASDKCore | 8.3.1 | 應用程式內廣告 |
ISFacebookAdapter | 4.3.46 | 應用程式內廣告 |
ISFyberAdapter | 4.3.36.2 | 應用程式內廣告 |
ISAdMobAdapter | 4.3.57 | 應用程式內廣告 |
ISUnityAdsAdapter | 4.3.43 | 應用程式內廣告 |
UnityAds | 4.16.1 | 應用程式內廣告 |
GoogleMobileAds | 11.10.0 | 應用程式內廣告 |
FBAudienceNetwork | 6.21.1 | 應用程式內廣告 |
GoogleUserMessagingPlatform | 2.7.0 | 應用程式內廣告 |
CleverTapSDK | 7.7.0 | Engage |
CTNotificationService | 0.1.7 | Engage |
CTNotificationContent | 1.3.0 | Engage |
FirebaseMessaging | 11.15.0 | Engage |
FirebaseRemoteConfig | 11.15.0 | Engage |
FirebaseInAppMessaging | 11.15.0 | Engage |
FirebaseABTesting | 11.15.0 | Engage |
FirebaseRemoteConfigInterop | 11.15.0 | Engage |
SDWebImage | 5.21.0 | Engage |
| 库 | 版本 | 分组 |
|---|---|---|
Reachability | 3.7.7 | 核心 |
KeychainAccess | 4.2.2 | 核心 |
SwiftCentrifuge | 0.8.2 | 核心 |
FirebaseCore | 11.15.0 | 核心 |
FirebaseInstallations | 11.15.0 | 核心 |
FirebaseCrashlytics | 11.15.0 | 核心 |
FirebaseCoreInternal | 11.15.0 | 核心 |
FirebaseSharedSwift | 11.15.0 | 核心 |
GoogleUtilities | 8.1.0 | 核心 |
GoogleDataTransport | 10.1.0 | 核心 |
nanopb | 2.30910.0 | 核心 |
FBLPromises | 2.4.0 | 核心 |
AppCheckCore | 11.2.0 | 核心 |
SwiftProtobuf | 1.38.0 | 核心 |
FBSDKCoreKit | 18.0.3 | 登录渠道 |
FBSDKCoreKit_Basics | 18.0.3 | 登录渠道 |
FBAEMKit | 18.0.3 | 登录渠道 |
FBSDKLoginKit | 18.0.3 | 登录渠道 |
GoogleSignIn | 8.0.0 | 登录渠道 |
AppAuth | 1.7.6 | 登录渠道 |
GTMAppAuth | 4.1.1 | 登录渠道 |
GTMSessionFetcher | 3.5.0 | 登录渠道 |
AppsFlyerLib | 6.17.9 | 分析 |
FirebaseAnalytics | 11.15.0 | 分析 |
ThinkingSDK | 3.4.0 | 分析 |
ThinkingDataCore | 1.3.3 | 分析 |
GoogleAdsOnDeviceConversion | 2.1.0 | 分析 |
GoogleAppMeasurement | 11.15.0 | 分析 |
FBSDKShareKit | 18.0.3 | 社交 |
FBSDKGamingServicesKit | 18.0.3 | 社交 |
IronSource | 8.3.0 | 应用内广告 |
IronSourceAdQualitySDK | 7.21.0 | 应用内广告 |
IASDKCore | 8.3.1 | 应用内广告 |
ISFacebookAdapter | 4.3.46 | 应用内广告 |
ISFyberAdapter | 4.3.36.2 | 应用内广告 |
ISAdMobAdapter | 4.3.57 | 应用内广告 |
ISUnityAdsAdapter | 4.3.43 | 应用内广告 |
UnityAds | 4.16.1 | 应用内广告 |
GoogleMobileAds | 11.10.0 | 应用内广告 |
FBAudienceNetwork | 6.21.1 | 应用内广告 |
GoogleUserMessagingPlatform | 2.7.0 | 应用内广告 |
CleverTapSDK | 7.7.0 | Engage |
CTNotificationService | 0.1.7 | Engage |
CTNotificationContent | 1.3.0 | Engage |
FirebaseMessaging | 11.15.0 | Engage |
FirebaseRemoteConfig | 11.15.0 | Engage |
FirebaseInAppMessaging | 11.15.0 | Engage |
FirebaseABTesting | 11.15.0 | Engage |
FirebaseRemoteConfigInterop | 11.15.0 | Engage |
SDWebImage | 5.21.0 | Engage |
Installation
Install the SDK with Swift Package Manager or manually with the frameworks.
使用 Swift Package Manager 或手動加入 frameworks 來安裝 SDK。
使用 Swift Package Manager 或手动添加 frameworks 来安装 SDK。
Swift Package Manager
The SDK integrates with Swift Package Manager: the SDK ships as an Exported/ bundle: add the Swift Package, run VGSDK Configure, then build. The bundle contains:
此 SDK 透過 Swift Package Manager 整合:SDK 以 Exported/ bundle 形式提供: 加入 Swift Package、執行 VGSDK Configure,然後建置。此 bundle 包含:
该 SDK 通过 Swift Package Manager 集成:SDK 以 Exported/ bundle 形式提供: 添加 Swift Package、运行 VGSDK Configure,然后构建。该 bundle 包含:
Exported/
├── add-vgsdk-package.sh ← run this to integrate the SDK (does the 3 steps for you)
├── VGSDKPackages/ ← the Swift Package you add to Xcode (library + VGSDK Configure plugin)
├── VGSDKResources/
│ ├── Resources/ ← your game's config (VGSDKService-Info.plist, GoogleService-Info.plist, …)
│ └── FirebaseCrashlytics/ ← Crashlytics dSYM-upload tooling (run script)
├── PassSDKDemo/ ← reference demo app
├── PassSDKDemo.xcodeproj ← its Xcode project
├── PassSDKDemoServiceExtension/ ← demo Notification Service extension
└── PassSDKDemoContentExtension/ ← demo Notification Content extensionKeep the folder layout intact.
VGSDKResources/must stay next toVGSDKPackages/: the configure plugin reads your config from there.
請保持資料夾結構完整。
VGSDKResources/必須與VGSDKPackages/並排放置: configure 外掛程式會從該處讀取你的設定。
请保持文件夹结构完整。
VGSDKResources/必须与VGSDKPackages/相邻放置: configure 插件会从那里读取你的配置。
Add the Swift Package
Do this one of two ways: the automated script (recommended) or by hand in Xcode:
有兩種方式可完成此步驟: 自動化指令碼(建議)或在 Xcode 中手動操作:
有两种方式可完成此步骤: 自动化脚本(推荐)或在 Xcode 中手动操作:
Run the bundled helper from the Exported/ folder and it performs the whole integration end-to-end:
在 Exported/ 資料夾中執行隨附的輔助指令碼,它會端到端完成整個整合流程:
在 Exported/ 文件夹中运行随附的辅助脚本,它会端到端完成整个集成流程:
./add-vgsdk-package.shThat single command does everything: adds the package, resolves the dependency graph from the VNGGames Nexus (needs network), auto-wires any notification extensions, and runs VGSDK Configure. It’s idempotent and best-effort: on failure it prints the exact manual command and continues (the package is still added), backing up project.pbxproj first. Add --verbose for live output, then reopen the project in Xcode.
這一道指令會完成所有工作: 加入套件、從 VNGGames Nexus 解析相依關係圖(需要網路)、自動接上任何通知擴充功能,並執行 VGSDK Configure。它具幂等性且採盡力而為策略:失敗時會印出確切的手動指令並繼續執行(套件仍會被加入),並會先備份 project.pbxproj。加上 --verbose 可取得即時輸出,然後在 Xcode 中重新開啟專案。
这一条命令会完成所有工作: 添加包、从 VNGGames Nexus 解析依赖关系图(需要网络)、自动接入任何通知扩展,并运行 VGSDK Configure。它具有幂等性且采用尽力而为策略:失败时会打印确切的手动命令并继续执行(包仍会被添加),并会先备份 project.pbxproj。加上 --verbose 可获取实时输出,然后在 Xcode 中重新打开项目。
SwiftPM fetches the binary frameworks (PassSDK + 3rd-party) from the VNGGames Nexus at build time, so the first resolve needs network access.
SwiftPM 會在建置時從 VNGGames Nexus 取得二進位 frameworks(PassSDK 與第三方),因此首次解析需要網路連線。
SwiftPM 会在构建时从 VNGGames Nexus 获取二进制 frameworks(PassSDK 与第三方),因此首次解析需要网络连接。
Run “VGSDK Configure”
Adding the package does not auto-configure your app: SwiftPM has no install hook. Run the bundled VGSDK Configure command plugin once. It:
- Copies your config plists from
VGSDKResources/into your app’s source folder (VGSDKService-Info.plist,VGSDKIronSource-Info.plist,GoogleService-Info.plist). - Writes your
Info.plist: URL schemes (Facebook / Google / VGA),LSApplicationQueriesSchemes, App Transport Security,SKAdNetworkItems,GADApplicationIdentifier,NSUserTrackingUsageDescription, the social-sharing privacy prompts, and: for push: theremote-notificationUIBackgroundModesentry. Your own usage-description strings are never overwritten. - Edits
project.pbxproj: adds the config plists to Copy Bundle Resources, adds the Firebase Crashlytics dSYM-upload Run Script phase, and enables the SDK’s capabilities (aps-environmentfor Push,com.apple.developer.applesigninfor Sign in with Apple), creating<app>/<Target>.entitlementsif absent. It is idempotent: safe to re-run after editing your config.
加入套件並不會自動設定你的 App: SwiftPM 沒有安裝掛鉤。請執行隨附的 VGSDK Configure command plugin 一次。它會:
- 複製你的設定 plist: 從
VGSDKResources/複製到你 App 的原始碼資料夾(VGSDKService-Info.plist、VGSDKIronSource-Info.plist、GoogleService-Info.plist)。 - 寫入你的
Info.plist: URL schemes(Facebook / Google / VGA)、LSApplicationQueriesSchemes、App Transport Security、SKAdNetworkItems、GADApplicationIdentifier、NSUserTrackingUsageDescription、社群分享隱私提示,以及: 針對推播:remote-notification的UIBackgroundModes項目。你自己的 usage-description 字串永遠不會被覆寫。 - 編輯
project.pbxproj: 將設定 plist 加入 Copy Bundle Resources、加入 Firebase Crashlytics dSYM-upload Run Script 階段,並啟用 SDK 的功能(Push 使用aps-environment、Sign in with Apple 使用com.apple.developer.applesignin),若<app>/<Target>.entitlements不存在則建立它。 它具有幂等性: 在編輯設定後可安全地重新執行。
添加包不会自动配置你的 App: SwiftPM 没有安装钩子。请运行随附的 VGSDK Configure command plugin 一次。它会:
- 复制你的配置 plist: 从
VGSDKResources/复制到你 App 的源码文件夹(VGSDKService-Info.plist、VGSDKIronSource-Info.plist、GoogleService-Info.plist)。 - 写入你的
Info.plist: URL schemes(Facebook / Google / VGA)、LSApplicationQueriesSchemes、App Transport Security、SKAdNetworkItems、GADApplicationIdentifier、NSUserTrackingUsageDescription、社交分享隐私提示,以及: 针对推送:remote-notification的UIBackgroundModes项。你自己的 usage-description 字符串永远不会被覆盖。 - 编辑
project.pbxproj: 将配置 plist 添加到 Copy Bundle Resources、添加 Firebase Crashlytics dSYM-upload Run Script 阶段,并启用 SDK 的能力(Push 使用aps-environment、Sign in with Apple 使用com.apple.developer.applesignin),若<app>/<Target>.entitlements不存在则创建它。 它具有幂等性: 在编辑配置后可安全地重新运行。
- Sets up the CleverTap notification extension: when your game uses CleverTap, creates the App Group + Notification Service / Content extension so push impressions are recorded (no manual extension setup).
- 設定 CleverTap 通知擴充功能: 當你的遊戲使用 CleverTap 時,建立 App Group 與 Notification Service/Content 擴充功能,讓推播曝光(push impressions)得以記錄(無需手動設定擴充功能)。
- 设置 CleverTap 通知扩展: 当你的游戏使用 CleverTap 时,创建 App Group 与 Notification Service/Content 扩展,让推送曝光(push impressions)得以记录(无需手动设置扩展)。
Provisioning is still yours. The plugin declares the capabilities, but you must enable Push Notifications and Sign in with Apple for your App ID in the Apple Developer portal and use a matching provisioning profile. Xcode resolves the live APNs environment from the signing profile at build time.
佈建仍由你負責。 此外掛程式會宣告這些功能,但你必須在 Apple Developer portal 中為你的 App ID 啟用 Push Notifications 與 Sign in with Apple,並使用相符的佈建描述檔(provisioning profile)。Xcode 會在建置時從簽署描述檔解析出實際的 APNs 環境。
预置描述文件仍由你负责。 该插件会声明这些能力,但你必须在 Apple Developer portal 中为你的 App ID 启用 Push Notifications 与 Sign in with Apple,并使用相匹配的预置描述文件(provisioning profile)。Xcode 会在构建时从签名描述文件解析出实际的 APNs 环境。
Run the VGSDK Configure plugin from the command line. The destination (your app folder + .xcodeproj) is outside the package, so grant your project directory in addition to the package directory:
從命令列執行 VGSDK Configure 外掛程式。目的地(你的 App 資料夾 + .xcodeproj)位於套件之外,因此除了套件目錄外,還需授予你的專案目錄權限:
从命令行运行 VGSDK Configure 插件。目标位置(你的 App 文件夹 + .xcodeproj)位于包之外,因此除了包目录之外,还需授予你的项目目录权限:
cd {path}/VGSDKPackages
swift package \
--allow-writing-to-package-directory \
--allow-writing-to-directory "/full/path/to/your/project/dir" \
vgsdk-configureIf a write is denied, the plugin prints the exact command (with the resolved path) to re-run.
若某次寫入被拒絕,外掛程式會印出(含已解析路徑的)確切指令供你重新執行。
若某次写入被拒绝,插件会打印(含已解析路径的)确切命令供你重新运行。
Finish & verify
Reopen the project in Xcode (or let it reload) so it picks up the edited project.pbxproj (a backup is saved at project.pbxproj.vgsdk-bak), then build and run. Confirm:
- App target → Build Phases → Copy Bundle Resources contains the three config plists.
- App target → Build Phases has a
[VGSDK] Run Firebase CrashlyticsRun Script phase. Info.plisthas the VNGGames URL schemes / queried schemes / SKAdNetwork entries.
在 Xcode 中重新開啟專案(或讓它重新載入),使其套用已編輯的 project.pbxproj(備份會儲存在 project.pbxproj.vgsdk-bak),然後建置並執行。請確認:
- App target → Build Phases → Copy Bundle Resources 包含這三個設定 plist。
- App target → Build Phases 有一個
[VGSDK] Run Firebase CrashlyticsRun Script 階段。 Info.plist已包含 VNGGames 的 URL schemes / queried schemes / SKAdNetwork 項目。
在 Xcode 中重新打开项目(或让它重新加载),使其应用已编辑的 project.pbxproj(备份会保存在 project.pbxproj.vgsdk-bak),然后构建并运行。请确认:
- App target → Build Phases → Copy Bundle Resources 包含这三个配置 plist。
- App target → Build Phases 有一个
[VGSDK] Run Firebase CrashlyticsRun Script 阶段。 Info.plist已包含 VNGGames 的 URL schemes / queried schemes / SKAdNetwork 项。
Troubleshooting
Xcode says “Plugin wants permission to write to the package directory.”
SwiftPM sandboxes plugin writes. Add --allow-writing-to-package-directory on the CLI, or approve the prompt in Xcode.
“Cannot write to …: outside the package.”
Your app folder / .xcodeproj lives outside the package directory, which the sandbox blocks by default. Add --allow-writing-to-directory "<dir>" for the printed path: use the common parent of your app folder and the .xcodeproj.
The plugin reports “No .xcodeproj found.”
It couldn’t auto-detect your project from the working directory. Run it from your app project in Xcode, or pass --dest <dir> and --info-plist <path> explicitly.
Package resolve fails with “checksum … does not match.”
A binary framework was re-published with new contents, so the cached checksum is stale. In Xcode: File → Packages → Reset Package Caches, then resolve again. If it persists, clear the global cache (below).
The package cache is stale or corrupt after a re-publish.
SwiftPM’s global cache is holding the old artifact. Quit Xcode, then run rm -rf ~/Library/Caches/org.swift.swiftpm and reopen / resolve again.
Reset + global clear still serves the old binary.
Xcode keeps its own resolved clones inside DerivedData, separate from the global cache. Quit Xcode, then run rm -rf ~/Library/Developer/Xcode/DerivedData and reopen / resolve. To target one app instead, delete only its …/DerivedData/<Project>-<hash>/SourcePackages/.
My config changes aren’t taking effect.
The build is using the previously-copied plists. Re-run VGSDK Configure (it’s idempotent), then do a clean build.
The first build fails to fetch frameworks.
The binary frameworks resolve from the VNGGames Nexus, which needs network access on the first resolve. Ensure you’re on a network that can reach the VNGGames Nexus, then File → Packages → Resolve Package Versions.
Push notifications / Sign in with Apple don’t work at runtime.
The plugin declares the capabilities, but the App ID and provisioning profile must enable them on Apple’s side. Enable Push Notifications and Sign in with Apple for your App ID in the Apple Developer portal, and use a matching provisioning profile.
Do I need to add an “In-App Purchase” capability?
No: In-App Purchase has no real, enforced entitlement, so StoreKit (which VGSDKPayment wraps) works without it and VGSDK Configure never adds one (neither should you). If purchases fail, check that: products with the same item IDs you pass to VGSDKPayment exist in App Store Connect, the Paid Apps agreement is active, you’re testing with a Sandbox Apple Account, and the user is logged in (login is required before any purchase).
Xcode 顯示 “Plugin wants permission to write to the package directory.”
SwiftPM 會沙箱化外掛程式的寫入。請在 CLI 上加上 --allow-writing-to-package-directory,或在 Xcode 中核准該提示。
“Cannot write to …: outside the package.”
你的 App 資料夾 / .xcodeproj 位於套件目錄之外,而沙箱預設會封鎖此情況。請為印出的路徑加上 --allow-writing-to-directory "<dir>": 使用你的 App 資料夾與 .xcodeproj 的共同上層目錄。
外掛程式回報 “No .xcodeproj found.”
它無法從工作目錄自動偵測到你的專案。請在 Xcode 中從你的 App 專案執行它,或明確傳入 --dest <dir> 與 --info-plist <path>。
套件解析失敗並顯示 “checksum … does not match.”
某個二進位 framework 以新內容重新發佈,因此快取的 checksum 已過時。在 Xcode 中:File → Packages → Reset Package Caches,然後重新解析。若問題持續,請清除全域快取(見下方)。
重新發佈後套件快取過時或損毀。
SwiftPM 的全域快取仍保有舊的成品。請結束 Xcode,然後執行 rm -rf ~/Library/Caches/org.swift.swiftpm,再重新開啟 / 重新解析。
重設 + 清除全域快取後仍提供舊的二進位檔。
Xcode 會在 DerivedData 內保留自己的已解析副本,與全域快取分開。請結束 Xcode,然後執行 rm -rf ~/Library/Developer/Xcode/DerivedData,再重新開啟 / 重新解析。若只想針對單一 App,僅刪除其 …/DerivedData/<Project>-<hash>/SourcePackages/。
我的設定變更未生效。
建置仍在使用先前複製的 plist。請重新執行 VGSDK Configure(它具有幂等性),然後執行一次乾淨建置。
首次建置無法取得 frameworks。
二進位 frameworks 從 VNGGames Nexus 解析,首次解析時需要網路連線。請確認你所在的網路可連到 VNGGames Nexus,然後執行 File → Packages → Resolve Package Versions。
推播通知 / Sign in with Apple 在執行階段無法運作。
此外掛程式會宣告這些功能,但 App ID 與佈建描述檔必須在 Apple 端啟用它們。請在 Apple Developer portal 中為你的 App ID 啟用 Push Notifications 與 Sign in with Apple,並使用相符的佈建描述檔。
我需要新增 “In-App Purchase” 功能嗎?
不需要: In-App Purchase 沒有真正強制的 entitlement,因此 StoreKit(由 VGSDKPayment 包裝)無需它即可運作,VGSDK Configure 也不會加入(你也不應加入)。若購買失敗,請檢查:與你傳給 VGSDKPayment 的相同 item ID 的產品確實存在於 App Store Connect、Paid Apps agreement 已生效、你正使用 Sandbox Apple Account 進行測試,且使用者已登入(任何購買前都必須先登入)。
Xcode 显示 “Plugin wants permission to write to the package directory.”
SwiftPM 会对插件写入进行沙箱化。请在 CLI 上加上 --allow-writing-to-package-directory,或在 Xcode 中批准该提示。
“Cannot write to …: outside the package.”
你的 App 文件夹 / .xcodeproj 位于包目录之外,而沙箱默认会阻止此情况。请为打印出的路径加上 --allow-writing-to-directory "<dir>": 使用你的 App 文件夹与 .xcodeproj 的公共父目录。
插件报告 “No .xcodeproj found.”
它无法从工作目录自动检测到你的项目。请在 Xcode 中从你的 App 项目运行它,或显式传入 --dest <dir> 与 --info-plist <path>。
包解析失败并显示 “checksum … does not match.”
某个二进制 framework 以新内容重新发布,因此缓存的 checksum 已过时。在 Xcode 中:File → Packages → Reset Package Caches,然后重新解析。若问题持续,请清除全局缓存(见下方)。
重新发布后包缓存过时或损坏。
SwiftPM 的全局缓存仍保留着旧的产物。请退出 Xcode,然后运行 rm -rf ~/Library/Caches/org.swift.swiftpm,再重新打开 / 重新解析。
重置 + 清除全局缓存后仍提供旧的二进制文件。
Xcode 会在 DerivedData 内保留自己的已解析克隆,与全局缓存分开。请退出 Xcode,然后运行 rm -rf ~/Library/Developer/Xcode/DerivedData,再重新打开 / 重新解析。若只想针对单个 App,仅删除其 …/DerivedData/<Project>-<hash>/SourcePackages/。
我的配置更改未生效。
构建仍在使用先前复制的 plist。请重新运行 VGSDK Configure(它具有幂等性),然后执行一次干净构建。
首次构建无法获取 frameworks。
二进制 frameworks 从 VNGGames Nexus 解析,首次解析时需要网络连接。请确认你所在的网络可连到 VNGGames Nexus,然后执行 File → Packages → Resolve Package Versions。
推送通知 / Sign in with Apple 在运行时无法工作。
该插件会声明这些能力,但 App ID 与预置描述文件必须在 Apple 端启用它们。请在 Apple Developer portal 中为你的 App ID 启用 Push Notifications 与 Sign in with Apple,并使用相匹配的预置描述文件。
我需要添加 “In-App Purchase” 能力吗?
不需要: In-App Purchase 没有真正强制的 entitlement,因此 StoreKit(由 VGSDKPayment 包装)无需它即可工作,VGSDK Configure 也不会添加(你也不应添加)。若购买失败,请检查:与你传给 VGSDKPayment 的相同 item ID 的商品确实存在于 App Store Connect、Paid Apps agreement 已生效、你正使用 Sandbox Apple Account 进行测试,且用户已登录(任何购买前都必须先登录)。
Manual (frameworks)
Use this path only when Swift Package Manager isn’t an option, for example a build that vendors the frameworks or must resolve them offline.
只有在無法使用 Swift Package Manager 時才採用此路徑,例如需要隨附(vendor)frameworks 或必須離線解析相依項的建置。
仅在无法使用 Swift Package Manager 时才采用此路径,例如需要随附(vendor)frameworks 或必须离线解析依赖项的构建。
Exported/
├── VGSDKResources/
│ ├── Frameworks/ ← the dependency .xcframeworks (add each · Embed & Sign)
│ ├── Resources/ ← your game's config (VGSDKService-Info.plist, GoogleService-Info.plist, …)
│ └── FirebaseCrashlytics/ ← Crashlytics dSYM-upload tooling (run script)
├── PassSDKDemo/ ← reference demo app
├── PassSDKDemo.xcodeproj ← its Xcode project
├── PassSDKDemoServiceExtension/ ← demo Notification Service extension
└── PassSDKDemoContentExtension/ ← demo Notification Content extensionAdd the frameworks
The dependency .xcframeworks are already provided in the bundle’s VGSDKResources/Frameworks folder.
相依的 .xcframework 已包含在 bundle 的 VGSDKResources/Frameworks 資料夾中。
依赖的 .xcframework 已包含在 bundle 的 VGSDKResources/Frameworks 文件夹中。
In Xcode, select your app target → General → Frameworks, Libraries & Embedded Content. Add every .xcframework from VGSDKResources/Frameworks and set each one to Embed & Sign (the SDK framework is dynamic, so it must be embedded and signed).
在 Xcode 中選取你的 App target → General → Frameworks, Libraries & Embedded Content。將 VGSDKResources/Frameworks 中的每一個 .xcframework 加入,並將每一個都設為 Embed & Sign(SDK framework 為動態,因此必須嵌入並簽署)。
在 Xcode 中选择你的 App target → General → Frameworks, Libraries & Embedded Content。将 VGSDKResources/Frameworks 中的每一个 .xcframework 添加进来,并将每一个都设为 Embed & Sign(SDK framework 为动态,因此必须嵌入并签名)。
One exception: the two CleverTap notification-extension frameworks (CTNotificationService, CTNotificationContent) go to the extension targets, not the app target. The CleverTap notification extensions step adds those.
僅有一個例外:兩個 CleverTap 通知擴充功能 frameworks(CTNotificationService、CTNotificationContent)屬於擴充功能 target,而非 App target。CleverTap 通知擴充功能步驟會加入這兩個。
仅有一个例外:两个 CleverTap 通知扩展 frameworks(CTNotificationService、CTNotificationContent)属于扩展 target,而非 App target。CleverTap 通知扩展步骤会添加这两个。
VGSDKResources/Frameworks/
├── … ← every .xcframework here → app target (Embed & Sign)
├── CTNotificationService.xcframework ← notification-extension target only, not the app
└── CTNotificationContent.xcframework ← notification-extension target only, not the appBuild settings
On your app target → Build Settings, set:
- Minimum Deployments (iOS) = 13.0.
- Other Linker Flags =
-ObjC-weak_framework AdServices. - Add
libsqlite3.tbdunder Frameworks, Libraries & Embedded Content. DEBUG_INFORMATION_FORMAT=dwarf-with-dsym(every configuration): lets Firebase Crashlytics generate dSYMs to upload (Run-Script phase in the Firebase Crashlytics step).ENABLE_USER_SCRIPT_SANDBOXING=NO: lets that Crashlytics Run-Script access the dSYM.
在你的 App target → Build Settings 設定:
- Minimum Deployments (iOS) = 13.0。
- Other Linker Flags =
-ObjC-weak_framework AdServices。 - 在 Frameworks, Libraries & Embedded Content 中加入
libsqlite3.tbd。 DEBUG_INFORMATION_FORMAT=dwarf-with-dsym(每個 configuration):讓 Firebase Crashlytics 產生可上傳的 dSYM(Run-Script 階段見 Firebase Crashlytics 步驟)。ENABLE_USER_SCRIPT_SANDBOXING=NO:讓該 Crashlytics Run-Script 能存取 dSYM。
在你的 App target → Build Settings 设置:
- Minimum Deployments (iOS) = 13.0。
- Other Linker Flags =
-ObjC-weak_framework AdServices。 - 在 Frameworks, Libraries & Embedded Content 中添加
libsqlite3.tbd。 DEBUG_INFORMATION_FORMAT=dwarf-with-dsym(每个 configuration):让 Firebase Crashlytics 生成可上传的 dSYM(Run-Script 阶段见 Firebase Crashlytics 步骤)。ENABLE_USER_SCRIPT_SANDBOXING=NO:让该 Crashlytics Run-Script 能访问 dSYM。
Add your config plists
Copy the three configuration plists from the bundle’s VGSDKResources/Resources into your app’s source folder, then add them to the app target’s Build Phases → Copy Bundle Resources:
VGSDKService-Info.plistVGSDKIronSource-Info.plistGoogleService-Info.plist
The SDK reads them from Bundle.main at runtime, so they must be members of the app target. Copy Bundle Resources flattens them to the bundle root.
將三個設定 plist 從 bundle 的 VGSDKResources/Resources 複製到你 App 的原始碼資料夾,然後將它們加入 App target 的 Build Phases → Copy Bundle Resources:
VGSDKService-Info.plistVGSDKIronSource-Info.plistGoogleService-Info.plist
SDK 會在執行階段從 Bundle.main 讀取它們,因此它們必須是 App target 的成員。Copy Bundle Resources 會將它們平整化到 bundle 根目錄。
将三个配置 plist 从 bundle 的 VGSDKResources/Resources 复制到你 App 的源码文件夹,然后将它们添加到 App target 的 Build Phases → Copy Bundle Resources:
VGSDKService-Info.plistVGSDKIronSource-Info.plistGoogleService-Info.plist
SDK 会在运行时从 Bundle.main 读取它们,因此它们必须是 App target 的成员。Copy Bundle Resources 会将它们平整化到 bundle 根目录。
Configure Info.plist
Add these keys to your app’s Info.plist. The feature groups below are only needed if your game uses that feature. Each value marked derived names the exact key to copy from your VGSDKService-Info.plist (e.g. Features.VGA.ClientID): use your game’s real values and never copy a placeholder id.
將以下鍵加入你 App 的 Info.plist。下方的功能分組僅在你的遊戲使用該功能時才需要。每個標示為 derived(衍生)的值都會指明要從你的 VGSDKService-Info.plist 複製的確切鍵(例如 Features.VGA.ClientID):請使用你遊戲的真實值,切勿複製任何佔位 id。
将以下键添加到你 App 的 Info.plist。下方的功能分组仅在你的游戏使用该功能时才需要。每个标记为 derived(衍生)的值都会指明要从你的 VGSDKService-Info.plist 复制的确切键(例如 Features.VGA.ClientID):请使用你游戏的真实值,切勿复制任何占位 id。
Core (always)
| Key | Value |
|---|---|
NSAppTransportSecurity | { NSAllowsArbitraryLoads: true } |
NSUserTrackingUsageDescription | Recommended: We use tracking to personalize your experience and show you relevant content. |
GADApplicationIdentifier | derived from the top-level AdMobID in VGSDKService-Info.plist (only when available). |
核心(一律需要)
| 鍵 | 值 |
|---|---|
NSAppTransportSecurity | { NSAllowsArbitraryLoads: true } |
NSUserTrackingUsageDescription | 建議值:We use tracking to personalize your experience and show you relevant content. |
GADApplicationIdentifier | derived,來自 VGSDKService-Info.plist 中最上層的 AdMobID(僅在可用時)。 |
核心(始终需要)
| 键 | 值 |
|---|---|
NSAppTransportSecurity | { NSAllowsArbitraryLoads: true } |
NSUserTrackingUsageDescription | 建议值:We use tracking to personalize your experience and show you relevant content. |
GADApplicationIdentifier | derived,来自 VGSDKService-Info.plist 中最顶层的 AdMobID(仅在可用时)。 |
Sign-in (VNGGames Account, Google, Facebook)
Needed for VGA, Google, and Facebook login.
| Key | Value |
|---|---|
GGVNGClientID | derived from Features.VGA.ClientID: A VNGGames Account credential the SDK reads. |
GGVNGClientToken | derived from Features.VGA.ClientToken: A VNGGames Account credential the SDK reads. |
GIDClientID | derived from Features.Google.ClientID: The Google Sign-In client id. |
FacebookAppID | derived from Features.Facebook.AppID. |
FacebookClientToken | derived from Features.Facebook.ClientToken. |
CFBundleURLTypes (URL scheme) | • VGA: gg-<GGVNGClientID> (derived)• Google: copy REVERSED_CLIENT_ID from your GoogleService-Info.plist• Facebook: fb<FacebookAppID> (derived)• Append only schemes not already present. |
LSApplicationQueriesSchemes | • ggvng-api• fbapi• fbauth2• fb-messenger-api• fb-messenger-share-api• fbshareextension |
登入(VNGGames Account、Google、Facebook)
VGA、Google 與 Facebook 登入所需。
| 鍵 | 值 |
|---|---|
GGVNGClientID | derived,來自 Features.VGA.ClientID:SDK 會讀取的 VNGGames Account 憑證。 |
GGVNGClientToken | derived,來自 Features.VGA.ClientToken:SDK 會讀取的 VNGGames Account 憑證。 |
GIDClientID | derived,來自 Features.Google.ClientID:Google Sign-In 用戶端 id。 |
FacebookAppID | derived,來自 Features.Facebook.AppID。 |
FacebookClientToken | derived,來自 Features.Facebook.ClientToken。 |
CFBundleURLTypes(URL scheme) | • VGA:gg-<GGVNGClientID>(derived)• Google:從你的 GoogleService-Info.plist 複製 REVERSED_CLIENT_ID• Facebook: fb<FacebookAppID>(derived)• 僅附加尚未存在的 scheme。 |
LSApplicationQueriesSchemes | • ggvng-api• fbapi• fbauth2• fb-messenger-api• fb-messenger-share-api• fbshareextension |
登录(VNGGames Account、Google、Facebook)
VGA、Google 与 Facebook 登录所需。
| 键 | 值 |
|---|---|
GGVNGClientID | derived,来自 Features.VGA.ClientID:SDK 会读取的 VNGGames Account 凭据。 |
GGVNGClientToken | derived,来自 Features.VGA.ClientToken:SDK 会读取的 VNGGames Account 凭据。 |
GIDClientID | derived,来自 Features.Google.ClientID:Google Sign-In 客户端 id。 |
FacebookAppID | derived,来自 Features.Facebook.AppID。 |
FacebookClientToken | derived,来自 Features.Facebook.ClientToken。 |
CFBundleURLTypes(URL scheme) | • VGA:gg-<GGVNGClientID>(derived)• Google:从你的 GoogleService-Info.plist 复制 REVERSED_CLIENT_ID• Facebook: fb<FacebookAppID>(derived)• 仅追加尚未存在的 scheme。 |
LSApplicationQueriesSchemes | • ggvng-api• fbapi• fbauth2• fb-messenger-api• fb-messenger-share-api• fbshareextension |
Social sharing (photo, camera, Instagram)
Shared by Facebook and Instagram sharing. Your own values are kept if already set.
| Key | Value |
|---|---|
NSPhotoLibraryUsageDescription | Photo library access prompt. Recommended: We need access to your photo library so you can choose photos to post on social media. |
NSPhotoLibraryAddUsageDescription | Photo library add access prompt. Recommended: We need permission to save photos, screenshots, and media to your device. |
NSCameraUsageDescription | Camera access prompt. Recommended: We need access to your camera so you can take and share photos on social media. |
LSApplicationQueriesSchemes (Instagram) | • instagram-stories• instagram |
社群分享(相片、相機、Instagram)
由 Facebook 與 Instagram 分享共用。若你已設定自己的值則保留。
| 鍵 | 值 |
|---|---|
NSPhotoLibraryUsageDescription | 相片圖庫存取提示。建議值:We need access to your photo library so you can choose photos to post on social media. |
NSPhotoLibraryAddUsageDescription | 相片圖庫新增存取提示。建議值:We need permission to save photos, screenshots, and media to your device. |
NSCameraUsageDescription | 相機存取提示。建議值:We need access to your camera so you can take and share photos on social media. |
LSApplicationQueriesSchemes(Instagram) | • instagram-stories• instagram |
社交分享(相片、相机、Instagram)
由 Facebook 与 Instagram 分享共用。若你已设置自己的值则保留。
| 键 | 值 |
|---|---|
NSPhotoLibraryUsageDescription | 相册访问提示。建议值:We need access to your photo library so you can choose photos to post on social media. |
NSPhotoLibraryAddUsageDescription | 相册添加访问提示。建议值:We need permission to save photos, screenshots, and media to your device. |
NSCameraUsageDescription | 相机访问提示。建议值:We need access to your camera so you can take and share photos on social media. |
LSApplicationQueriesSchemes(Instagram) | • instagram-stories• instagram |
CleverTap (Engage)
| Key | Value |
|---|---|
CleverTapAccountID | derived from Features.CleverTap.AccountID. |
CleverTapToken | derived from Features.CleverTap.Token. |
CleverTapRegion | derived from Features.CleverTap.Region. |
CleverTapDisableIDFV | true |
In-app ads: ironSource
| Key | Value |
|---|---|
SKAdNetworkItems | Merge one { SKAdNetworkIdentifier: … } entry per identifier (unioned across ad networks by id):• su67r6k2v3.skadnetwork• cstr6suwn9.skadnetwork• 9g2aggbj52.skadnetwork• v9wttpbfk9.skadnetwork• n38lu8286q.skadnetwork• 4dzt52r2t5.skadnetwork |
NSAdvertisingAttributionReportEndpoint | https://postbacks-is.com |
In-app ads: Meta Audience Network
| Key | Value |
|---|---|
SKAdNetworkItems | Merge one { SKAdNetworkIdentifier: … } entry per identifier (unioned across ad networks by id):• v9wttpbfk9.skadnetwork• n38lu8286q.skadnetwork |
Capabilities & entitlements
In Xcode, select your app target → Signing & Capabilities → + Capability, and add the ones your build needs. Xcode creates and manages the .entitlements file and its code-signing setting for you.
在 Xcode 中選取你的 App target → Signing & Capabilities → + Capability,加入你的建置所需的功能。Xcode 會為你建立並管理 .entitlements 檔案及其程式碼簽署設定。
在 Xcode 中选择你的 App target → Signing & Capabilities → + Capability,添加你的构建所需的能力。Xcode 会为你创建并管理 .entitlements 文件及其代码签名设置。
- Add Sign in with Apple.
- 加入 Sign in with Apple。
- 添加 Sign in with Apple。
- Add Push Notifications and Background Modes (check Remote notifications).
- 加入 Push Notifications 與 Background Modes(勾選 Remote notifications)。
- 添加 Push Notifications 与 Background Modes(勾选 Remote notifications)。
- Add App Groups and create
group.<your app bundle id>, shared with the notification extensions step.
- 加入 App Groups 並建立
group.<你的 App bundle id>,與通知擴充功能步驟共用。
- 添加 App Groups 并创建
group.<你的 App bundle id>,与通知扩展步骤共用。
Provisioning is still yours. Enable the capabilities you added for your App ID in the Apple Developer portal and use a matching provisioning profile. The entitlements alone don’t grant them.
佈建仍由你負責。 請在 Apple Developer portal 中為此 App ID 啟用你所加入的功能,並使用相符的佈建描述檔(provisioning profile)。僅有 entitlements 並不會授予這些功能。
预置描述文件仍由你负责。 请在 Apple Developer portal 中为此 App ID 启用你所添加的能力,并使用相匹配的预置描述文件(provisioning profile)。仅有 entitlements 并不会授予这些能力。
Firebase Crashlytics
Crashlytics is baked into the SDK binary, but its dSYM upload needs a Run-Script phase. On the app target → Build Phases:
- Copy the tooling: copy the bundle’s
VGSDKResources/FirebaseCrashlytics/folder into your project root (next to the.xcodeproj), matching the$SRCROOTpath in the Run Script below. - Add a Run Script phase: click the + at the top-left of the phases list and choose New Run Script Phase, then drag it so it runs last. It must come after linking, because it consumes the dSYM and the linked executable.
Point the Run Script at the copied run script:
Crashlytics 已合併進 SDK 二進位檔,但其 dSYM 上傳需要一個 Run-Script 階段。在 App target → Build Phases:
- 複製工具: 將 bundle 的
VGSDKResources/FirebaseCrashlytics/資料夾複製到你的專案根目錄(與.xcodeproj同層),對應下方 Run Script 中的$SRCROOT路徑。 - 加入 Run Script 階段: 點按階段列表左上角的 +,選擇 New Run Script Phase,再將它拖曳至最後執行。它必須排在連結之後,因為它會使用 dSYM 與已連結的執行檔。
將 Run Script 指向複製過來的 run 指令碼:
Crashlytics 已合并进 SDK 二进制文件,但其 dSYM 上传需要一个 Run-Script 阶段。在 App target → Build Phases:
- 复制工具: 将 bundle 的
VGSDKResources/FirebaseCrashlytics/文件夹复制到你的项目根目录(与.xcodeproj同层),对应下方 Run Script 中的$SRCROOT路径。 - 添加 Run Script 阶段: 点击阶段列表左上角的 +,选择 New Run Script Phase,再将它拖到最后执行。它必须排在链接之后,因为它会使用 dSYM 与已链接的可执行文件。
将 Run Script 指向复制过来的 run 脚本:
"${SRCROOT}/VGSDKResources/FirebaseCrashlytics/run"Then add these five Input Files to the Run Script phase:
接著將以下五個 Input Files 加入該 Run Script 階段:
接着将以下五个 Input Files 添加到该 Run Script 阶段:
${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}
${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}
${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist
$(BUILT_PRODUCTS_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/GoogleService-Info.plist
$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)If your game uses CleverTap, add two app extensions so rich pushes render and push impressions are recorded: a Notification Service extension (NSE) and a Notification Content extension (NCE). Create both as Foundation app extensions and embed each .appex in the app via the Embed Foundation Extensions copy-files phase (the app depends on both).
若你的遊戲使用 CleverTap,請加入兩個 App 擴充功能,讓豐富推播得以呈現並記錄推播曝光:一個 Notification Service 擴充功能(NSE) 與一個 Notification Content 擴充功能(NCE)。兩者都建立為 Foundation App 擴充功能,並透過 Embed Foundation Extensions 複製檔案階段將每個 .appex 嵌入 App(App 會相依於兩者)。
若你的游戏使用 CleverTap,请添加两个 App 扩展,让富推送得以呈现并记录推送曝光:一个 Notification Service 扩展(NSE) 与一个 Notification Content 扩展(NCE)。两者都创建为 Foundation App 扩展,并通过 Embed Foundation Extensions 复制文件阶段将每个 .appex 嵌入 App(App 会依赖于两者)。
Notification Service extension (NSE)
Add the target in Xcode: File → New → Target… → Notification Service Extension, with bundle id <app bundle id>.NotificationService. Xcode embeds the .appex in the app. Its Info.plist needs:
| Key | Value |
|---|---|
NSExtension.NSExtensionPointIdentifier | com.apple.usernotifications.service |
NSExtension.NSExtensionPrincipalClass | • $(PRODUCT_MODULE_NAME).NotificationService (Swift)• NotificationService (Objective-C) |
CleverTapAccountID | derived from Features.CleverTap.AccountID. |
CleverTapToken | derived from Features.CleverTap.Token. |
CleverTapRegion | derived from Features.CleverTap.Region. |
CleverTapDisableIDFV | true |
VGSDKAppGroup | group.<app bundle id> |
NSAppTransportSecurity | { NSAllowsArbitraryLoads: true } (the NSE downloads ct_mediaUrl, which may be http) |
Set up the NSE target (the code below won’t compile until you do):
- App Groups: on the NSE target → Signing & Capabilities → + Capability, add App Groups and select the same
group.<app bundle id>as the app. Xcode writes the entitlement for you. - Frameworks: add
CTNotificationService.xcframeworkandCleverTapSDK.xcframework(fromVGSDKResources/Frameworks) to this target and set both to Embed & Sign.
Its principal class subclasses CTNotificationServiceExtension:
Notification Service 擴充功能(NSE)
在 Xcode 中新增 target:File → New → Target… → Notification Service Extension,bundle id 設為 <App bundle id>.NotificationService。Xcode 會將 .appex 嵌入 App。它的 Info.plist 需要:
| 鍵 | 值 |
|---|---|
NSExtension.NSExtensionPointIdentifier | com.apple.usernotifications.service |
NSExtension.NSExtensionPrincipalClass | • $(PRODUCT_MODULE_NAME).NotificationService(Swift)• NotificationService(Objective-C) |
CleverTapAccountID | derived,來自 Features.CleverTap.AccountID。 |
CleverTapToken | derived,來自 Features.CleverTap.Token。 |
CleverTapRegion | derived,來自 Features.CleverTap.Region。 |
CleverTapDisableIDFV | true |
VGSDKAppGroup | group.<App bundle id> |
NSAppTransportSecurity | { NSAllowsArbitraryLoads: true }(NSE 會下載 ct_mediaUrl,可能是 http) |
設定 NSE target(完成前下方程式碼無法編譯):
- App Groups: 在 NSE target → Signing & Capabilities → + Capability,加入 App Groups 並選擇與 App 相同的
group.<App bundle id>。Xcode 會為你寫入 entitlement。 - Frameworks: 將
CTNotificationService.xcframework與CleverTapSDK.xcframework(來自VGSDKResources/Frameworks)加入此 target 並將兩者設為 Embed & Sign。
它的 principal class 繼承自 CTNotificationServiceExtension:
Notification Service 扩展(NSE)
在 Xcode 中新增 target:File → New → Target… → Notification Service Extension,bundle id 设为 <App bundle id>.NotificationService。Xcode 会将 .appex 嵌入 App。它的 Info.plist 需要:
| 键 | 值 |
|---|---|
NSExtension.NSExtensionPointIdentifier | com.apple.usernotifications.service |
NSExtension.NSExtensionPrincipalClass | • $(PRODUCT_MODULE_NAME).NotificationService(Swift)• NotificationService(Objective-C) |
CleverTapAccountID | derived,来自 Features.CleverTap.AccountID。 |
CleverTapToken | derived,来自 Features.CleverTap.Token。 |
CleverTapRegion | derived,来自 Features.CleverTap.Region。 |
CleverTapDisableIDFV | true |
VGSDKAppGroup | group.<App bundle id> |
NSAppTransportSecurity | { NSAllowsArbitraryLoads: true }(NSE 会下载 ct_mediaUrl,可能是 http) |
设置 NSE target(完成前下方代码无法编译):
- App Groups: 在 NSE target → Signing & Capabilities → + Capability,添加 App Groups 并选择与 App 相同的
group.<App bundle id>。Xcode 会为你写入 entitlement。 - Frameworks: 将
CTNotificationService.xcframework与CleverTapSDK.xcframework(来自VGSDKResources/Frameworks)添加到此 target 并将两者设为 Embed & Sign。
它的 principal class 继承自 CTNotificationServiceExtension:
// NotificationService.m
@import UserNotifications;
@import CTNotificationService;
@import CleverTapSDK;
@interface NotificationService : CTNotificationServiceExtension
@end
@implementation NotificationService
- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request
withContentHandler:(void (^)(UNNotificationContent *))contentHandler {
// Manual integration doesn't ship VGSDKNotificationService, so inline what
// VGSDKNotification.recordImpression does: read the App Group + shared user id,
// identify that user, then record the CleverTap "Notification Viewed" impression.
NSString *group = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"VGSDKAppGroup"];
NSUserDefaults *shared = group ? [[NSUserDefaults alloc] initWithSuiteName:group] : nil;
NSString *userId = [shared stringForKey:@"VGSDK_SHARED_USER_ID"];
if (userId) {
[[CleverTap sharedInstance] onUserLogin:@{@"Identity": userId}];
[[CleverTap sharedInstance] recordNotificationViewedEventWithData:request.content.userInfo];
}
[super didReceiveNotificationRequest:request withContentHandler:contentHandler];
}
@endDon’t rename
VGSDKAppGrouporVGSDK_SHARED_USER_ID. The SDK writes and reads these exact key names, andVGSDKAppGroupmust hold the same App Group id as the host app (group.<app bundle id>). Change either name or use a different group, and the NSE records no impression.
請勿更改
VGSDKAppGroup或VGSDK_SHARED_USER_ID。 SDK 會以這些確切的鍵名寫入與讀取,且VGSDKAppGroup必須填入與 host App 相同的 App Group id(group.<App bundle id>)。只要更改其一或使用不同的 group,NSE 就不會記錄任何曝光。
请勿更改
VGSDKAppGroup或VGSDK_SHARED_USER_ID。 SDK 会以这些确切的键名写入与读取,且VGSDKAppGroup必须填入与 host App 相同的 App Group id(group.<App bundle id>)。只要更改其一或使用不同的 group,NSE 就不会记录任何曝光。
Notification Content extension (NCE)
Add the target in Xcode: File → New → Target… → Notification Content Extension, with bundle id <app bundle id>.NotificationContent. Keep the MainInterface.storyboard Xcode creates (you wire it below). Its Info.plist needs:
| Key | Value |
|---|---|
NSExtension.NSExtensionPointIdentifier | com.apple.usernotifications.content-extension |
NSExtension.NSExtensionMainStoryboard | MainInterface (its view controller’s Custom Class is set below) |
NSExtension.NSExtensionAttributes | { UNNotificationExtensionCategory: "CTNotification", UNNotificationExtensionInitialContentSizeRatio: 0.1, UNNotificationExtensionDefaultContentHidden: true } |
CleverTapAccountID | derived from Features.CleverTap.AccountID. |
CleverTapToken | derived from Features.CleverTap.Token. |
CleverTapRegion | derived from Features.CleverTap.Region. |
CleverTapDisableIDFV | true |
Set up the NCE target (the code below won’t compile until you do):
- Frameworks: add
CTNotificationContent.xcframework(fromVGSDKResources/Frameworks) to this target and set it to Embed & Sign. - Storyboard: in
MainInterface.storyboard, replace the default view with a plain UIView and set the view controller’s Custom Class toNotificationViewController.
That view controller subclasses CTNotificationViewController:
Notification Content 擴充功能(NCE)
在 Xcode 中新增 target:File → New → Target… → Notification Content Extension,bundle id 設為 <App bundle id>.NotificationContent。保留 Xcode 建立的 MainInterface.storyboard(你會在下方設定它)。它的 Info.plist 需要:
| 鍵 | 值 |
|---|---|
NSExtension.NSExtensionPointIdentifier | com.apple.usernotifications.content-extension |
NSExtension.NSExtensionMainStoryboard | MainInterface(其 view controller 的 Custom Class 於下方設定) |
NSExtension.NSExtensionAttributes | { UNNotificationExtensionCategory: "CTNotification", UNNotificationExtensionInitialContentSizeRatio: 0.1, UNNotificationExtensionDefaultContentHidden: true } |
CleverTapAccountID | derived,來自 Features.CleverTap.AccountID。 |
CleverTapToken | derived,來自 Features.CleverTap.Token。 |
CleverTapRegion | derived,來自 Features.CleverTap.Region。 |
CleverTapDisableIDFV | true |
設定 NCE target(完成前下方程式碼無法編譯):
- Frameworks: 將
CTNotificationContent.xcframework(來自VGSDKResources/Frameworks)加入此 target 並設為 Embed & Sign。 - Storyboard: 在
MainInterface.storyboard中,將預設 view 換成一個純 UIView,並將 view controller 的 Custom Class 設為NotificationViewController。
該 view controller 繼承自 CTNotificationViewController:
Notification Content 扩展(NCE)
在 Xcode 中新增 target:File → New → Target… → Notification Content Extension,bundle id 设为 <App bundle id>.NotificationContent。保留 Xcode 创建的 MainInterface.storyboard(你会在下方设置它)。它的 Info.plist 需要:
| 键 | 值 |
|---|---|
NSExtension.NSExtensionPointIdentifier | com.apple.usernotifications.content-extension |
NSExtension.NSExtensionMainStoryboard | MainInterface(其 view controller 的 Custom Class 于下方设置) |
NSExtension.NSExtensionAttributes | { UNNotificationExtensionCategory: "CTNotification", UNNotificationExtensionInitialContentSizeRatio: 0.1, UNNotificationExtensionDefaultContentHidden: true } |
CleverTapAccountID | derived,来自 Features.CleverTap.AccountID。 |
CleverTapToken | derived,来自 Features.CleverTap.Token。 |
CleverTapRegion | derived,来自 Features.CleverTap.Region。 |
CleverTapDisableIDFV | true |
设置 NCE target(完成前下方代码无法编译):
- Frameworks: 将
CTNotificationContent.xcframework(来自VGSDKResources/Frameworks)添加到此 target 并设为 Embed & Sign。 - Storyboard: 在
MainInterface.storyboard中,将默认 view 换成一个纯 UIView,并将 view controller 的 Custom Class 设为NotificationViewController。
该 view controller 继承自 CTNotificationViewController:
// NotificationViewController.m
@import CTNotificationContent;
@interface NotificationViewController : CTNotificationViewController
@end
@implementation NotificationViewController
@endImport the SDK
Import the SDK module:
匯入 SDK 模組:
导入 SDK 模块:
@import PassSDK;Authentication
Sign the player in through the SDK’s channel picker or a specific channel, and delete the signed-in account. Every login callback delivers the signed-in player’s info on success, or an error on cancel/failure. Zero-interaction quick login and VGA account management live in the Quick Authentication section.
透過 SDK 的頻道選擇器或指定頻道讓玩家登入,並可刪除已登入的帳號。每次登入回呼在成功時會傳回已登入玩家的資訊,在取消或失敗時則傳回錯誤。零互動的快速登入與 VGA 帳號管理位於 Quick Authentication 區段。
通过 SDK 的渠道选择器或指定渠道让玩家登录,并可删除已登录的账号。每次登录回调在成功时会返回已登录玩家的信息,在取消或失败时则返回错误。零交互的快速登录与 VGA 账号管理位于 Quick Authentication 部分。
Show the login form
Presents the login form so the player can pick a sign-in channel.
顯示登入表單,讓玩家選擇登入頻道。
显示登录表单,让玩家选择登录渠道。
[[PassSDK shared] showLoginForm:^(PassUserInfo *info, NSError *error) {
if (error != nil) {
// handle failure
} else {
// info.userID, info.displayName, info.sessionID
}
}];Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
info | PassUserInfo? | The signed-in player. Fields: PassUserInfo. |
error | NSError? | The failure reason when the player cancels or login fails: see VGA / Passport-legacy login error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
info | PassUserInfo? | 成功時為已登入的使用者。取消或失敗時不存在。欄位:PassUserInfo。 |
error | NSError? | 當玩家取消或登入失敗時存在: 請參閱 VGA / Passport-legacy 登入錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
info | PassUserInfo? | 成功时为已登录的用户。取消或失败时不存在。字段:PassUserInfo。 |
error | NSError? | 当玩家取消或登录失败时存在: 请参阅 VGA / Passport-legacy 登录错误码。 |
Auto login
Silently re-authenticates the last-used channel if a session exists, otherwise presents the login form.
若已存在工作階段,會以最近使用的頻道靜默重新驗證。否則顯示登入表單。
若已存在会话,会以最近使用的渠道静默重新验证。否则显示登录表单。
[[PassSDK shared] autoLogin:^(PassUserInfo *info, NSError *error) {
// Same result fields as showLoginForm
}];Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
info | PassUserInfo? | The signed-in player. Fields: PassUserInfo. |
error | NSError? | The failure reason when the player cancels or login fails: see VGA / Passport-legacy login error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
info | PassUserInfo? | 成功時為已登入的使用者。取消或失敗時不存在。欄位:PassUserInfo。 |
error | NSError? | 當玩家取消或登入失敗時存在: 請參閱 VGA / Passport-legacy 登入錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
info | PassUserInfo? | 成功时为已登录的用户。取消或失败时不存在。字段:PassUserInfo。 |
error | NSError? | 当玩家取消或登录失败时存在: 请参阅 VGA / Passport-legacy 登录错误码。 |
Direct login to a channel
Signs in to one channel directly, bypassing the picker.
直接登入單一頻道,略過選擇器。
直接登录单一渠道,跳过选择器。
[[PassSDK shared] directLogin:PassLoginTypeGoogle completion:^(PassUserInfo *info, NSError *error) {
// Handle result
}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
type | PassLoginType | Login channel to sign in to: see PassLoginType. |
| 欄位 | 型別 | 說明 |
|---|---|---|
type | PassLoginType | 要登入的登入頻道: 請參閱 PassLoginType。 |
| 字段 | 类型 | 描述 |
|---|---|---|
type | PassLoginType | 要登录的登录渠道: 请参阅 PassLoginType。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
info | PassUserInfo? | The signed-in player. Fields: PassUserInfo. |
error | NSError? | The failure reason when the player cancels or login fails: see VGA / Passport-legacy login error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
info | PassUserInfo? | 成功時為已登入的使用者。取消或失敗時不存在。欄位:PassUserInfo。 |
error | NSError? | 當玩家取消或登入失敗時存在: 請參閱 VGA / Passport-legacy 登入錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
info | PassUserInfo? | 成功时为已登录的用户。取消或失败时不存在。字段:PassUserInfo。 |
error | NSError? | 当玩家取消或登录失败时存在: 请参阅 VGA / Passport-legacy 登录错误码。 |
Log out
Signs the current player out and clears the stored session.
將目前的玩家登出並清除已儲存的工作階段。
将当前玩家登出并清除已保存的会话。
[[PassSDK shared] logout];Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Check the login session (server-side only)
Validates a player’s session from YOUR game server, not from the client. After a login callback hands the game a userID and a sessionID, the game’s backend POSTs them to /api/login/checkSession as application/x-www-form-urlencoded, and trusts the player only when returnCode is 1. There is no SDK call for this and no client-side equivalent: a client can claim any session, which is the reason the check exists. The domain to send it to and your game’s secret key are issued on request, see below.
從你的遊戲伺服器驗證玩家的工作階段,而不是從用戶端。登入回呼把 userID 與 sessionID 交給遊戲之後,遊戲的後端以 application/x-www-form-urlencoded 將兩者 POST 到 /api/login/checkSession,只有在 returnCode 為 1 時才信任該玩家。SDK 沒有對應的呼叫,用戶端也沒有等價做法:用戶端可以宣稱任何工作階段,這正是需要這道檢查的原因。要送往的網域與你的遊戲 secret key 需另行申請,見下方說明。
从你的游戏服务器验证玩家的会话,而不是从客户端。登录回调把 userID 与 sessionID 交给游戏之后,游戏的后端以 application/x-www-form-urlencoded 将两者 POST 到 /api/login/checkSession,只有在 returnCode 为 1 时才信任该玩家。SDK 没有对应的调用,客户端也没有等价做法:客户端可以声称任何会话,这正是需要这道检查的原因。要发往的域名与你的游戏 secret key 需另行申请,见下方说明。
# Domain and secret key come from your server's environment, never from a literal.
TIMESTAMP=$(date +%s)
SIG=$(printf '%s%s%s%s%s' "$VGA_SECRET_KEY" "$GAME_ID" "$USER_ID" "$TIMESTAMP" "$SESSION_ID" | md5sum | cut -d' ' -f1)
curl -X POST "$VGA_DOMAIN/api/login/checkSession" \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode "gameID=$GAME_ID" \
--data-urlencode "userID=$USER_ID" \
--data-urlencode "sessionID=$SESSION_ID" \
--data-urlencode "timestamp=$TIMESTAMP" \
--data-urlencode "sig=$SIG"Server-side only. The path is
/api/login/checkSession, but the DOMAIN and your game’s secret key are not published here. Email pin.sdk.dev@vng.com.vn to be issued both. The secret key must never ship in a game client.
僅限伺服器端。 路徑為
/api/login/checkSession,但網域與你的遊戲 secret key 不會公開在這裡,請來信 pin.sdk.dev@vng.com.vn 索取。secret key 絕對不可以隨遊戲用戶端一起發布。
仅限服务器端。 路径为
/api/login/checkSession,但域名与你的游戏 secret key 不会公开在这里,请来信 pin.sdk.dev@vng.com.vn 索取。secret key 绝对不可以随游戏客户端一起发布。
Input
輸入
输入
| Field | Type | Description |
|---|---|---|
userID | string | Unique VNGGames user id. |
sessionID | string | Session token used to authenticate backend calls. |
gameID | string | A VNGGames Account credential the SDK reads. |
timestamp | string | Unix time in SECONDS at the moment of the call. |
sig | string | Checksum over the other parameters: md5(secretKey + gameID + userID + timestamp + sessionID). The secret key is issued to your team and lives server-side only, which is what keeps this call off the client. |
| 欄位 | 型別 | 說明 |
|---|---|---|
userID | string | VNGGames 唯一使用者 ID。 |
sessionID | string | 用於驗證後端呼叫的工作階段權杖。 |
gameID | string | SDK 會讀取的 VNGGames Account 憑證。 |
timestamp | string | 發出呼叫當下的 Unix 時間,單位為「秒」。 |
sig | string | 其餘參數的檢查碼:md5(secretKey + gameID + userID + timestamp + sessionID)。secret key 由 SDK 團隊發給你的團隊,且只存在於伺服器端,這正是這個呼叫不能放在用戶端的原因。 |
| 字段 | 类型 | 描述 |
|---|---|---|
userID | string | VNGGames 唯一用户 ID。 |
sessionID | string | 用于验证后端调用的会话令牌。 |
gameID | string | SDK 会读取的 VNGGames Account 凭据。 |
timestamp | string | 发出调用当下的 Unix 时间,单位为「秒」。 |
sig | string | 其余参数的校验和:md5(secretKey + gameID + userID + timestamp + sessionID)。secret key 由 SDK 团队发给你的团队,且只存在于服务器端,这正是这个调用不能放在客户端的原因。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
returnCode | int | Treat anything other than 1 as not signed in.• 1 the session is valid.• -1 bad sig.• -2 bad parameter.• -108 the session does not exist.• -404 unknown endpoint.• -500 service error. |
message | string | Human-readable result, for your server logs rather than for players. |
data | null | Always null on this endpoint. The verdict is returnCode. |
| 欄位 | 型別 | 說明 |
|---|---|---|
returnCode | int | 只要不是 1,一律視為未登入。• 1 工作階段有效。• -1 sig 有誤。• -2 參數有誤。• -108 工作階段不存在。• -404 端點不存在。• -500 服務錯誤。 |
message | string | 可讀的結果訊息,用於你的伺服器紀錄,而不是顯示給玩家。 |
data | null | 這個端點永遠回傳 null,判定結果看 returnCode。 |
| 字段 | 类型 | 描述 |
|---|---|---|
returnCode | int | 只要不是 1,一律视为未登录。• 1 会话有效。• -1 sig 有误。• -2 参数有误。• -108 会话不存在。• -404 端点不存在。• -500 服务错误。 |
message | string | 可读的结果消息,用于你的服务器日志,而不是显示给玩家。 |
data | null | 这个端点永远返回 null,判定结果看 returnCode。 |
Is delete-account enabled
Reports whether the current account supports self-service deletion, so the game can show/hide the entry point.
回報目前帳號是否支援自助刪除,讓遊戲可據此顯示或隱藏入口。
报告当前账号是否支持自助删除,以便游戏据此显示或隐藏入口。
Account deletion applies to Direct login accounts only.
帳號刪除僅適用於 Direct login 帳號。
账号删除仅适用于 Direct login 账号。
if ([[PassSDK shared] deleteAccountEnabled]) {
// Show the delete-account entry point
}Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
enabled | Bool | true when self-service deletion is available for the current account. |
| 欄位 | 型別 | 說明 |
|---|---|---|
enabled | Bool | 當目前帳號可使用自助刪除時為 true。 |
| 字段 | 类型 | 描述 |
|---|---|---|
enabled | Bool | 当当前账号可使用自助删除时为 true。 |
Delete account
Runs the account-deletion flow.
執行帳號刪除流程。
执行账号删除流程。
Account deletion applies to Direct login accounts only.
帳號刪除僅適用於 Direct login 帳號。
账号删除仅适用于 Direct login 账号。
[[PassSDK shared] deleteAccount:^(BOOL success) {
// YES when the account was deleted
}];Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
success | Bool | true when the account was successfully deleted. |
| 欄位 | 型別 | 說明 |
|---|---|---|
success | Bool | 當帳號成功刪除時為 true。 |
| 字段 | 类型 | 描述 |
|---|---|---|
success | Bool | 当账号成功删除时为 true。 |
Quick Authentication
Zero-interaction sign-in and VGA account management: available only with VGA login. v1 (PassSDK.shared) is the first-generation API: quick login resolves on the login callback. v2 (VGSDKQuickAuth) is the listener-based facade: the listener’s onSuccess delivers the player’s info, onError the failure reason. Manage account opens the VGA account-management screen and applies to accounts signed in with either version.
零互動登入與 VGA 帳號管理: 僅在使用 VGA 登入時可用。v1(PassSDK.shared)為第一代 API:快速登入透過登入回呼回傳結果。v2(VGSDKQuickAuth)為以監聽器為基礎的門面:監聽器的 onSuccess 會傳回玩家資訊,onError 則傳回失敗原因。管理帳號 會開啟 VGA 帳號管理畫面,且適用於以任一版本登入的帳號。
零交互登录与 VGA 账号管理: 仅在 VGA 登录时可用。v1(PassSDK.shared)为第一代 API:快速登录在登录回调上返回结果。v2(VGSDKQuickAuth)为基于监听器的门面:监听器的 onSuccess 返回玩家信息,onError 返回失败原因。管理账号 会打开 VGA 账号管理界面,且适用于以任一版本登录的账号。
v1
Quick login
Signs the player in with no form to load and no required interaction.
讓玩家登入,無需載入表單,也不需要任何互動。
无需加载表单、无需任何交互即可让玩家登录。
[[PassSDK shared] quickLogin:^(PassUserInfo *info, NSError *error) {
// Signed in, or error on failure
}];Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
info | PassUserInfo? | The signed-in player. Fields: PassUserInfo. |
error | NSError? | The failure reason when the player cancels or login fails: see VGA login error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
info | PassUserInfo? | 成功時為已登入的使用者。取消或失敗時不存在。欄位:PassUserInfo。 |
error | NSError? | 當玩家取消或登入失敗時的失敗原因: 請參閱 VGA 登入錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
info | PassUserInfo? | 成功时为已登录的用户。取消或失败时不存在。字段:PassUserInfo。 |
error | NSError? | 当玩家取消或登录失败时的失败原因: 请参阅 VGA 登录错误码。 |
v2
Sign in
Presents the quick-authentication sign-in UI so the player signs in with an available account.
顯示快速身分驗證登入介面,讓玩家使用可用的帳號登入。
展示快速身份验证登录界面,让玩家使用可用账号登录。
VGSDKAuthenticationListener *listener = [[VGSDKAuthenticationListener alloc]
initWithOnSuccess:^(PassUserInfo * _Nonnull info) { /* signed in */ }
onError:^(NSError * _Nonnull error) { /* failed */ }];
[VGSDKQuickAuth showLoginWithListener:listener];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
listener | VGSDKAuthenticationListener | Result listener (onSuccess/onError). |
listener.onSuccess | (PassUserInfo) -> Void | Called with the signed-in user. |
listener.onError | (NSError) -> Void | Called with the failure reason. |
| 欄位 | 型別 | 說明 |
|---|---|---|
listener | VGSDKAuthenticationListener | 結果監聽器(onSuccess/onError)。 |
listener.onSuccess | (PassUserInfo) -> Void | 以已登入的使用者呼叫。 |
listener.onError | (NSError) -> Void | 以失敗原因呼叫。 |
| 字段 | 类型 | 描述 |
|---|---|---|
listener | VGSDKAuthenticationListener | 结果监听器(onSuccess/onError)。 |
listener.onSuccess | (PassUserInfo) -> Void | 以已登录的用户调用。 |
listener.onError | (NSError) -> Void | 以失败原因调用。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
onSuccess | PassUserInfo | The signed-in player. Fields: PassUserInfo. |
onError | NSError | The failure reason when the player cancels or login fails: see VGA login error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
onSuccess | PassUserInfo | 已登入使用者,必定存在。欄位:PassUserInfo。 |
onError | NSError | 當玩家取消或登入失敗時的失敗原因: 請參閱 VGA 登入錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
onSuccess | PassUserInfo | 已登录用户,必定存在。字段:PassUserInfo。 |
onError | NSError | 当玩家取消或登录失败时的失败原因: 请参阅 VGA 登录错误码。 |
Play as guest
Signs the player in as an anonymous guest: no account selection or credentials required.
以匿名訪客身分讓玩家登入: 無需選擇帳號或提供憑證。
以匿名访客身份让玩家登录: 无需选择账号或提供凭据。
[VGSDKQuickAuth playAsGuestWithListener:listener];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
listener | VGSDKAuthenticationListener | Result listener (onSuccess/onError). |
| 欄位 | 型別 | 說明 |
|---|---|---|
listener | VGSDKAuthenticationListener | 結果監聽器(onSuccess/onError)。 |
| 字段 | 类型 | 描述 |
|---|---|---|
listener | VGSDKAuthenticationListener | 结果监听器(onSuccess/onError)。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
onSuccess | PassUserInfo | The signed-in player. Fields: PassUserInfo. |
onError | NSError | The failure reason when the player cancels or login fails: see VGA login error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
onSuccess | PassUserInfo | 訪客使用者,必定存在。欄位:PassUserInfo。 |
onError | NSError | 當玩家取消或登入失敗時的失敗原因: 請參閱 VGA 登入錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
onSuccess | PassUserInfo | 访客用户,必定存在。字段:PassUserInfo。 |
onError | NSError | 当玩家取消或登录失败时的失败原因: 请参阅 VGA 登录错误码。 |
Show channel selection
Presents the channel picker so the player chooses which sign-in channel to use.
顯示頻道選擇器,讓玩家選擇要使用的登入頻道。
展示渠道选择器,让玩家选择要使用的登录渠道。
[VGSDKQuickAuth showChannelSelectionWithListener:listener];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
listener | VGSDKAuthenticationListener | Result listener (onSuccess/onError). |
| 欄位 | 型別 | 說明 |
|---|---|---|
listener | VGSDKAuthenticationListener | 結果監聽器(onSuccess/onError)。 |
| 字段 | 类型 | 描述 |
|---|---|---|
listener | VGSDKAuthenticationListener | 结果监听器(onSuccess/onError)。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
onSuccess | PassUserInfo | The signed-in player. Fields: PassUserInfo. |
onError | NSError | The failure reason when the player cancels or login fails: see VGA login error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
onSuccess | PassUserInfo | 已登入使用者,必定存在。欄位:PassUserInfo。 |
onError | NSError | 當玩家取消或登入失敗時的失敗原因: 請參閱 VGA 登入錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
onSuccess | PassUserInfo | 已登录用户,必定存在。字段:PassUserInfo。 |
onError | NSError | 当玩家取消或登录失败时的失败原因: 请参阅 VGA 登录错误码。 |
Manage account
Open account management
Opens the VGA account-management screen and reports what the player did. Works for accounts signed in with either quick-auth version.
開啟 VGA 帳號管理畫面,並回報玩家執行的操作。
打开 VGA 账号管理界面并报告玩家所执行的操作。
[[PassSDK shared] manageAccount:^(PassManageAccountAction action, PassUserInfo *info) { }];Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
action | PassManageAccountAction | The action the player took. See PassManageAccountAction. |
info | PassUserInfo? | The signed-in player. Fields: PassUserInfo. |
| 欄位 | 型別 | 說明 |
|---|---|---|
action | PassManageAccountAction | 玩家執行的操作。請參閱 PassManageAccountAction。 |
info | PassUserInfo? | 管理後產生的使用者。若未變更/已取消則不存在。欄位:PassUserInfo。 |
| 字段 | 类型 | 描述 |
|---|---|---|
action | PassManageAccountAction | 玩家执行的操作。请参阅 PassManageAccountAction。 |
info | PassUserInfo? | 管理后得到的用户,若未更改 / 取消则不存在。字段:PassUserInfo。 |
In-App Purchase
Query the sellable products, then run a purchase through Google Play Billing / App Store In-App Purchase. Products and purchase status are delivered on listener closures.
查詢可販售的商品,然後透過 Google Play Billing/App Store In-App Purchase 執行購買。商品與購買狀態會透過監聽器閉包傳回。
先查询可售商品,然后通过 Google Play Billing / App Store In-App Purchase 执行购买。商品与购买状态在监听器闭包上返回。
Get products
Fetches the sellable products for a set of item ids.
為一組道具 ID 取得可販售的商品。
为一组物品 id 获取可售商品。
[VGSDKPayment getProductsWithIds:@[@"item-1"] listener:^(NSArray<VGSDKPaymentProduct *> *products, NSError *error) {
if (products == nil || error != nil) { return; }
// Use product.displayPrice to render the price
}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
ids | [String] | List of configured item id from Store. |
| 欄位 | 型別 | 說明 |
|---|---|---|
ids | [String] | 在商店設定的商品 id 清單。 |
| 字段 | 类型 | 描述 |
|---|---|---|
ids | [String] | 在商店配置的商品 id 列表。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
products | [VGSDKPaymentProduct]? | The products found. Empty when no id matched. Each entry: VGSDKPaymentProduct. |
error | Error? | Present on failure: see billing / store payment error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
products | [VGSDKPaymentProduct]? | 找到的商品。沒有 id 相符時為空。每個項目:VGSDKPaymentProduct。 |
error | Error? | 失敗時存在: 請參閱 帳務/商店 付款錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
products | [VGSDKPaymentProduct]? | 找到的商品。没有 id 匹配时为空。每个条目:VGSDKPaymentProduct。 |
error | Error? | 失败时存在: 请参阅 计费 / 商店 支付错误码。 |
Purchase
Runs a purchase and reports the outcome. Build the request with the purchase-info object: all fields required.
執行購買並回報結果。使用購買資訊物件建立請求: 所有欄位皆為必填。
执行购买并报告结果。使用购买信息对象构建请求: 所有字段均为必填。
VGSDKPaymentInfo *info = [[VGSDKPaymentInfo alloc]
initWithUserId:@"user-1" itemId:@"item-1" serverId:@"server-1"
roleId:@"role-1" appTransactionId:@"txn-1" addInfo:@""];
[VGSDKPayment purchaseWithInfo:info listener:^(VGSDKPaymentPurchaseStatus status, NSError *error) {
switch (status) {
case VGSDKPaymentPurchaseStatusSuccess: break; // granted
case VGSDKPaymentPurchaseStatusPending: break; // awaiting external confirmation
default: break;
}
}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
info | VGSDKPaymentInfo | The purchase request: full model: VGSDKPaymentInfo. Optional clientKey / secretKey set signing keys. |
| 欄位 | 型別 | 說明 |
|---|---|---|
info | VGSDKPaymentInfo | 購買請求: 完整模型:VGSDKPaymentInfo。可選用的 clientKey/secretKey 用於設定簽章金鑰。 |
| 字段 | 类型 | 描述 |
|---|---|---|
info | VGSDKPaymentInfo | 购买请求: 完整模型:VGSDKPaymentInfo。可选的 clientKey / secretKey 用于设置签名密钥。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
status | VGSDKPaymentPurchaseStatus | Purchase outcome: see VGSDKPaymentPurchaseStatus. |
error | Error? | Purchase failed. See billing / store payment error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
status | VGSDKPaymentPurchaseStatus | 購買結果: 請參閱 VGSDKPaymentPurchaseStatus。 |
error | Error? | 購買失敗。請參閱 帳務/商店 付款錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
status | VGSDKPaymentPurchaseStatus | 购买结果: 请参阅 VGSDKPaymentPurchaseStatus。 |
error | Error? | 购买失败。请参阅 计费/商店 支付错误码。 |
Analytics
One facade for every analytics provider, organised by use case. Configure analytics first, then send ad-hoc custom events or the structured use-case funnels (Conversion Rate = app launch → play, Onboarding = new user → early monetization, Main & Daily Activities, Social & Communities). Providers: AppsFlyer, Firebase, Data Platform, Facebook, CleverTap, ThinkingData. Every call is fire-and-forget. Every event also carries a set of default parameters the SDK fills in automatically: see Analytics default parameters.
Notice: Every event the VNGGames SDK APIs trigger starts with the
vgsdk_prefix and follows the formulavgsdk_{prefix}_{event name}: for example,vgsdk_af_app_open. See Analytics platform prefixes.
涵蓋所有分析供應商的單一門面,依使用情境組織。請先設定分析,然後傳送臨時的自訂事件,或使用結構化的使用情境漏斗(Conversion Rate=應用程式啟動 → 遊玩、Onboarding=新使用者 → 早期營利、Main & Daily Activities、Social & Communities)。供應商:AppsFlyer、Firebase、Data Platform、Facebook、CleverTap、ThinkingData。每個呼叫都是 fire-and-forget。每個事件還會帶有一組由 SDK 自動填入的預設參數: 請參閱 分析預設參數。
注意: VNGGames SDK API 觸發的每個事件都以
vgsdk_前綴開頭,並遵循vgsdk_{prefix}_{event name}公式: 例如vgsdk_af_app_open。請參閱 分析平台前綴。
面向所有分析提供方的统一门面,按使用场景组织。先配置分析,然后发送临时自定义事件或结构化的使用场景漏斗(Conversion Rate = 应用启动 → 游玩,Onboarding = 新用户 → 早期变现,Main & Daily Activities,Social & Communities)。提供方:AppsFlyer、Firebase、Data Platform、Facebook、CleverTap、ThinkingData。每次调用都是 fire-and-forget。每个事件还会携带一组由 SDK 自动填充的默认参数: 请参阅 分析默认参数。
注意: VNGGames SDK API 触发的每个事件都以
vgsdk_前缀开头,并遵循公式vgsdk_{prefix}_{event name}: 例如vgsdk_af_app_open。请参阅 分析平台前缀。
Setup
Configure analytics
Required analytics setup: binds the current role id and name to the analytics session so tracked events carry role context. Call once after login, before sending events.
必要的分析設定:將目前的角色 ID 與名稱綁定到分析工作階段,讓追蹤的事件帶有角色情境。請在登入後、傳送事件前呼叫一次。
必需的分析设置:将当前角色 id 和名称绑定到分析会话,使追踪的事件带有角色上下文。登录后、发送事件前调用一次。
Required setup for analytics.
分析的必要設定。
分析的必需设置。
[VGSDKAnalytics miscConfigAnalytics:@"role-1" roleName:@"Hero"];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
roleName | String | Character/role name. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
roleName | String | 角色名稱。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
roleName | String | 角色名称。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Integration Limitations
Rules & limits
Constraints that apply to every event you send through this facade: they aggregate the rules of the underlying providers. Review them before instrumenting:
- Event names must begin with a letter, contain no spaces (use underscores), and be at most 100 characters. They may not begin with
",\,=,+, or-, are case-sensitive (af_purchase≠af_PURCHASE), and may include non-English characters. - Per event: at most 25 parameters.
- Parameter names must be at most 40 characters.
- Parameter values must not exceed 1000 characters (longer values may be truncated). Keep total event values under 2000 characters.
- Revenue / price values use digits and a single decimal point only, with at most 5 digits after the point.
- Cardinality: at most 300 unique event names per day.
- Unique users are counted only for the first 100 events after a user installs the app.
- Referring URLs must be URL-encoded.
- Meta (Facebook) Ads impose additional limits on event parameters.
適用於你透過此門面傳送的每個事件的限制: 它們彙整了底層各供應商的規則。請在埋點前詳閱:
- 事件名稱 必須以字母開頭、不得包含空格(請使用底線),且最多 100 個字元。不得以
"、\、=、+或-開頭,區分大小寫(af_purchase≠af_PURCHASE),並可包含非英文字元。 - 每個事件: 最多 25 個參數。
- 參數名稱 最多 40 個字元。
- 參數值 不得超過 1000 個字元(過長的值可能會被截斷)。請將事件的總值控制在 2000 個字元以內。
- 收益/價格值 僅能使用數字與單一小數點,小數點後最多 5 位數。
- 基數: 每天最多 300 個不重複的事件名稱。
- 不重複使用者 僅在使用者安裝應用程式後的前 100 個事件內計算。
- 來源 URL 必須經過 URL 編碼。
- Meta(Facebook)Ads 對事件參數施加額外限制。
适用于你通过此门面发送的每个事件的约束: 它们汇总了底层各提供方的规则。在埋点前请先阅读:
- 事件名称 必须以字母开头,不含空格(使用下划线),且最多 100 个字符。不得以
"、\、=、+或-开头,区分大小写(af_purchase≠af_PURCHASE),并且可以包含非英文字符。 - 每个事件: 最多 25 个参数。
- 参数名称 最多 40 个字符。
- 参数值 不得超过 1000 个字符(过长的值可能被截断)。请将事件的总值保持在 2000 个字符以内。
- 收入 / 价格值 只能使用数字和单个小数点,小数点后最多 5 位。
- 基数(Cardinality): 每天最多 300 个唯一事件名称。
- 唯一用户 仅统计用户安装应用后的前 100 个事件。
- 引荐 URL(Referring URLs) 必须经过 URL 编码。
- Meta(Facebook)广告 对事件参数施加额外限制。
Custom event
Send a custom event
Sends one custom event to the providers you explicitly choose via the platforms list. The event name is sent as-is: its natural name: apart from the optional per-provider prefix you set yourself. To send to the SDK’s default provider set without naming platforms, use miscCustomEvent instead.
將一個自訂事件傳送到你透過 platforms 清單明確選擇的供應商。事件名稱會原樣傳送: 使用其自然名稱: 除了你自行設定的可選每供應商前綴之外。若要在不指定平台的情況下傳送到 SDK 的預設供應商集合,請改用 miscCustomEvent。
向你通过 platforms 列表显式选择的提供方发送一个自定义事件。事件名称按原样(其自然名称)发送,仅带上你自行设置的可选的每提供方前缀。若要发送到 SDK 的默认提供方集合而不指定 platforms,请改用 miscCustomEvent。
VGSDKAnalyticsPlatform *facebook = [[VGSDKAnalyticsPlatform alloc]
initWithProvider:VGSDKAnalyticsProviderFacebook prefix:@""];
[VGSDKAnalytics sendCustomEvent:@"level_up" parameters:@{@"level": @5} platforms:@[facebook]];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
name | String | Event name. |
parameters | [String: Any] | Event parameters. |
platforms | [VGSDKAnalyticsPlatform] | Target providers. Each entry selects a provider + event-name prefix. |
platforms[].provider | VGSDKAnalyticsProvider | Provider to send to: see VGSDKAnalyticsProvider. |
platforms[].prefix | String | Prefix prepended to the event name for that provider. |
| 欄位 | 型別 | 說明 |
|---|---|---|
name | String | 事件名稱。 |
parameters | [String: Any] | 事件參數。 |
platforms | [VGSDKAnalyticsPlatform] | 目標供應商。每個項目會選擇一個供應商+事件名稱前綴。 |
platforms[].provider | VGSDKAnalyticsProvider | 要傳送到的供應商: 請參閱 VGSDKAnalyticsProvider。 |
platforms[].prefix | String | 為該供應商加在事件名稱前的前綴。 |
| 字段 | 类型 | 描述 |
|---|---|---|
name | String | 事件名称。 |
parameters | [String: Any] | 事件参数。 |
platforms | [VGSDKAnalyticsPlatform] | 目标提供方。每个条目选择一个提供方 + 事件名称前缀。 |
platforms[].provider | VGSDKAnalyticsProvider | 要发送到的提供方: 请参阅 VGSDKAnalyticsProvider。 |
platforms[].prefix | String | 为该提供方在事件名称前添加的前缀。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Misc: custom event
Sends a custom event to the SDK’s default provider set: the no-platform-list counterpart of sendCustomEvent (you don’t pick providers). The SDK auto-prefixes the event name per provider, delivering it as vgsdk_{prefix}_{event name}: see Analytics platform prefixes.
將自訂事件傳送到 SDK 的預設供應商集合: 為 sendCustomEvent 不帶平台清單的對應版本(你不需選擇供應商)。SDK 會依各供應商自動為事件名稱加上前綴,以 vgsdk_{prefix}_{event name} 傳遞: 請參閱 分析平台前綴。
向 SDK 的默认提供方集合发送一个自定义事件: 即 sendCustomEvent 的无 platforms 列表版本(你不选择提供方)。SDK 会为每个提供方自动为事件名称添加前缀,以 vgsdk_{prefix}_{event name} 形式发送: 请参阅 分析平台前缀。
[VGSDKAnalytics miscCustomEvent:@"my_event" parameters:@{@"k": @"v"}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
name | String | Event name. |
parameters | [String: Any] | Event parameters. |
| 欄位 | 型別 | 說明 |
|---|---|---|
name | String | 事件名稱。 |
parameters | [String: Any] | 事件參數。 |
| 字段 | 类型 | 描述 |
|---|---|---|
name | String | 事件名称。 |
parameters | [String: Any] | 事件参数。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Conversion Rate
1. App open
Logs an app open.
記錄一次應用程式開啟。
记录一次应用打开。
[VGSDKAnalytics regAppOpen:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
2. Get configuration
Logs the configuration fetch.
記錄設定的取得。
记录配置获取。
[VGSDKAnalytics regGetConfiguration:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
3. Check configuration start
Logs the start of a configuration check.
記錄一次設定檢查的開始。
记录配置检查的开始。
[VGSDKAnalytics regCheckConfigurationStart:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
4. Check configuration end
Logs the end of a configuration check.
記錄一次設定檢查的結束。
记录配置检查的结束。
[VGSDKAnalytics regCheckConfigurationEnd:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
5. CDN download start
Logs the start of a CDN resource download.
記錄一次 CDN 資源下載的開始。
记录 CDN 资源下载的开始。
[VGSDKAnalytics regCDNDownloadStart:@"10MB" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
size | String | Payload / resource size. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
size | String | 負載/資源大小。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
size | String | 负载 / 资源大小。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
6. CDN download 25%
Logs 25% CDN download progress.
記錄 CDN 下載 25% 的進度。
记录 CDN 下载进度 25%。
[VGSDKAnalytics regCDNDownload25:@"10MB" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
size | String | Payload / resource size. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
size | String | 負載/資源大小。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
size | String | 负载 / 资源大小。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
6. CDN download 50%
Logs 50% CDN download progress.
記錄 CDN 下載 50% 的進度。
记录 CDN 下载进度 50%。
[VGSDKAnalytics regCDNDownload50:@"10MB" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
size | String | Payload / resource size. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
size | String | 負載/資源大小。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
size | String | 负载 / 资源大小。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
6. CDN download 75%
Logs 75% CDN download progress.
記錄 CDN 下載 75% 的進度。
记录 CDN 下载进度 75%。
[VGSDKAnalytics regCDNDownload75:@"10MB" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
size | String | Payload / resource size. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
size | String | 負載/資源大小。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
size | String | 负载 / 资源大小。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
7. CDN download finish
Logs CDN download completion.
記錄 CDN 下載完成。
记录 CDN 下载完成。
[VGSDKAnalytics regCDNDownloadFinish:@"10MB" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
size | String | Payload / resource size. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
size | String | 負載/資源大小。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
size | String | 负载 / 资源大小。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
8. Extract resource start
Logs the start of resource extraction.
記錄一次資源解壓的開始。
记录资源解压的开始。
[VGSDKAnalytics regExtractResourceStart:@"10MB" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
size | String | Payload / resource size. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
size | String | 負載/資源大小。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
size | String | 负载 / 资源大小。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
9. Extract resource end
Logs the end of resource extraction.
記錄一次資源解壓的結束。
记录资源解压的结束。
[VGSDKAnalytics regExtractResourceEnd:@"10MB" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
size | String | Payload / resource size. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
size | String | 負載/資源大小。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
size | String | 负载 / 资源大小。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Onboarding
1. Joined server
Logs a new user joining a server.
記錄新使用者加入伺服器。
记录新用户加入服务器。
[VGSDKAnalytics nruJoinedServer:@"server-1" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
serverId | String | Game server id. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
serverId | String | 遊戲伺服器 ID。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
serverId | String | 游戏服务器 id。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
2. Named role
Logs a role being named.
記錄角色被命名。
记录角色被命名。
[VGSDKAnalytics nruNamedRole:@"server-1" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
serverId | String | Game server id. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
serverId | String | 遊戲伺服器 ID。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
serverId | String | 游戏服务器 id。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
3. Create role success
Logs successful role creation.
記錄角色建立成功。
记录角色创建成功。
[VGSDKAnalytics nruCreateRoleSuccess:@"role-1" serverId:@"server-1" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
4. Tutorial start
Logs the tutorial starting.
記錄教學開始。
记录教程开始。
[VGSDKAnalytics nruTutorialStart:@"role-1" serverId:@"server-1" progress:@"0" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
progress | String | Progress marker. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
progress | String | 進度標記。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
progress | String | 进度标记。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
5. Tutorial 25%
Logs 25% tutorial progress.
記錄教學 25% 的進度。
记录教程进度 25%。
[VGSDKAnalytics nruTutorialProgress25:@"role-1" serverId:@"server-1" progress:@"25" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
progress | String | Progress marker. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
progress | String | 進度標記。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
progress | String | 进度标记。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
5. Tutorial 50%
Logs 50% tutorial progress.
記錄教學 50% 的進度。
记录教程进度 50%。
[VGSDKAnalytics nruTutorialProgress50:@"role-1" serverId:@"server-1" progress:@"50" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
progress | String | Progress marker. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
progress | String | 進度標記。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
progress | String | 进度标记。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
5. Tutorial 75%
Logs 75% tutorial progress.
記錄教學 75% 的進度。
记录教程进度 75%。
[VGSDKAnalytics nruTutorialProgress75:@"role-1" serverId:@"server-1" progress:@"75" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
progress | String | Progress marker. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
progress | String | 進度標記。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
progress | String | 进度标记。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
6. Tutorial finish
Logs tutorial completion.
記錄教學完成。
记录教程完成。
[VGSDKAnalytics nruTutorialProgressFinish:@"role-1" serverId:@"server-1" progress:@"100" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
progress | String | Progress marker. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
progress | String | 進度標記。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
progress | String | 进度标记。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
7. Open shop
Logs the shop being opened.
記錄商店被開啟。
记录商店被打开。
[VGSDKAnalytics iapOpenShop:@"role-1" serverId:@"server-1" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
7. Click to buy
Logs the intent to buy an item.
記錄購買道具的意圖。
记录购买物品的意向。
[VGSDKAnalytics iapClickToBuyItem:@"role-1" serverId:@"server-1" itemId:@"item-1" itemName:@"Gold" itemPrice:@"22000" itemCurrency:@"VND" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
itemId | String | Item id. |
itemName | String | Item name. |
itemPrice | String | Item price. |
itemCurrency | String | Currency code. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
itemId | String | 道具 ID。 |
itemName | String | 道具名稱。 |
itemPrice | String | 道具價格。 |
itemCurrency | String | 貨幣代碼。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
itemId | String | 物品 id。 |
itemName | String | 物品名称。 |
itemPrice | String | 物品价格。 |
itemCurrency | String | 货币代码。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
7. Purchased item
Logs a completed purchase.
記錄一次完成的購買。
记录一次完成的购买。
[VGSDKAnalytics iapPurchasedItem:@"role-1" serverId:@"server-1" itemId:@"item-1"
itemName:@"Gold Pack" itemPrice:@"22000" itemCurrency:@"VND" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
itemId | String | Item id. |
itemName | String | Item name. |
itemPrice | String | Item price. |
itemCurrency | String | Currency code. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
itemId | String | 道具 ID。 |
itemName | String | 道具名稱。 |
itemPrice | String | 道具價格。 |
itemCurrency | String | 貨幣代碼。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
itemId | String | 物品 id。 |
itemName | String | 物品名称。 |
itemPrice | String | 物品价格。 |
itemCurrency | String | 货币代码。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
7. VIP level up
Logs a VIP tier increase.
記錄 VIP 等級提升。
记录 VIP 等级提升。
[VGSDKAnalytics iapVipLevelUp:@"role-1" serverId:@"server-1" currentVipLevel:@"3" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
currentVipLevel | String | New VIP level. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
currentVipLevel | String | 新的 VIP 等級。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
currentVipLevel | String | 新的 VIP 等级。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
7. Buy VIP reward level
Logs the purchase of a VIP reward level.
記錄購買 VIP 獎勵等級。
记录购买 VIP 奖励等级。
[VGSDKAnalytics iapBuyVipRewardLevel:@"role-1" serverId:@"server-1" itemId:@"item-1" itemName:@"VIP Pack" itemVipLevel:@"3" itemPrice:@"22000" itemCurrency:@"VND" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
itemId | String | Item id. |
itemName | String | Item name. |
itemVipLevel | String | VIP level of the item. |
itemPrice | String | Item price. |
itemCurrency | String | Currency code. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
itemId | String | 道具 ID。 |
itemName | String | 道具名稱。 |
itemVipLevel | String | 道具的 VIP 等級。 |
itemPrice | String | 道具價格。 |
itemCurrency | String | 貨幣代碼。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
itemId | String | 物品 id。 |
itemName | String | 物品名称。 |
itemVipLevel | String | 物品的 VIP 等级。 |
itemPrice | String | 物品价格。 |
itemCurrency | String | 货币代码。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
7. Level up
Logs a character level-up.
記錄角色升級。
记录角色升级。
[VGSDKAnalytics mdaLevelUp:@"role-1" serverId:@"server-1" currentLevel:@"42" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
currentLevel | String | New level. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
currentLevel | String | 新的等級。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
currentLevel | String | 新的等级。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
7. Agree to terms
Logs acceptance of all terms.
記錄同意所有條款。
记录接受所有条款。
[VGSDKAnalytics nruAgreeAllTerm:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Main & Daily Activities
Main quest
Logs main-quest progress.
記錄主線任務的進度。
记录主线任务进度。
[VGSDKAnalytics mdaMainQuest:@"role-1" serverId:@"server-1" mainQuestId:@"q1" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
mainQuestId | String | Main-quest id. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
mainQuestId | String | 主線任務 ID。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
mainQuestId | String | 主线任务 id。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Daily quest
Logs daily-quest progress.
記錄每日任務的進度。
记录每日任务进度。
[VGSDKAnalytics mdaDailyQuest:@"role-1" serverId:@"server-1" dailyQuestId:@"d1" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
dailyQuestId | String | Daily-quest id. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
dailyQuestId | String | 每日任務 ID。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
dailyQuestId | String | 每日任务 id。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Grant daily reward
Logs a daily reward grant.
記錄一次每日獎勵的發放。
记录发放一次每日奖励。
[VGSDKAnalytics mdaGrantDailyReward:@"role-1" serverId:@"server-1" dailyRewardId:@"r1" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
dailyRewardId | String | Daily-reward id. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
dailyRewardId | String | 每日獎勵 ID。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
dailyRewardId | String | 每日奖励 id。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Buy item
Logs an in-game (soft-currency) item purchase.
記錄一次遊戲內(軟性貨幣)道具購買。
记录一次游戏内(软通货)物品购买。
[VGSDKAnalytics mdaBuyItem:@"role-1" serverId:@"server-1" itemId:@"item-1" itemName:@"Potion" itemPrice:@"100" itemCurrency:@"gold" itemQuantity:@"5" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
itemId | String | Item id. |
itemName | String | Item name. |
itemPrice | String | Item price. |
itemCurrency | String | Currency code. |
itemQuantity | String | Item quantity. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
itemId | String | 道具 ID。 |
itemName | String | 道具名稱。 |
itemPrice | String | 道具價格。 |
itemCurrency | String | 貨幣代碼。 |
itemQuantity | String | 道具數量。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
itemId | String | 物品 id。 |
itemName | String | 物品名称。 |
itemPrice | String | 物品价格。 |
itemCurrency | String | 货币代码。 |
itemQuantity | String | 物品数量。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Spend item
Logs spending/consuming an item.
記錄花費/消耗道具。
记录消耗 / 使用一个物品。
[VGSDKAnalytics mdaSpendItem:@"role-1" serverId:@"server-1" itemId:@"item-1" itemName:@"Potion" itemPrice:@"100" itemCurrency:@"gold" itemQuantity:@"5" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
itemId | String | Item id. |
itemName | String | Item name. |
itemPrice | String | Item price. |
itemCurrency | String | Currency code. |
itemQuantity | String | Item quantity. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
itemId | String | 道具 ID。 |
itemName | String | 道具名稱。 |
itemPrice | String | 道具價格。 |
itemCurrency | String | 貨幣代碼。 |
itemQuantity | String | 道具數量。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
itemId | String | 物品 id。 |
itemName | String | 物品名称。 |
itemPrice | String | 物品价格。 |
itemCurrency | String | 货币代码。 |
itemQuantity | String | 物品数量。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Gacha
Logs a gacha pull.
記錄一次轉蛋抽取。
记录一次抽卡。
[VGSDKAnalytics mdaGacha:@"role-1" serverId:@"server-1" gachaType:@"banner-a" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
gachaType | String | Gacha type/banner. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
gachaType | String | 轉蛋類型/卡池。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
gachaType | String | 抽卡类型 / 卡池。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Social & Communities
Create guild
Logs a guild-creation event.
記錄一次公會建立事件。
记录一次公会创建事件。
[VGSDKAnalytics scCreateGuild:@"role-1" serverId:@"server-1" guildId:@"g1" guildName:@"Guild" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
guildId | String | Guild id. |
guildName | String | Guild name. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
guildId | String | 公會 ID。 |
guildName | String | 公會名稱。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
guildId | String | 公会 id。 |
guildName | String | 公会名称。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Join guild
Logs a guild-join event.
記錄一次加入公會事件。
记录一次加入公会事件。
[VGSDKAnalytics scJoinGuild:@"role-1" serverId:@"server-1" guildId:@"g1" guildName:@"Guild" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
guildId | String | Guild id. |
guildName | String | Guild name. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
guildId | String | 公會 ID。 |
guildName | String | 公會名稱。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
guildId | String | 公会 id。 |
guildName | String | 公会名称。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Quit guild
Logs a guild-quit event.
記錄一次退出公會事件。
记录一次退出公会事件。
[VGSDKAnalytics scQuitGuild:@"role-1" serverId:@"server-1" guildId:@"g1" guildName:@"Guild" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
guildId | String | Guild id. |
guildName | String | Guild name. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
guildId | String | 公會 ID。 |
guildName | String | 公會名稱。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
guildId | String | 公会 id。 |
guildName | String | 公会名称。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Add friend
Logs adding a friend on a platform.
記錄在平台上新增一位好友。
记录在某平台上添加好友。
[VGSDKAnalytics scAddFriendToList:@"role-1" serverId:@"server-1" platform:@"facebook" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
platform | String | Social platform name. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
platform | String | 社群平台名稱。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
platform | String | 社交平台名称。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Remove friend
Logs removing a friend on a platform.
記錄在平台上移除一位好友。
记录在某平台上移除好友。
[VGSDKAnalytics scRemoveFriendFromList:@"role-1" serverId:@"server-1" platform:@"facebook" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
platform | String | Social platform name. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
platform | String | 社群平台名稱。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
platform | String | 社交平台名称。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Share to Facebook
Logs a share-to-Facebook event.
記錄一次分享到 Facebook 的事件。
记录一次分享到 Facebook 的事件。
[VGSDKAnalytics scShareToFacebook:@"role-1" serverId:@"server-1" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Invite Facebook friend
Logs a Facebook friend-invite event.
記錄一次 Facebook 好友邀請事件。
记录一次 Facebook 好友邀请事件。
[VGSDKAnalytics scInviteFacebookFriend:@"role-1" serverId:@"server-1" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Share to Instagram
Logs a share-to-Instagram event.
記錄一次分享到 Instagram 的事件。
记录一次分享到 Instagram 的事件。
[VGSDKAnalytics scShareToInstagram:@"role-1" serverId:@"server-1" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Other
Splash screen
Logs the splash screen being shown.
記錄啟動畫面被顯示。
记录启动画面的展示。
[VGSDKAnalytics regSplashScreen:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Purchase canceled
Logs a canceled purchase.
記錄一次已取消的購買。
记录一次已取消的购买。
[VGSDKAnalytics iapPurchasedCanceledItem:@"role-1" serverId:@"server-1" itemId:@"item-1" itemName:@"Gold" itemPrice:@"22000" itemCurrency:@"VND" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
itemId | String | Item id. |
itemName | String | Item name. |
itemPrice | String | Item price. |
itemCurrency | String | Currency code. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
itemId | String | 道具 ID。 |
itemName | String | 道具名稱。 |
itemPrice | String | 道具價格。 |
itemCurrency | String | 貨幣代碼。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
itemId | String | 物品 id。 |
itemName | String | 物品名称。 |
itemPrice | String | 物品价格。 |
itemCurrency | String | 货币代码。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Switch account
Logs an account switch.
記錄一次帳號切換。
记录一次账号切换。
[VGSDKAnalytics miscSwitchAccount:@"role-1" serverId:@"server-1" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Customer support
Logs a customer-support entry.
記錄一次進入客戶支援。
记录一次进入客户支持。
[VGSDKAnalytics miscCustomerSupport:@"role-1" serverId:@"server-1" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
roleId | String | Character/role id. |
serverId | String | Game server id. |
extraData | [String: Any] | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
roleId | String | 角色 ID。 |
serverId | String | 遊戲伺服器 ID。 |
extraData | [String: Any] | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
roleId | String | 角色 id。 |
serverId | String | 游戏服务器 id。 |
extraData | [String: Any] | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Ad revenue
Reports ad revenue through the unified analytics facade.
透過統一分析介面回報廣告收益。
通过统一分析接口上报广告收入。
[VGSDKAnalytics miscAdRevenue:@"AdMob"
mediationNetwork:VGSDKAdRevenueMediationNetworkGoogleAdMob
revenue:22000 currencyCode:@"VND" extraData:@{}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
monetizationNetwork | String | Monetization network name. |
mediationNetwork | VGSDKAdRevenueMediationNetwork | Mediation network: see Ad revenue mediation network. |
revenue | Double | Revenue amount. |
currencyCode | String | Currency code. |
extraData | [String: Any]? | Additional custom key/values attached to the event. |
| 欄位 | 型別 | 說明 |
|---|---|---|
monetizationNetwork | String | 營利聯播網名稱。 |
mediationNetwork | VGSDKAdRevenueMediationNetwork | 中介聯播網: 請參閱 廣告收益中介聯播網。 |
revenue | Double | 收益金額。 |
currencyCode | String | 貨幣代碼。 |
extraData | [String: Any]? | 附加到事件的額外自訂鍵/值。 |
| 字段 | 类型 | 描述 |
|---|---|---|
monetizationNetwork | String | 变现网络名称。 |
mediationNetwork | VGSDKAdRevenueMediationNetwork | 聚合网络: 请参阅 广告收入聚合网络。 |
revenue | Double | 收入金额。 |
currencyCode | String | 货币代码。 |
extraData | [String: Any]? | 附加到该事件的额外自定义键值对。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Customer Support
Open the in-app support center, signed in and pre-filled with the player’s context. Results arrive on the listener’s closures.
開啟應用程式內的支援中心,已登入並預先填入玩家的情境資料。結果會透過監聽器的閉包傳回。
打开应用内客户支持中心,已登录并预填了玩家的上下文。结果在监听器的闭包上返回。
Open support center
Presents the support center for the player.
為玩家顯示支援中心。
为玩家展示客户支持中心。
VGSDKSupportInfo *info = [[VGSDKSupportInfo alloc]
initWithUserId:@"user-1" serverId:@"server-1" level:@"10" roleName:@"role"
loginChannel:@"vga" guild:@"guild" content:@"Need help"];
VGSDKSupportCenterListener *listener = [[VGSDKSupportCenterListener alloc] init];
listener.onAction = ^(NSDictionary *data) { };
listener.onClosed = ^{ };
listener.onError = ^(VGSDKError *error) { };
[VGSDKSupport openSupportCenterWithInfo:info listener:listener];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
info | VGSDKSupportInfo | Player context: full model: VGSDKSupportInfo. |
| 欄位 | 型別 | 說明 |
|---|---|---|
info | VGSDKSupportInfo | 玩家情境: 完整模型:VGSDKSupportInfo。 |
| 字段 | 类型 | 描述 |
|---|---|---|
info | VGSDKSupportInfo | 玩家上下文: 完整模型:VGSDKSupportInfo。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
onAction | ([String: Any]) -> Void | An in-portal action the player triggered, with its payload. |
onClosed | () -> Void | The support center was dismissed. |
onError | (VGSDKError) -> Void | An error occurred: see General error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
onAction | ([String: Any]) -> Void | 玩家在支援中心內觸發的操作,附帶其負載。 |
onClosed | () -> Void | 支援中心已關閉。 |
onError | (VGSDKError) -> Void | 發生錯誤: 請參閱 一般錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
onAction | ([String: Any]) -> Void | 玩家在门户内触发的操作及其负载。 |
onClosed | () -> Void | 客户支持中心已关闭。 |
onError | (VGSDKError) -> Void | 发生了错误: 请参阅 通用错误码。 |
In-App Ads
Monetize with ironSource-mediated rewarded video, or Meta Audience Network interstitial / rewarded formats. Ad events arrive on the listener objects you pass in: there is no status enum.
透過 ironSource 中介的獎勵影片,或 Meta Audience Network 的插頁式/獎勵式格式進行營利。廣告事件會透過你傳入的監聽器物件傳回: 沒有狀態列舉。
通过 ironSource 聚合的激励视频,或 Meta Audience Network 的插屏 / 激励格式进行变现。广告事件在你传入的监听器对象上返回: 没有状态枚举。
ironSource
Initialize ironSource
Initializes ironSource with an init listener and a rewarded-video listener.
以初始化監聽器與獎勵影片監聽器初始化 ironSource。
使用一个初始化监听器和一个激励视频监听器来初始化 ironSource。
PassIronSourceListener *initListener = [[PassIronSourceListener alloc] init];
initListener.onCompleted = ^{ };
initListener.onFailed = ^(NSError *error) { };
PassIronSourceLevelPlayRewardedVideoListener *rvListener = [[PassIronSourceLevelPlayRewardedVideoListener alloc] init];
rvListener.didReceiveReward = ^(ISPlacementInfo *placement, ISAdInfo *adInfo) { /* grant reward */ };
[VGSDKIronSource initIronSourceWithUserID:@"user-1" listener:initListener rewardedVideoListener:rvListener];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
userID | String? | Player id for the reward callback. |
initListener | PassIronSourceListener | Initialization listener: reports init success/failure. |
rewardedVideoListener | PassIronSourceLevelPlayRewardedVideoListener | Rewarded-video ad-event listener (see Show rewarded video). Ad/reward events for later shows arrive here. |
| 欄位 | 型別 | 說明 |
|---|---|---|
userID | String? | 用於獎勵回呼的玩家 ID。 |
initListener | PassIronSourceListener | 初始化監聽器: 回報初始化成功/失敗。 |
rewardedVideoListener | PassIronSourceLevelPlayRewardedVideoListener | 獎勵影片廣告事件監聽器(請參閱「顯示獎勵影片」)。後續顯示的廣告/獎勵事件會送達這裡。 |
| 字段 | 类型 | 描述 |
|---|---|---|
userID | String? | 用于奖励回调的玩家 id。 |
initListener | PassIronSourceListener | 初始化监听器: 报告初始化成功/失败。 |
rewardedVideoListener | PassIronSourceLevelPlayRewardedVideoListener | 激励视频广告事件监听器(见“展示激励视频”)。后续展示的广告/奖励事件会送达这里。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
initListener.onCompleted | (() -> Void)? | Initialization finished: ironSource is ready. |
initListener.onFailed | ((NSError) -> Void)? | Initialization failed: see In-app ads error codes. |
didReceiveReward | ((ISPlacementInfo, ISAdInfo) -> Void)? | Reward earned: grant it here. |
hasAvailableAd | ((ISAdInfo) -> Void)? | An ad is available. |
hasNoAvailableAd | (() -> Void)? | No ad available. |
didOpen | ((ISAdInfo) -> Void)? | Ad opened. |
didClick | ((ISPlacementInfo, ISAdInfo) -> Void)? | Ad clicked. |
didClose | ((ISAdInfo) -> Void)? | Ad closed. |
didFailToShowWithError | ((Error, ISAdInfo) -> Void)? | Ad failed to show: carries the underlying ironSource error (its native code, not a VGSDK code). |
onFailed | ((NSError) -> Void)? | A pre-show check failed (placement not matched / capped, or no view controller to present): see In-app ads error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
initListener.onCompleted | (() -> Void)? | 初始化完成: ironSource 已就緒。 |
initListener.onFailed | ((NSError) -> Void)? | 初始化失敗: 請參閱 應用程式內廣告錯誤碼。 |
didReceiveReward | ((ISPlacementInfo, ISAdInfo) -> Void)? | 獲得的獎勵: 在此發放。 |
hasAvailableAd | ((ISAdInfo) -> Void)? | 有可用的廣告。 |
hasNoAvailableAd | (() -> Void)? | 沒有可用的廣告。 |
didOpen | ((ISAdInfo) -> Void)? | 廣告已開啟。 |
didClick | ((ISPlacementInfo, ISAdInfo) -> Void)? | 廣告被點擊。 |
didClose | ((ISAdInfo) -> Void)? | 廣告已關閉。 |
didFailToShowWithError | ((Error, ISAdInfo) -> Void)? | 廣告顯示失敗: 帶有底層的 ironSource 錯誤(其原生代碼,非 VGSDK 代碼)。 |
onFailed | ((NSError) -> Void)? | 顯示前檢查失敗(版位不符/已達上限,或沒有可用於呈現的控制器): 請參閱 應用程式內廣告錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
initListener.onCompleted | (() -> Void)? | 初始化完成: ironSource 已就绪。 |
initListener.onFailed | ((NSError) -> Void)? | 初始化失败: 请参阅 应用内广告错误码。 |
didReceiveReward | ((ISPlacementInfo, ISAdInfo) -> Void)? | 获得的奖励: 在此发放。 |
hasAvailableAd | ((ISAdInfo) -> Void)? | 有可用的广告。 |
hasNoAvailableAd | (() -> Void)? | 没有可用的广告。 |
didOpen | ((ISAdInfo) -> Void)? | 广告已打开。 |
didClick | ((ISPlacementInfo, ISAdInfo) -> Void)? | 广告被点击。 |
didClose | ((ISAdInfo) -> Void)? | 广告已关闭。 |
didFailToShowWithError | ((Error, ISAdInfo) -> Void)? | 广告展示失败: 携带底层的 ironSource 错误(其原生代码,非 VGSDK 代码)。 |
onFailed | ((NSError) -> Void)? | 展示前检查失败(广告位不匹配/已达上限,或没有可用于呈现的控制器): 请参阅 应用内广告错误码。 |
Show rewarded video
Shows a rewarded video for a placement. Ad events arrive on the rewarded-video listener.
為某個版位顯示獎勵影片。廣告事件會透過獎勵影片監聽器傳回。
为某个广告位展示激励视频。广告事件在激励视频监听器上返回。
PassIronSourceRewardedVideo *video = [[PassIronSourceRewardedVideo alloc]
initWithPlacementName:@"Main" trackReachability:YES];
[VGSDKIronSource showRewardedVideo:video];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
video | PassIronSourceRewardedVideo | Built with a placement name and a network-state flag. |
video.placementName | String | Placement to show. |
video.trackReachability | Bool | Whether to track network state. |
| 欄位 | 型別 | 說明 |
|---|---|---|
video | PassIronSourceRewardedVideo | 以版位名稱與網路狀態旗標建構。 |
video.placementName | String | 要顯示的版位。 |
video.trackReachability | Bool | 是否追蹤網路狀態。 |
| 字段 | 类型 | 描述 |
|---|---|---|
video | PassIronSourceRewardedVideo | 以广告位名称与网络状态标志构建。 |
video.placementName | String | 要展示的广告位。 |
video.trackReachability | Bool | 是否跟踪网络状态。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Set dynamic user id
Updates the ironSource dynamic user id used for server-to-server reward callbacks.
更新用於伺服器對伺服器獎勵回呼的 ironSource 動態使用者 ID。
更新用于服务端到服务端奖励回调的 ironSource 动态用户 id。
[VGSDKIronSource setDynamicUserID:@"user-1"];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
userID | String | Dynamic user id for verifying rewarded-ad transactions: set before showing the ad, returned in the server-to-server reward callback (1 to 64 alphanumeric characters). |
| 欄位 | 型別 | 說明 |
|---|---|---|
userID | String | 用於驗證獎勵廣告交易的動態使用者 ID: 需在顯示廣告前設定。會在伺服器對伺服器獎勵回呼中回傳(1 至 64 個英數字元)。 |
| 字段 | 类型 | 描述 |
|---|---|---|
userID | String | 用于验证激励广告交易的动态用户 id: 需在展示广告前设置。会在服务端到服务端奖励回调中返回(1 至 64 个字母数字字符)。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Meta Audience Network
Show interstitial
Shows a Meta Audience Network interstitial.
顯示 Meta Audience Network 插頁式廣告。
展示一个 Meta Audience Network 插屏广告。
VGSDKMetaAdsInterstitialListener *listener = [[VGSDKMetaAdsInterstitialListener alloc] init];
[VGSDKMetaAds showInterstitial:@"placement-id" listener:listener];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
placementId | String | Meta placement id. |
listener | VGSDKMetaAdsInterstitialListener | Ad-event listener. |
| 欄位 | 型別 | 說明 |
|---|---|---|
placementId | String | Meta 版位 ID。 |
listener | VGSDKMetaAdsInterstitialListener | 廣告事件監聽器。 |
| 字段 | 类型 | 描述 |
|---|---|---|
placementId | String | Meta 广告位 id。 |
listener | VGSDKMetaAdsInterstitialListener | 广告事件监听器。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
didFailToLoad | ((FBInterstitialAd, Error) -> Void)? | Load failed: VGSDK metaAdInvalid (9048, invalid ad or no view controller: see In-app ads error codes) on the SDK’s post-load check, otherwise the raw native Meta error. |
didClick | ((FBInterstitialAd) -> Void)? | Ad clicked. |
willClose | ((FBInterstitialAd) -> Void)? | About to close. |
didClose | ((FBInterstitialAd) -> Void)? | Ad closed. |
willLogImpression | ((FBInterstitialAd) -> Void)? | Impression logged. |
| 欄位 | 型別 | 說明 |
|---|---|---|
didFailToLoad | ((FBInterstitialAd, Error) -> Void)? | 載入失敗: SDK 載入後檢查失敗時為 VGSDK metaAdInvalid(9048。廣告無效或無可呈現的控制器: 請參閱 應用程式內廣告錯誤碼),否則為原生 Meta 錯誤。 |
didClick | ((FBInterstitialAd) -> Void)? | 廣告被點擊。 |
willClose | ((FBInterstitialAd) -> Void)? | 即將關閉。 |
didClose | ((FBInterstitialAd) -> Void)? | 廣告已關閉。 |
willLogImpression | ((FBInterstitialAd) -> Void)? | 已記錄曝光。 |
| 字段 | 类型 | 描述 |
|---|---|---|
didFailToLoad | ((FBInterstitialAd, Error) -> Void)? | 加载失败: SDK 加载后检查失败时为 VGSDK metaAdInvalid(9048。广告无效或无可呈现的控制器: 请参阅 应用内广告错误码),否则为原生 Meta 错误。 |
didClick | ((FBInterstitialAd) -> Void)? | 广告被点击。 |
willClose | ((FBInterstitialAd) -> Void)? | 即将关闭。 |
didClose | ((FBInterstitialAd) -> Void)? | 广告已关闭。 |
willLogImpression | ((FBInterstitialAd) -> Void)? | 已记录曝光。 |
Show rewarded video
Shows a Meta rewarded video. A complete closure fires when the reward is earned.
顯示 Meta 獎勵影片。當獲得獎勵時會觸發 complete 閉包。
展示一个 Meta 激励视频。获得奖励时触发 complete 闭包。
VGSDKMetaAdsRewardedVideoListener *listener = [[VGSDKMetaAdsRewardedVideoListener alloc] init];
listener.complete = ^(FBRewardedVideoAd *ad) { /* grant reward */ };
[VGSDKMetaAds showRewardedVideo:@"placement-id" userId:@"user-1" currency:@"gold" listener:listener];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
placementId | String | Meta placement id. |
userId | String | Player id for the reward callback. |
currency | String | Reward currency name. |
listener | VGSDKMetaAdsRewardedVideoListener | Ad-event listener. |
| 欄位 | 型別 | 說明 |
|---|---|---|
placementId | String | Meta 版位 ID。 |
userId | String | 用於獎勵回呼的玩家 ID。 |
currency | String | 獎勵貨幣名稱。 |
listener | VGSDKMetaAdsRewardedVideoListener | 廣告事件監聽器。 |
| 字段 | 类型 | 描述 |
|---|---|---|
placementId | String | Meta 广告位 id。 |
userId | String | 用于奖励回调的玩家 id。 |
currency | String | 奖励货币名称。 |
listener | VGSDKMetaAdsRewardedVideoListener | 广告事件监听器。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
complete | ((FBRewardedVideoAd) -> Void)? | Reward earned: grant it here. |
didFailToLoad | ((FBRewardedVideoAd, Error) -> Void)? | Load failed: VGSDK metaAdInvalid (9048, invalid ad or no view controller: see In-app ads error codes) on the SDK’s post-load check, otherwise the raw native Meta error. |
didClose | ((FBRewardedVideoAd) -> Void)? | Ad closed. |
didClick | ((FBRewardedVideoAd) -> Void)? | Ad clicked. |
| 欄位 | 型別 | 說明 |
|---|---|---|
complete | ((FBRewardedVideoAd) -> Void)? | 獲得的獎勵: 在此發放。 |
didFailToLoad | ((FBRewardedVideoAd, Error) -> Void)? | 載入失敗: SDK 載入後檢查失敗時為 VGSDK metaAdInvalid(9048。廣告無效或無可呈現的控制器: 請參閱 應用程式內廣告錯誤碼),否則為原生 Meta 錯誤。 |
didClose | ((FBRewardedVideoAd) -> Void)? | 廣告已關閉。 |
didClick | ((FBRewardedVideoAd) -> Void)? | 廣告被點擊。 |
| 字段 | 类型 | 描述 |
|---|---|---|
complete | ((FBRewardedVideoAd) -> Void)? | 获得的奖励: 在此发放。 |
didFailToLoad | ((FBRewardedVideoAd, Error) -> Void)? | 加载失败: SDK 加载后检查失败时为 VGSDK metaAdInvalid(9048。广告无效或无可呈现的控制器: 请参阅 应用内广告错误码),否则为原生 Meta 错误。 |
didClose | ((FBRewardedVideoAd) -> Void)? | 广告已关闭。 |
didClick | ((FBRewardedVideoAd) -> Void)? | 广告被点击。 |
Show rewarded interstitial
Shows a Meta rewarded-interstitial (skippable rewarded format), with the same closure set as rewarded video.
顯示 Meta 獎勵式插頁廣告(可略過的獎勵格式),使用與獎勵影片相同的閉包集合。
展示一个 Meta 激励插屏广告(可跳过的激励格式),闭包集合与激励视频相同。
VGSDKMetaAdsRewardedInterstitialListener *listener = [[VGSDKMetaAdsRewardedInterstitialListener alloc] init];
listener.complete = ^(FBRewardedInterstitialAd *ad) { /* grant reward */ };
[VGSDKMetaAds showRewardedInterstitial:@"placement-id" userId:@"user-1" currency:@"gold" listener:listener];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
placementId | String | Meta placement id. |
userId | String | Player id for the reward callback. |
currency | String | Reward currency name. |
listener | VGSDKMetaAdsRewardedInterstitialListener | Ad-event listener. |
| 欄位 | 型別 | 說明 |
|---|---|---|
placementId | String | Meta 版位 ID。 |
userId | String | 用於獎勵回呼的玩家 ID。 |
currency | String | 獎勵貨幣名稱。 |
listener | VGSDKMetaAdsRewardedInterstitialListener | 廣告事件監聽器。 |
| 字段 | 类型 | 描述 |
|---|---|---|
placementId | String | Meta 广告位 id。 |
userId | String | 用于奖励回调的玩家 id。 |
currency | String | 奖励货币名称。 |
listener | VGSDKMetaAdsRewardedInterstitialListener | 广告事件监听器。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
complete | ((FBRewardedInterstitialAd) -> Void)? | Reward earned: grant it here. |
didClose | ((FBRewardedInterstitialAd) -> Void)? | Ad closed. |
didFailToLoad | ((FBRewardedInterstitialAd, Error) -> Void)? | Load failed: VGSDK metaAdInvalid (9048, invalid ad or no view controller: see In-app ads error codes) on the SDK’s post-load check, otherwise the raw native Meta error. |
| 欄位 | 型別 | 說明 |
|---|---|---|
complete | ((FBRewardedInterstitialAd) -> Void)? | 獲得的獎勵: 在此發放。 |
didClose | ((FBRewardedInterstitialAd) -> Void)? | 廣告已關閉。 |
didFailToLoad | ((FBRewardedInterstitialAd, Error) -> Void)? | 載入失敗: SDK 載入後檢查失敗時為 VGSDK metaAdInvalid(9048。廣告無效或無可呈現的控制器: 請參閱 應用程式內廣告錯誤碼),否則為原生 Meta 錯誤。 |
| 字段 | 类型 | 描述 |
|---|---|---|
complete | ((FBRewardedInterstitialAd) -> Void)? | 获得的奖励: 在此发放。 |
didClose | ((FBRewardedInterstitialAd) -> Void)? | 广告已关闭。 |
didFailToLoad | ((FBRewardedInterstitialAd, Error) -> Void)? | 加载失败: SDK 加载后检查失败时为 VGSDK metaAdInvalid(9048。广告无效或无可呈现的控制器: 请参阅 应用内广告错误码),否则为原生 Meta 错误。 |
Engage
Re-engagement, grouped by provider. CleverTap covers in-app messaging and the app inbox. Apollo messaging/inbox is backend-driven, so the client’s only touchpoint is the game context it targets on. Firebase Remote Config and the in-app WebView round it out. Firebase Cloud Messaging, local push, Apollo (push / in-app / inbox), and Firebase in-app messages are delivered server-side and expose no client call.
再行銷,依供應商分組。CleverTap 涵蓋應用程式內訊息與應用程式收件匣。Apollo 的訊息/收件匣由後端驅動,因此用戶端唯一的接觸點是它所鎖定的遊戲情境。Firebase Remote Config 與應用程式內 WebView 補足其餘部分。Firebase Cloud Messaging、本機推播、Apollo(推播/應用程式內/收件匣)以及 Firebase 應用程式內訊息皆由伺服器端傳遞,不提供任何用戶端呼叫。
按提供方分组的再互动能力。CleverTap 负责应用内消息和应用收件箱。Apollo 的消息 / 收件箱由后端驱动,因此客户端唯一的接触点是它所定位的游戏上下文。此外还有 Firebase Remote Config 和应用内 WebView。Firebase Cloud Messaging、本地推送、Apollo(推送 / 应用内 / 收件箱)以及 Firebase 应用内消息均由服务端下发,不暴露客户端调用。
CleverTap
Set CleverTap listener
Registers a CleverTap listener for in-app message button taps.
註冊 CleverTap 監聽器以接收應用程式內訊息按鈕的點擊。
注册一个用于监听应用内消息按钮点击的 CleverTap 监听器。
PassCleverTapListener *listener = [[PassCleverTapListener alloc] init];
listener.inAppNotificationButtonTapped = ^(NSDictionary *payload) { };
[VGSDKCleverTap setListener:listener];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
listener | PassCleverTapListener? | Listener for in-app-message button taps. |
| 欄位 | 型別 | 說明 |
|---|---|---|
listener | PassCleverTapListener? | 用於接收應用程式內訊息按鈕點擊的監聽器。 |
| 字段 | 类型 | 描述 |
|---|---|---|
listener | PassCleverTapListener? | 用于接收应用内消息按钮点击的监听器。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
inAppNotificationButtonTapped | ([AnyHashable: Any]) | Payload of the tapped in-app message button. |
| 欄位 | 型別 | 說明 |
|---|---|---|
inAppNotificationButtonTapped | ([AnyHashable: Any]) | 被點擊的應用程式內訊息按鈕的負載。 |
| 字段 | 类型 | 描述 |
|---|---|---|
inAppNotificationButtonTapped | ([AnyHashable: Any]) | 被点击的应用内消息按钮的负载。 |
Open the app inbox
Opens the CleverTap-backed inbox.
開啟以 CleverTap 為後端的收件匣。
打开由 CleverTap 支持的收件箱。
VGSDKAppInboxCleverTapProvider *provider = [[VGSDKAppInboxCleverTapProvider alloc] initWithStyle:nil];
VGSDKAppInboxListener *listener = [[VGSDKAppInboxListener alloc] init];
listener.onItemClicked = ^(CleverTapInboxMessage *message, CleverTapInboxMessageContent *content, NSDictionary *cta) { };
[VGSDKAppInbox openWithProvider:provider listener:listener];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
provider | VGSDKAppInboxProvider | The CleverTap app-inbox provider. |
provider.style | VGSDKAppInboxCleverTapStyle? | Theming (title, tabs, colors). Uses defaults when not customized. |
listener | VGSDKAppInboxListener | Inbox listener. |
| 欄位 | 型別 | 說明 |
|---|---|---|
provider | VGSDKAppInboxProvider | CleverTap 應用程式收件匣供應商。 |
provider.style | VGSDKAppInboxCleverTapStyle? | 主題設定(標題、分頁、色彩)。未自訂時使用預設值。 |
listener | VGSDKAppInboxListener | 收件匣監聽器。 |
| 字段 | 类型 | 描述 |
|---|---|---|
provider | VGSDKAppInboxProvider | CleverTap 应用收件箱提供方。 |
provider.style | VGSDKAppInboxCleverTapStyle? | 主题设置(标题、标签、颜色)。未自定义时使用默认值。 |
listener | VGSDKAppInboxListener | 收件箱监听器。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
onItemClicked | ((CleverTapInboxMessage, CleverTapInboxMessageContent?, [AnyHashable: Any]?) -> Void)? | The tapped message, its content, and any CTA button payload. |
| 欄位 | 型別 | 說明 |
|---|---|---|
onItemClicked | ((CleverTapInboxMessage, CleverTapInboxMessageContent?, [AnyHashable: Any]?) -> Void)? | 被點擊的訊息、其內容,以及任何 CTA 負載。 |
| 字段 | 类型 | 描述 |
|---|---|---|
onItemClicked | ((CleverTapInboxMessage, CleverTapInboxMessageContent?, [AnyHashable: Any]?) -> Void)? | 被点击的消息、其内容以及任何 CTA 负载。 |
Apollo
Set the game context
Registers the active role/server. Apollo messaging and inbox target on this context, and analytics and support also read it. Both ids must be non-empty or the call is ignored.
註冊使用中的角色/伺服器。Apollo 的訊息與收件匣會以此情境為鎖定目標。分析與支援也會讀取它。兩個 ID 都必須為非空,否則此呼叫會被忽略。
注册当前的角色 / 服务器。Apollo 的消息和收件箱基于此上下文定位。分析与客户支持也会读取它。两个 id 都必须非空,否则该调用被忽略。
VGSDKGameContext *context = [[VGSDKGameContext alloc] initWithRoleId:@"role-1" serverId:@"server-1"];
[VGSDK setGameContextWithContext:context];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
context | VGSDKGameContext | Wrapper describing the active session. |
context.roleId | String | Active character/role id (must be non-empty). |
context.serverId | String | Active server id (must be non-empty). |
| 欄位 | 型別 | 說明 |
|---|---|---|
context | VGSDKGameContext | 描述目前工作階段的包裝物件。 |
context.roleId | String | 目前的角色 id(不得為空)。 |
context.serverId | String | 目前的伺服器 id(不得為空)。 |
| 字段 | 类型 | 描述 |
|---|---|---|
context | VGSDKGameContext | 描述当前会话的包装对象。 |
context.roleId | String | 当前的角色 id(不得为空)。 |
context.serverId | String | 当前的服务器 id(不得为空)。 |
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Set in-app-message deep-link listener
Registers a listener for deep links fired by Apollo in-app messages / inbox.
註冊監聽器以接收 Apollo 應用程式內訊息/收件匣觸發的深層連結。
注册一个用于监听 Apollo 应用内消息 / 收件箱触发的深链的监听器。
VGSDKInAppMessageDeepLinkListener *deepLink = [[VGSDKInAppMessageDeepLinkListener alloc] init];
deepLink.onDeepLink = ^(NSString *url) { /* route it */ };
[VGSDKAppInbox setInAppMessageDeepLinkListenerWithListener:deepLink];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
listener | VGSDKInAppMessageDeepLinkListener? | The listener to register (pass none to clear it). |
| 欄位 | 型別 | 說明 |
|---|---|---|
listener | VGSDKInAppMessageDeepLinkListener? | 要註冊的監聽器(傳入無則清除)。 |
| 字段 | 类型 | 描述 |
|---|---|---|
listener | VGSDKInAppMessageDeepLinkListener? | 要注册的监听器(传入无则清除)。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
onDeepLink | (String) | The deep-link URL string to route. |
| 欄位 | 型別 | 說明 |
|---|---|---|
onDeepLink | (String) | 要路由的深層連結 URL 字串。 |
| 字段 | 类型 | 描述 |
|---|---|---|
onDeepLink | (String) | 要路由的深链 URL 字符串。 |
Show the app inbox floating button
Displays the Apollo app inbox floating button and takes its visibility over for the rest of the session.
顯示 Apollo 應用程式內收件匣的浮動按鈕,並在本次工作階段接手其顯示與隱藏。
显示 Apollo 应用内收件箱的悬浮按钮,并在本次会话接手其显示与隐藏。
The first call to either visibility method hands the button to your game for the rest of the session, so the SDK stops showing and hiding it on its own. The hand over resets on logout and on relaunch. A call made while the app inbox is disabled for your game is accepted and reported in the SDK log as having no effect.
第一次呼叫任一個顯示控制方法後,按鈕即在本次工作階段交由遊戲控制,SDK 不再自行顯示或隱藏它。此控制權會在登出與重新啟動時歸還 SDK。若你的遊戲未啟用應用程式內收件匣,呼叫仍會被接受,並在 SDK 日誌中回報為未產生效果。
第一次调用任一个显示控制方法后,按钮即在本次会话交由游戏控制,SDK 不再自行显示或隐藏它。该控制权会在登出与重新启动时归还 SDK。若你的游戏未启用应用内收件箱,调用仍会被接受,并在 SDK 日志中报告为未产生效果。
[VGSDKAppInbox showFloatingButton];Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Hide the app inbox floating button
Removes the Apollo app inbox floating button and takes its visibility over for the rest of the session.
移除 Apollo 應用程式內收件匣的浮動按鈕,並在本次工作階段接手其顯示與隱藏。
移除 Apollo 应用内收件箱的悬浮按钮,并在本次会话接手其显示与隐藏。
The dismiss zone and any open confirmation popup go with it, and a drag in progress is cancelled immediately. The button’s last position survives, so a later show restores it. An open message list is left untouched, and a message arriving while the button is hidden still updates the unread count.
移除按鈕時,拖曳關閉區與任何開啟中的確認彈窗會一併移除,正在進行的拖曳也會立即取消。按鈕最後的位置會保留,因此之後呼叫顯示時會回到原處。開啟中的訊息列表不受影響,按鈕隱藏期間收到的訊息仍會更新未讀數量。
移除按钮时,拖拽关闭区与任何打开中的确认弹窗会一并移除,正在进行的拖拽也会立即取消。按钮最后的位置会保留,因此之后调用显示时会回到原处。打开中的消息列表不受影响,按钮隐藏期间收到的消息仍会更新未读数量。
[VGSDKAppInbox hideFloatingButton];Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Firebase
Fetch Firebase Remote Config
Fetches all remote-config keys.
取得所有 remote-config 鍵。
获取所有 remote-config 键。
[VGSDKFirebase fetchRemoteConfig:^(NSDictionary<NSString *, NSString *> *config, NSError *error) {
// Read config[@"your_key"]
}];Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
config | [String: String]? | All remote-config keys and values. |
error | Error? | Present on failure: VGSDK firebaseUnsupported (9047, see General error codes) when the Firebase dependency is missing, otherwise the raw native Firebase Remote Config error (fetch/activate failure). |
| 欄位 | 型別 | 說明 |
|---|---|---|
config | [String: String]? | 所有遠端設定的鍵與值。 |
error | Error? | 失敗時存在: 缺少 Firebase 相依套件時為 VGSDK firebaseUnsupported(9047。請參閱 一般錯誤碼),否則為原生 Firebase Remote Config 錯誤(fetch/activate 失敗)。 |
| 字段 | 类型 | 描述 |
|---|---|---|
config | [String: String]? | 所有远程配置的键与值。 |
error | Error? | 失败时存在: 缺少 Firebase 依赖时为 VGSDK firebaseUnsupported(9047。请参阅 通用错误码),否则为原生 Firebase Remote Config 错误(fetch/activate 失败)。 |
In-App WebView
Show in-app WebView
Opens a URL in an in-app WebView.
在應用程式內 WebView 中開啟一個 URL。
在应用内 WebView 中打开一个 URL。
[[PassSDK shared] showWebViewWith:@"https://example.com" completion:^{
// WebView dismissed
}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
url | String | URL to load. |
| 欄位 | 型別 | 說明 |
|---|---|---|
url | String | 要載入的 URL。 |
| 字段 | 类型 | 描述 |
|---|---|---|
url | String | 要加载的 URL。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
completion | () -> Void | Fires when the WebView is dismissed. |
| 欄位 | 型別 | 說明 |
|---|---|---|
completion | () -> Void | 當 WebView 關閉時觸發。 |
| 字段 | 类型 | 描述 |
|---|---|---|
completion | () -> Void | 当 WebView 关闭时触发。 |
Notification
Add a custom sound
Deliver a custom sound with push notifications: no API call, just ship the audio file with your app:
- Prepare the sound file:
.caf/.aiff/.wav, ≤ 30 seconds (longer sounds fall back to the system default). - Add it to your app target so it ships inside the app bundle (Xcode → your target → Build Phases → Copy Bundle Resources).
- Reference it by full filename (e.g.
my_notification.caf) in the push payload’ssoundfield.
為推播通知提供自訂音效:無需 API 呼叫,只要將音訊檔隨應用程式一起打包:
- 準備音效檔:
.caf/.aiff/.wav,≤ 30 秒(更長的音效會回退為系統預設音效)。 - 將其加入你的 app target,使其打包進 app bundle(Xcode → 你的 target → Build Phases → Copy Bundle Resources)。
- 於推播負載的
sound欄位中以完整檔名參照它(例如my_notification.caf)。
为推送通知提供自定义声音:无需 API 调用,只需将音频文件随应用一起打包:
- 准备声音文件:
.caf/.aiff/.wav,≤ 30 秒(更长的声音会回退为系统默认声音)。 - 将其添加到你的 app target,使其打包进 app bundle(Xcode → 你的 target → Build Phases → Copy Bundle Resources)。
- 在推送负载的
sound字段中按完整文件名引用它(例如my_notification.caf)。
Social
Read Facebook profile/friends and share to Facebook or Instagram. Facebook results are the raw Graph JSON (no typed model). Instagram callbacks return only an error (none = success).
讀取 Facebook 個人檔案/好友,並分享到 Facebook 或 Instagram。Facebook 的結果為原始的 Graph JSON(沒有型別化模型)。Instagram 的回呼僅傳回一個錯誤(不存在=成功)。
读取 Facebook 资料 / 好友,并分享到 Facebook 或 Instagram。Facebook 结果是原始的 Graph JSON(没有类型化模型)。Instagram 回调仅返回一个错误(不存在 = 成功)。
Get Facebook profile
Returns the player’s Facebook profile as raw Graph JSON.
以原始 Graph JSON 傳回玩家的 Facebook 個人檔案。
以原始 Graph JSON 形式返回玩家的 Facebook 资料。
[VGSDKFacebook getProfile:^(NSDictionary<NSString *, id> *profile, NSError *error) {
// profile[@"id"], profile[@"name"], profile[@"picture"]
}];Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
profile | [String: Any]? | Raw Graph profile dictionary. Absent on error. |
profile["id"] | String | Facebook user id. |
profile["name"] | String | Display name. |
profile["picture"] | Any | Picture object (Graph shape). |
error | NSError? | Present on failure: the raw native Facebook error (login or Graph request), or undefined (9000) on an invalid access token. See General error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
profile | [String: Any]? | 原始的 Graph 個人檔案字典。發生錯誤時不存在。 |
profile["id"] | String | Facebook 使用者 ID。 |
profile["name"] | String | 顯示名稱。 |
profile["picture"] | Any | 圖片物件(Graph 結構)。 |
error | NSError? | 失敗時存在: 原生 Facebook 錯誤(登入或 Graph 請求),或存取權杖無效時為 undefined(9000)。請參閱 一般錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
profile | [String: Any]? | 原始 Graph 资料字典。出错时不存在。 |
profile["id"] | String | Facebook 用户 id。 |
profile["name"] | String | 显示名称。 |
profile["picture"] | Any | 头像对象(Graph 结构)。 |
error | NSError? | 失败时存在: 原生 Facebook 错误(登录或 Graph 请求),或访问令牌无效时为 undefined(9000)。请参阅 通用错误码。 |
Get Facebook friends
Returns friends using the app as raw Graph dictionaries.
以原始 Graph 字典傳回正在使用此應用程式的好友。
以原始 Graph 字典形式返回正在使用该应用的好友。
[VGSDKFacebook getFriendWithOffset:0 count:50
completion:^(NSArray<NSDictionary<NSString *, id> *> *friends, NSError *error) { }];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
offset | Int | Paging offset. |
count | Int | Number of friends to fetch. |
| 欄位 | 型別 | 說明 |
|---|---|---|
offset | Int | 分頁偏移量。 |
count | Int | 要取得的好友數量。 |
| 字段 | 类型 | 描述 |
|---|---|---|
offset | Int | 分页偏移量。 |
count | Int | 要获取的好友数量。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
friends | [[String: Any]]? | Array of friend dictionaries (id / name / picture keys). Absent on error. |
error | NSError? | Present on failure: the raw native Facebook error (login or Graph request), or cancelLogin (9003) if the player cancels the re-login prompt. See General error codes. Unlike Get Facebook profile, an invalid access token is not mapped to undefined (9000). |
| 欄位 | 型別 | 說明 |
|---|---|---|
friends | [[String: Any]]? | 好友字典的陣列(id/name/picture 鍵)。發生錯誤時不存在。 |
error | NSError? | 失敗時存在: 原生 Facebook 錯誤(登入或 Graph 請求),或玩家取消重新登入時為 cancelLogin(9003)。請參閱 一般錯誤碼。與「取得 Facebook 個人檔案」不同,存取權杖無效不會對應為 undefined(9000)。 |
| 字段 | 类型 | 描述 |
|---|---|---|
friends | [[String: Any]]? | 好友字典数组(含 id / name / picture 键)。出错时不存在。 |
error | NSError? | 失败时存在: 原生 Facebook 错误(登录或 Graph 请求),或玩家取消重新登录时为 cancelLogin(9003)。请参阅 通用错误码。与“获取 Facebook 资料”不同,访问令牌无效不会映射为 undefined(9000)。 |
Invite Facebook friends
Opens the Facebook invite dialog.
開啟 Facebook 邀請對話框。
打开 Facebook 邀请对话框。
[VGSDKFacebook inviteFriend:@"Play with me" message:@"Join!"
filter:PassFBInvitationFilterAppUsers
completion:^(NSDictionary<NSString *, id> *result, NSError *error) { }];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
title | String? | Dialog title. |
message | String? | Invite message shown in the dialog. |
filter | PassFBInvitationFilter | Audience filter: see PassFBInvitationFilter. |
| 欄位 | 型別 | 說明 |
|---|---|---|
title | String? | 對話框標題。 |
message | String? | 在對話框中顯示的邀請訊息。 |
filter | PassFBInvitationFilter | 受眾篩選: 請參閱 PassFBInvitationFilter。 |
| 字段 | 类型 | 描述 |
|---|---|---|
title | String? | 对话框标题。 |
message | String? | 在对话框中显示的邀请消息。 |
filter | PassFBInvitationFilter | 受众筛选: 请参阅 PassFBInvitationFilter。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
result | [String: Any]? | Dialog result dictionary. Absent on error/cancel. |
error | NSError? | Present on failure: a VGSDK code on a guard or cancel (see Social error codes), otherwise the raw native Facebook error (share/invite dialog or re-auth failure). |
| 欄位 | 型別 | 說明 |
|---|---|---|
result | [String: Any]? | 對話框結果字典。發生錯誤/取消時不存在。 |
error | NSError? | 失敗時存在: 於防護或取消時為 VGSDK 代碼(請參閱 社群錯誤碼),否則為原生 Facebook 錯誤(分享/邀請對話框或重新驗證失敗)。 |
| 字段 | 类型 | 描述 |
|---|---|---|
result | [String: Any]? | 对话框结果字典。出错 / 取消时不存在。 |
error | NSError? | 失败时存在: 在防护或取消时为 VGSDK 代码(请参阅 社交错误码),否则为原生 Facebook 错误(分享/邀请对话框或重新验证失败)。 |
Share photo to Facebook
Shares a photo through the Facebook share dialog.
透過 Facebook 分享對話框分享相片。
通过 Facebook 分享对话框分享一张照片。
[VGSDKFacebook sharePhoto:image completion:^(NSDictionary<NSString *, id> *result, NSError *error) { }];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
image | UIImage? | Image to share. |
| 欄位 | 型別 | 說明 |
|---|---|---|
image | UIImage? | 要分享的相片。 |
| 字段 | 类型 | 描述 |
|---|---|---|
image | UIImage? | 要分享的照片。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
result | [String: Any]? | Dialog result dictionary. Absent on error/cancel. |
error | NSError? | Present on failure: a VGSDK code on a guard or cancel (see Social error codes), otherwise the raw native Facebook error (share/invite dialog or re-auth failure). |
| 欄位 | 型別 | 說明 |
|---|---|---|
result | [String: Any]? | 對話框結果字典。發生錯誤/取消時不存在。 |
error | NSError? | 失敗時存在: 於防護或取消時為 VGSDK 代碼(請參閱 社群錯誤碼),否則為原生 Facebook 錯誤(分享/邀請對話框或重新驗證失敗)。 |
| 字段 | 类型 | 描述 |
|---|---|---|
result | [String: Any]? | 对话框结果字典。出错 / 取消时不存在。 |
error | NSError? | 失败时存在: 在防护或取消时为 VGSDK 代码(请参阅 社交错误码),否则为原生 Facebook 错误(分享/邀请对话框或重新验证失败)。 |
Share link to Facebook
Shares a link.
分享連結。
分享一个链接。
[VGSDKFacebook shareLinkWithUrl:@"https://example.com"
completion:^(NSDictionary<NSString *, id> *result, NSError *error) { }];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
url | String? | Link URL to share. |
| 欄位 | 型別 | 說明 |
|---|---|---|
url | String? | 要分享的連結 URL。 |
| 字段 | 类型 | 描述 |
|---|---|---|
url | String? | 要分享的链接 URL。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
result | [String: Any]? | Dialog result dictionary. Absent on error/cancel. |
error | NSError? | Present on failure: a VGSDK code on a guard or cancel (see Social error codes), otherwise the raw native Facebook error (share/invite dialog or re-auth failure). |
| 欄位 | 型別 | 說明 |
|---|---|---|
result | [String: Any]? | 對話框結果字典。發生錯誤/取消時不存在。 |
error | NSError? | 失敗時存在: 於防護或取消時為 VGSDK 代碼(請參閱 社群錯誤碼),否則為原生 Facebook 錯誤(分享/邀請對話框或重新驗證失敗)。 |
| 字段 | 类型 | 描述 |
|---|---|---|
result | [String: Any]? | 对话框结果字典。出错 / 取消时不存在。 |
error | NSError? | 失败时存在: 在防护或取消时为 VGSDK 代码(请参阅 社交错误码),否则为原生 Facebook 错误(分享/邀请对话框或重新验证失败)。 |
Share to Instagram feed
Shares an image to the Instagram feed.
將圖片分享到 Instagram 動態。
将一张图片分享到 Instagram 动态。
[VGSDKInstagram shareToFeedWith:image completion:^(NSError *error) { }];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
image | UIImage? | Image to share. |
| 欄位 | 型別 | 說明 |
|---|---|---|
image | UIImage? | 要分享的圖片。 |
| 字段 | 类型 | 描述 |
|---|---|---|
image | UIImage? | 要分享的图片。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
error | NSError? | Present on failure, absent means success: see Social error codes. |
| 欄位 | 型別 | 說明 |
|---|---|---|
error | NSError? | 失敗時存在。不存在表示成功: 請參閱 社群錯誤碼。 |
| 字段 | 类型 | 描述 |
|---|---|---|
error | NSError? | 失败时存在。不存在表示成功: 请参阅 社交错误码。 |
Share to Instagram Stories
Shares an image to Instagram Stories.
將圖片分享到 Instagram 限時動態。
将一张图片分享到 Instagram 快拍。
[VGSDKInstagram shareToStoriesWith:image completion:^(NSError *error) {
if (error == nil) { /* shared */ }
}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
image | UIImage? | Image to share. |
| 欄位 | 型別 | 說明 |
|---|---|---|
image | UIImage? | 要分享的圖片。 |
| 字段 | 类型 | 描述 |
|---|---|---|
image | UIImage? | 要分享的图片。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
error | NSError? | Present on failure, absent means success: see Social error codes. A missing Facebook app id surfaces as facebookConfigNotFound (9020, see General error codes). |
User Experience
Native store rating prompt and in-chat Google Translate.
原生商店評分提示與聊天內的 Google Translate。
原生商店评分提示,以及聊天内的 Google Translate。
Store rating (in-app review)
Triggers the native in-app review sheet (subject to the OS’s display limits).
觸發原生應用程式內評論表單(受作業系統的顯示限制約束)。
触发原生应用内评价面板(受操作系统的展示限制约束)。
[[PassSDK shared] storeRating];Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
No return value (fire-and-forget).
無回傳值(fire-and-forget)。
无返回值(fire-and-forget)。
Translate text
Translates text into a target language via Google Translate. The result is delivered asynchronously.
透過 Google Translate 將文字翻譯為目標語言。結果會以非同步方式傳回。
通过 Google Translate 将文本翻译为目标语言。结果异步返回。
[[PassSDK shared] translate:@"Hello" to:@"vi" completion:^(NSString *translated) {
// translated == @"Xin chào"
}];Input
輸入
输入
| Field | Type | Description |
|---|---|---|
text | String? | Text to translate. |
lang | String? | Target language code (e.g. “vi”). |
| 欄位 | 型別 | 說明 |
|---|---|---|
text | String? | 要翻譯的文字。 |
lang | String? | 目標語言代碼(例如 “vi”)。 |
| 字段 | 类型 | 描述 |
|---|---|---|
text | String? | 要翻译的文本。 |
lang | String? | 目标语言代码(例如 “vi”)。 |
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
translated | String? | The translated text. |
| 欄位 | 型別 | 說明 |
|---|---|---|
translated | String? | 翻譯後的文字。 |
| 字段 | 类型 | 描述 |
|---|---|---|
translated | String? | 翻译后的文本。 |
SDK Information
Read-only accessors for SDK, device, and current-user information: SDK version, active language, detected country, device id, and the signed-in user. All are static accessors. None take input.
用於讀取 SDK、裝置與目前使用者資訊的唯讀存取器: SDK 版本、使用中的語言、偵測到的國家/地區、裝置 ID,以及已登入的使用者。全部皆為靜態存取器。均不需輸入。
SDK、设备与当前用户信息的只读访问器: SDK 版本、当前语言、检测到的国家 / 地区、设备 id 以及已登录的用户。它们都是静态访问器。均不接受输入。
Get SDK version
Returns the VNGGames SDK version.
傳回 VNGGames SDK 版本。
返回 VNGGames SDK 版本。
NSString *version = [VGSDKUtilities sdkVersion];Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
version | String | The SDK version string. |
| 欄位 | 型別 | 說明 |
|---|---|---|
version | String | SDK 版本字串。 |
| 字段 | 类型 | 描述 |
|---|---|---|
version | String | SDK 版本字符串。 |
Get current language
Returns the SDK’s active language code.
傳回 SDK 使用中的語言代碼。
返回 SDK 的当前语言代码。
NSString *language = [VGSDKUtilities currentLanguage];Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
language | String | Active language code (e.g. “vi”, “en”). |
| 欄位 | 型別 | 說明 |
|---|---|---|
language | String | 使用中的語言代碼(例如 “vi”、“en”)。 |
| 字段 | 类型 | 描述 |
|---|---|---|
language | String | 当前语言代码(例如 “vi”、“en”)。 |
Get current user
Returns the signed-in user, or none when no session exists.
傳回已登入的使用者。若不存在工作階段則為無。
返回已登录的用户,若不存在会话则为无。
PassUserInfo *user = [VGSDKUtilities currentUser];
if (user != nil) {
// user.userID, user.displayName, user.type
}Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
user | PassUserInfo? | The signed-in user, or absent when no session exists. Fields: PassUserInfo. |
| 欄位 | 型別 | 說明 |
|---|---|---|
user | PassUserInfo? | 已登入的使用者。登出時不存在。欄位:PassUserInfo。 |
| 字段 | 类型 | 描述 |
|---|---|---|
user | PassUserInfo? | 已登录的用户,未登录时不存在。字段:PassUserInfo。 |
Get current country code
Returns the player’s country code when it is one of the game’s publish-market countries, otherwise returns OT (other).
當玩家的國家/地區屬於遊戲發行市場的國家之一時傳回其代碼。否則傳回 OT(其他)。
当玩家的国家 / 地区代码属于游戏发行市场之一时返回该代码。否则返回 OT(其他)。
NSString *code = [VGSDKUtilities currentCountryCode];Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
countryCode | String? | The player’s country code, or OT (other) when outside the game’s publish market. Absent when not yet detected. |
| 欄位 | 型別 | 說明 |
|---|---|---|
countryCode | String? | 玩家的國家/地區代碼。位於遊戲發行市場之外時為 OT(其他)。尚未偵測到時不存在。 |
| 字段 | 类型 | 描述 |
|---|---|---|
countryCode | String? | 玩家的国家 / 地区代码。位于游戏发行市场之外时为 OT(其他)。尚未检测到时不存在。 |
Get device id
Returns a per-device identifier: the advertising id when available, otherwise a fallback device id: used when the advertising id is unavailable or all-zero (e.g. tracking not authorized). Dashes are replaced with underscores.
傳回每台裝置的識別碼:可用時為廣告識別碼,否則為備用裝置識別碼: 於廣告識別碼無法使用或全為零時使用(例如未授權追蹤)。連字號會以底線取代。
返回每设备标识符:可用时为广告标识符,否则为备用设备标识符: 在广告标识符不可用或全为零时使用(例如未授权跟踪)。连字符会被替换为下划线。
NSString *deviceId = [VGSDKUtilities deviceId];Input
輸入
输入
No input.
無輸入。
无输入。
Output
輸出
输出
| Field | Type | Description |
|---|---|---|
deviceId | String | Advertising id when available, otherwise a fallback device id, with dashes replaced by underscores. Absent when unavailable. |
| 欄位 | 型別 | 說明 |
|---|---|---|
deviceId | String | 可用時為廣告識別碼。否則為備用裝置識別碼,連字號會以底線取代。無法取得時不存在。 |
| 字段 | 类型 | 描述 |
|---|---|---|
deviceId | String | 可用时为广告标识符。否则为备用设备标识符,连字符会替换为下划线。无法获取时不存在。 |
Data Models
Shared objects and enums referenced by multiple methods, documented once here. For enums, each row is one case: Field = the case, Type = its raw value.
由多個方法參考的共用物件與列舉,於此處統一說明一次。對於列舉,每一列代表一個 case: Field=該 case,Type=其原始值。
被多个方法引用的共享对象与枚举,在此统一记录一次。对于枚举,每一行是一个枚举项: Field = 该枚举项,Type = 其原始值。
PassUserInfo
The signed-in player, delivered by every login callback and by the current-user accessor.
由每個登入回呼以及目前使用者存取器傳回的使用者物件。
由每个登录回调以及当前用户访问器返回的用户对象。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
userID | String | Unique VNGGames user id. |
displayName | String | Player display name. |
sessionID | String | Session token used to authenticate backend calls. |
type | PassLoginType | Login channel used: facebook, google, guest, apple, zing, email. |
typeString | String | The login channel as a string. |
protectedStatus | Bool | Whether the account is protected/secured. |
lastUpdateSession | Int | Epoch seconds of the last session refresh. |
| 欄位 | 型別 | 說明 |
|---|---|---|
userID | String | VNGGames 唯一使用者 ID。 |
displayName | String | 玩家顯示名稱。 |
sessionID | String | 用於驗證後端呼叫的工作階段權杖。 |
type | PassLoginType | 使用的登入頻道:facebook、google、guest、apple、zing、email。 |
typeString | String | 頻道名稱字串。 |
protectedStatus | Bool | 帳號是否受保護/已加固。 |
lastUpdateSession | Int | 上次工作階段重新整理的 Epoch 秒數。 |
| 字段 | 类型 | 描述 |
|---|---|---|
userID | String | 唯一的 VNGGames 用户 id。 |
displayName | String | 玩家显示名称。 |
sessionID | String | 用于验证后端调用的会话令牌。 |
type | PassLoginType | 所用的登录渠道:facebook、google、guest、apple、zing、email。 |
typeString | String | 以字符串表示的渠道名称。 |
protectedStatus | Bool | 账号是否受保护 / 已加固。 |
lastUpdateSession | Int | 最近一次会话刷新的 Unix 时间戳(秒)。 |
PassLoginType
Login channel identifier (Int enum): selects the channel for Direct login and reports which channel a player signed in with. Supported channels:
登入頻道識別碼(Int 列舉): 用於為 Direct login 選擇頻道,並回報玩家使用哪個頻道登入。支援的頻道:
登录渠道标识符(Int 枚举): 为 Direct login 选择渠道,并报告玩家使用哪个渠道登录。支持的渠道:
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
.facebook | 1 | Facebook. |
.google | 3 | Google. |
.zing | 4 | Zing ID. |
.guest | 5 | Anonymous guest. |
.apple | 7 | Sign in with Apple. |
.email | 8 | Email. |
| 欄位 | 型別 | 說明 |
|---|---|---|
.facebook | 1 | Facebook。 |
.google | 3 | Google。 |
.zing | 4 | Zing ID。 |
.guest | 5 | 匿名訪客。 |
.apple | 7 | 使用 Apple 登入。 |
.email | 8 | 電子郵件。 |
| 字段 | 类型 | 描述 |
|---|---|---|
.facebook | 1 | Facebook。 |
.google | 3 | Google。 |
.zing | 4 | Zing ID。 |
.guest | 5 | 匿名访客。 |
.apple | 7 | Sign in with Apple。 |
.email | 8 | 电子邮箱。 |
PassManageAccountAction
The action the player took on the account-management screen (Int enum).
玩家在帳號管理畫面上執行的操作(Int 列舉)。
玩家在账号管理界面上执行的操作(Int 枚举)。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
.close | 0 | Closed the screen without acting. |
.deleteAccount | 1 | Chose to delete the account. |
.bindAccount | 2 | Bound / linked an account. |
.switchAccount | 3 | Switched to another account. |
| 欄位 | 型別 | 說明 |
|---|---|---|
.close | 0 | 未執行任何操作即關閉畫面。 |
.deleteAccount | 1 | 選擇刪除帳號。 |
.bindAccount | 2 | 綁定/連結了帳號。 |
.switchAccount | 3 | 切換到另一個帳號。 |
| 字段 | 类型 | 描述 |
|---|---|---|
.close | 0 | 未执行任何操作即关闭屏幕。 |
.deleteAccount | 1 | 选择删除账号。 |
.bindAccount | 2 | 绑定 / 关联了一个账号。 |
.switchAccount | 3 | 切换到了另一个账号。 |
VGSDKPaymentProduct
A sellable product returned by Get products.
由「取得商品」傳回的可販售商品。
由“获取商品”返回的可售卖商品。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
itemId | String | The configured item id from Store. |
price | Double | Numeric price in the store currency. |
priceMicros | Int | Price in micro-units: 1,000,000 = one currency unit. |
displayPrice | String | Store-formatted price string to show the player. |
currency | String | ISO currency code. |
currencySymbol | String | Currency symbol for the price. |
| 欄位 | 型別 | 說明 |
|---|---|---|
itemId | String | 在商店設定的商品 id。 |
price | Double | 以商店貨幣計價的數值價格。 |
priceMicros | Int | 以微單位表示的價格: 1,000,000 = 一個 currency 單位。 |
displayPrice | String | 商店格式化後、用於向玩家顯示的價格字串。 |
currency | String | ISO 貨幣代碼。 |
currencySymbol | String | 價格所用的貨幣符號。 |
| 字段 | 类型 | 描述 |
|---|---|---|
itemId | String | 在商店配置的商品 id。 |
price | Double | 以商店货币计价的数值价格。 |
priceMicros | Int | 以微单位表示的价格: 1,000,000 = 一个 currency 单位。 |
displayPrice | String | 商店格式化后、用于向玩家展示的价格字符串。 |
currency | String | ISO 货币代码。 |
currencySymbol | String | 价格所用的货币符号。 |
VGSDKPaymentInfo
The purchase request passed to Purchase.
傳入「購買」的購買請求。
传入“购买”的购买请求。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
userId | String | Buyer’s VNGGames user id. |
itemId | String | The configured item id from Store. |
serverId | String | Game server id. |
roleId | String | Character/role id. |
appTransactionId | String | Your app-side transaction id, for reconciliation. |
addInfo | String | Extra passthrough data. Empty string when unused. |
| 欄位 | 型別 | 說明 |
|---|---|---|
userId | String | 購買者的 VNGGames 使用者 id。 |
itemId | String | 在商店設定的商品 id。 |
serverId | String | 遊戲伺服器 id。 |
roleId | String | 角色 id。 |
appTransactionId | String | 你在 App 端的交易 id,用於對帳。 |
addInfo | String | 額外的透傳資料。未使用時為空字串。 |
| 字段 | 类型 | 描述 |
|---|---|---|
userId | String | 购买者的 VNGGames 用户 id。 |
itemId | String | 在商店配置的商品 id。 |
serverId | String | 游戏服务器 id。 |
roleId | String | 角色 id。 |
appTransactionId | String | 你在 App 端的交易 id,用于对账。 |
addInfo | String | 额外的透传数据。未使用时为空字符串。 |
VGSDKPaymentPurchaseStatus
Outcome of a purchase (Int enum).
購買的結果(Int 列舉)。
购买的结果(Int 枚举)。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
.success | 0 | Purchase completed. |
.failed | 1 | Purchase failed. See billing / store payment error codes. |
.canceled | 2 | Player canceled. |
.processing | 3 | Processing / verifying with Billing System. |
.pending | 4 | Awaiting external confirmation. |
VGSDKSupportInfo
Player context passed to Open support center.
傳入「開啟客服中心」的玩家情境。
传入“打开客服中心”的玩家上下文。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
userId | String? | Unique VNGGames user id. |
serverId | String? | Game server id. |
level | String? | Player level. |
roleName | String? | Character/role name. |
loginChannel | String? | Login channel. |
guild | String? | Guild name. |
content | String? | Pre-filled ticket content. |
| 欄位 | 型別 | 說明 |
|---|---|---|
userId | String? | VNGGames 唯一使用者 id。 |
serverId | String? | 遊戲伺服器 id。 |
level | String? | 玩家等級。 |
roleName | String? | 角色名稱。 |
loginChannel | String? | 登入頻道。 |
guild | String? | 公會名稱。 |
content | String? | 預先填入的工單內容。 |
| 字段 | 类型 | 描述 |
|---|---|---|
userId | String? | 唯一的 VNGGames 用户 id。 |
serverId | String? | 游戏服务器 id。 |
level | String? | 玩家等级。 |
roleName | String? | 角色名称。 |
loginChannel | String? | 登录渠道。 |
guild | String? | 公会名称。 |
content | String? | 预填的工单内容。 |
VGSDKAnalyticsProvider
Analytics provider selector for sendCustomEvent (Int enum).
sendCustomEvent 的分析供應商選擇器(Int 列舉)。
sendCustomEvent 的分析提供方选择器(Int 枚举)。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
.appsFlyer | 0 | AppsFlyer. |
.firebase | 1 | Firebase Analytics. |
.dataPlatform | 2 | VNGGames Data Platform. |
.facebook | 3 | Facebook App Events. |
.thinkingData | 4 | ThinkingData. |
.cleverTap | 5 | CleverTap. |
| 欄位 | 型別 | 說明 |
|---|---|---|
.appsFlyer | 0 | AppsFlyer。 |
.firebase | 1 | Firebase Analytics。 |
.dataPlatform | 2 | VNGGames Data Platform。 |
.facebook | 3 | Facebook App Events。 |
.thinkingData | 4 | ThinkingData。 |
.cleverTap | 5 | CleverTap。 |
| 字段 | 类型 | 描述 |
|---|---|---|
.appsFlyer | 0 | AppsFlyer。 |
.firebase | 1 | Firebase Analytics。 |
.dataPlatform | 2 | VNGGames 数据平台。 |
.facebook | 3 | Facebook App Events。 |
.thinkingData | 4 | ThinkingData。 |
.cleverTap | 5 | CleverTap。 |
Analytics default parameters
The default parameters the analytics facade merges into every event it triggers. The SDK fills them automatically: you never set them, and each method’s own inputs and any extraData you pass are added on top. device_info, user_info, response_info, and login_info are JSON-encoded strings. The last two are conditional: see their rows. Used by every method in Analytics.
分析門面合併到它所觸發之每個事件的預設參數。SDK 會自動填入: 你永遠不需設定。每個方法自身的輸入以及你傳入的任何 extraData 會再疊加於其上。device_info、user_info、response_info 與 login_info 為 JSON 編碼字串。後兩者為條件性: 請參閱其對應列。由 分析 中的每個方法使用。
分析门面合并到它触发的每个事件中的默认参数。SDK 会自动填充它们: 你无需设置。每个方法自身的输入以及你传入的任何 extraData 都会叠加在其之上。device_info、user_info、response_info 和 login_info 是 JSON 编码的字符串。后两个是条件性的: 见其对应行。分析 中的每个方法都会使用它们。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
device_info | String | Device info, JSON-encoded: os (the platform name), version (OS version), model (device model). |
device_id | String | Per-device id (advertising id when available, otherwise a fallback device id, prefixed). |
game_version | String | Full game (app) version. |
sdk_version | String | VNGGames SDK version. |
package | String | Game bundle id / package name. |
network_type | String | Active network type at send time. |
timestamp | String | Event time, in milliseconds. |
session_id | String | Analytics session id: a UUID generated once per app run. |
user_info | String | Signed-in user info, JSON-encoded: user_id, social_id, country_code. Ids are empty while signed out. |
appsflyer_id | String | AppsFlyer device UID. |
frb_installation_id | String | Firebase installation id. |
frb_app_instance_id | String | Firebase app-instance id. |
response_info | String | Added only on events that report an outcome. JSON-encoded: status (Success / Failed / Canceled), error_code, remote (0 local, 1 remote). |
login_info | String | Added only on login-flow events. JSON-encoded: method, channel, flow (CreateUser / UpdateUser), step. |
| 欄位 | 型別 | 說明 |
|---|---|---|
device_info | String | 裝置資訊,JSON 編碼:os(平台名稱)、version(作業系統版本)、model(裝置型號)。 |
device_id | String | 每台裝置的 ID(可用時為廣告 ID,否則為備用裝置 ID。含前綴)。 |
game_version | String | 完整的遊戲(應用程式)版本。 |
sdk_version | String | VNGGames SDK 版本。 |
package | String | 遊戲的 bundle id/套件名稱。 |
network_type | String | 傳送當下使用中的網路類型。 |
timestamp | String | 事件時間,以毫秒為單位。 |
session_id | String | 分析工作階段 ID: 每次應用程式執行時產生一次的 UUID。 |
user_info | String | 已登入使用者資訊,JSON 編碼:user_id、social_id、country_code。登出時這些 ID 為空。 |
appsflyer_id | String | AppsFlyer 裝置 UID。 |
frb_installation_id | String | Firebase 安裝 ID。 |
frb_app_instance_id | String | Firebase 應用程式執行個體 ID。 |
response_info | String | 僅在回報結果的事件上加入。JSON 編碼:status(Success/Failed/Canceled)、error_code、remote(0 本機、1 遠端)。 |
login_info | String | 僅在登入流程事件上加入。JSON 編碼:method、channel、flow(CreateUser/UpdateUser)、step。 |
| 字段 | 类型 | 描述 |
|---|---|---|
device_info | String | 设备信息,JSON 编码:os(平台名称)、version(操作系统版本)、model(设备型号)。 |
device_id | String | 每设备 id(可用时为广告 id,否则为备用设备 id。带前缀)。 |
game_version | String | 完整的游戏(应用)版本。 |
sdk_version | String | VNGGames SDK 版本。 |
package | String | 游戏 bundle id / 包名。 |
network_type | String | 发送时的当前网络类型。 |
timestamp | String | 事件时间,以毫秒为单位。 |
session_id | String | 分析会话 id: 每次应用运行生成一次的 UUID。 |
user_info | String | 已登录用户信息,JSON 编码:user_id、social_id、country_code。未登录时这些 id 为空。 |
appsflyer_id | String | AppsFlyer 设备 UID。 |
frb_installation_id | String | Firebase 安装 id。 |
frb_app_instance_id | String | Firebase 应用实例 id。 |
response_info | String | 仅在报告结果的事件上添加。JSON 编码:status(Success / Failed / Canceled)、error_code、remote(0 本地,1 远程)。 |
login_info | String | 仅在登录流程事件上添加。JSON 编码:method、channel、flow(CreateUser / UpdateUser)、step。 |
Analytics platform prefixes
The per-provider prefix the VNGGames SDK inserts into every event it triggers: each event reaches its provider as vgsdk_{prefix}_{event name} (for example, vgsdk_af_app_open). Used by every method in Analytics.
VNGGames SDK 插入到它所觸發之每個事件中的各供應商前綴: 每個事件會以 vgsdk_{prefix}_{event name} 抵達其供應商(例如 vgsdk_af_app_open)。由 分析 中的每個方法使用。
VNGGames SDK 插入到它触发的每个事件中的每提供方前缀: 每个事件以 vgsdk_{prefix}_{event name} 形式到达其提供方(例如 vgsdk_af_app_open)。分析 中的每个方法都会使用它。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
Firebase | frb | Firebase Analytics. |
Facebook | fb | Facebook App Events. |
AppsFlyer | af | AppsFlyer. |
Data Platform | dp | VNGGames Data Platform. |
CleverTap | clt | CleverTap. |
ThinkingData | td | ThinkingData. |
| 欄位 | 型別 | 說明 |
|---|---|---|
Firebase | frb | Firebase Analytics。 |
Facebook | fb | Facebook App Events。 |
AppsFlyer | af | AppsFlyer。 |
Data Platform | dp | VNGGames Data Platform。 |
CleverTap | clt | CleverTap。 |
ThinkingData | td | ThinkingData。 |
| 字段 | 类型 | 描述 |
|---|---|---|
Firebase | frb | Firebase Analytics。 |
Facebook | fb | Facebook App Events。 |
AppsFlyer | af | AppsFlyer。 |
Data Platform | dp | VNGGames 数据平台。 |
CleverTap | clt | CleverTap。 |
ThinkingData | td | ThinkingData。 |
PassFBInvitationFilter
Audience filter for Facebook invites (Int enum).
Facebook 邀請的受眾篩選(Int 列舉)。
Facebook 邀请的受众筛选(Int 枚举)。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
.allFriends | 0 | All friends. |
.appUsers | 1 | Friends who already use the app. |
.nonAppUsers | 2 | Friends who don’t use the app. |
| 欄位 | 型別 | 說明 |
|---|---|---|
.allFriends | 0 | 所有好友。 |
.appUsers | 1 | 已在使用此應用程式的好友。 |
.nonAppUsers | 2 | 未使用此應用程式的好友。 |
| 字段 | 类型 | 描述 |
|---|---|---|
.allFriends | 0 | 所有好友。 |
.appUsers | 1 | 已在使用该应用的好友。 |
.nonAppUsers | 2 | 未使用该应用的好友。 |
Ad revenue mediation network
Mediation network for ad-revenue reporting (UInt enum), used by miscAdRevenue.
用於廣告收益回報的中介聯播網(UInt 列舉),由 miscAdRevenue 使用。
用于广告收入上报的聚合网络(UInt 枚举),由 miscAdRevenue 使用。
Fields
欄位
字段
| Field | Type | Description |
|---|---|---|
.googleAdMob | 1 | Google AdMob. |
.ironSource | 2 | ironSource. |
.applovinMax | 3 | AppLovin MAX. |
.fyber | 4 | Fyber. |
.appodeal | 5 | Appodeal. |
.admost | 6 | Admost. |
.topon | 7 | TopOn. |
.tradplus | 8 | TradPlus. |
.yandex | 9 | Yandex. |
.chartBoost | 10 | Chartboost. |
.unity | 11 | Unity Ads. |
.custom | 12 | Custom. |
.directMonetization | 13 | Direct monetization. |
| 欄位 | 型別 | 說明 |
|---|---|---|
.googleAdMob | 1 | Google AdMob。 |
.ironSource | 2 | ironSource。 |
.applovinMax | 3 | AppLovin MAX。 |
.fyber | 4 | Fyber。 |
.appodeal | 5 | Appodeal。 |
.admost | 6 | Admost。 |
.topon | 7 | TopOn。 |
.tradplus | 8 | TradPlus。 |
.yandex | 9 | Yandex。 |
.chartBoost | 10 | Chartboost。 |
.unity | 11 | Unity Ads。 |
.custom | 12 | 自訂。 |
.directMonetization | 13 | 直接營利。 |
| 字段 | 类型 | 描述 |
|---|---|---|
.googleAdMob | 1 | Google AdMob。 |
.ironSource | 2 | ironSource。 |
.applovinMax | 3 | AppLovin MAX。 |
.fyber | 4 | Fyber。 |
.appodeal | 5 | Appodeal。 |
.admost | 6 | Admost。 |
.topon | 7 | TopOn。 |
.tradplus | 8 | TradPlus。 |
.yandex | 9 | Yandex。 |
.chartBoost | 10 | Chartboost。 |
.unity | 11 | Unity Ads。 |
.custom | 12 | 自定义。 |
.directMonetization | 13 | 直接变现。 |
Error Codes
Failures arrive as an error on domain net.vnggames.sdk (PassError), banded by source. Each row is one code: Field = numeric error.code, Type = the symbol. Note: for the mapped auth/payment bands the SDK band number is shown in the message while error.code preserves the upstream server value.
失敗會以網域 net.vnggames.sdk 上的錯誤(PassError)傳回,並依來源分段。每一列代表一個錯誤碼: Field=數值 error.code,Type=該符號。注意:對於已對應的驗證/付款分段,訊息中會顯示 SDK 分段編號,而 error.code 則保留上游伺服器的值。
失败以域为 net.vnggames.sdk(PassError)的错误形式返回,按来源分段。每一行是一个错误码: Field = 数值 error.code,Type = 符号。注意:对于经过映射的验证 / 支付段,消息中显示的是 SDK 段号,而 error.code 保留上游服务器的原始值。
Auth: VGA / OAuth (7xxx)
VGA (VNGGames Account) / OAuth login errors, delivered as an error. These back the VGA login flows. iOS/Android differ: both share the 7005 to 7020 OAuth codes, but elsewhere the endpoints diverge: on Android user-cancel is 7002 (USER_CANCEL, the legacy build flavor reports 9003 on its cancel-login path), 7003 is LOGIN_FAILED, and 7021 is account-already-bound (QUICK_LOGIN_ACCOUNT_BOUND). iOS instead uses 7001 for cancel and 7021 for validateAccessTokenNullResult, and defines 7022 至 7027 (null-result and quick-login cases) that Android does not.
VGA(VNGGames Account)/OAuth 登入錯誤,以錯誤傳回。這些支撐 VGA 登入流程。iOS 與 Android 有差異:兩者共用 7005 至 7020 的 OAuth 代碼,但其他端點有所分歧: 在 Android 上,玩家取消為 7002(USER_CANCEL,legacy 建置風味在其取消登入路徑回報 9003),7003 為 LOGIN_FAILED,而 7021 為帳號已綁定(QUICK_LOGIN_ACCOUNT_BOUND)。iOS 則以 7001 表示取消、以 7021 表示 validateAccessTokenNullResult,並定義了 Android 沒有的 7022 至 7027(未傳回結果與快速登入的情形)。
VGA(VNGGames Account)/ OAuth 登录错误,以错误形式返回。它们支撑 VGA 登录流程。iOS 与 Android 存在差异:两者共用 7005 至 7020 的 OAuth 代码,但其他端点有所分歧: 在 Android 上,玩家取消为 7002(USER_CANCEL,legacy 构建风味在其取消登录路径返回 9003),7003 为 LOGIN_FAILED,而 7021 为账号已绑定(QUICK_LOGIN_ACCOUNT_BOUND)。iOS 则以 7001 表示取消、以 7021 表示 validateAccessTokenNullResult,并定义了 Android 没有的 7022 至 7027(未返回结果与快速登录的情形)。
Codes
錯誤碼
错误码
| Field | Type | Description |
|---|---|---|
7000 | undefined | Unmapped GGID / OAuth error (fallback). |
7001 | cancelLogin | Player canceled login. |
7005 | invalidRequest | OAuth invalid_request. |
7006 | invalidClient | OAuth invalid_client. |
7007 | invalidGrant | OAuth invalid_grant. |
7008 | invalidScope | OAuth invalid_scope. |
7009 | unsupportedResponseType | OAuth unsupported_response_type. |
7010 | unsupportedGrantType | OAuth unsupported_grant_type. |
7011 | unauthorizedClient | OAuth unauthorized_client. |
7012 | unauthorizedCode | OAuth unauthorized_code. |
7013 | unauthorizedToken | OAuth unauthorized_token. |
7014 | expiredAccessToken | Access token expired. |
7015 | expiredRefreshToken | Refresh token expired. |
7016 | inactiveAccessToken | Access token inactive. |
7017 | accessDenied | Access denied. |
7018 | serverError | OAuth server_error. |
7019 | internalError | OAuth internal_error. |
7020 | invalidUserCredentials | Invalid user credentials. |
7021 | validateAccessTokenNullResult | iOS: token validation returned no result. On Android, 7021 is QUICK_LOGIN_ACCOUNT_BOUND (see the platform note above). |
7022 | refreshAccessTokenNullResult | Token refresh returned no result. |
7023 | getProfileNullResult | Profile fetch returned no result. |
7024 | authenticateNullResult | Authentication returned no result. |
7025 | quickLoginAccountBound | iOS only: the guest account is already bound to a VGA account. Android maps this case to 7021. |
7026 | quickLoginRequiredBinding | Binding is required: the user must bind their account (no skip option). |
7027 | quickLoginTurnOff | Quick login is disabled. The standard login options are shown instead. |
| 欄位 | 型別 | 說明 |
|---|---|---|
7000 | undefined | 未對應的 GGID/OAuth 錯誤(備用)。 |
7001 | cancelLogin | 玩家取消登入。 |
7005 | invalidRequest | OAuth invalid_request。 |
7006 | invalidClient | OAuth invalid_client。 |
7007 | invalidGrant | OAuth invalid_grant。 |
7008 | invalidScope | OAuth invalid_scope。 |
7009 | unsupportedResponseType | OAuth unsupported_response_type。 |
7010 | unsupportedGrantType | OAuth unsupported_grant_type。 |
7011 | unauthorizedClient | OAuth unauthorized_client。 |
7012 | unauthorizedCode | OAuth unauthorized_code。 |
7013 | unauthorizedToken | OAuth unauthorized_token。 |
7014 | expiredAccessToken | 存取權杖已過期。 |
7015 | expiredRefreshToken | 重新整理權杖已過期。 |
7016 | inactiveAccessToken | 存取權杖未啟用。 |
7017 | accessDenied | 存取遭拒。 |
7018 | serverError | OAuth server_error。 |
7019 | internalError | OAuth internal_error。 |
7020 | invalidUserCredentials | 使用者憑證無效。 |
7021 | validateAccessTokenNullResult | iOS: 權杖驗證未傳回任何結果。在 Android 上,7021 為 QUICK_LOGIN_ACCOUNT_BOUND(見上方平台說明)。 |
7022 | refreshAccessTokenNullResult | 權杖重新整理未傳回任何結果。 |
7023 | getProfileNullResult | 個人檔案取得未傳回任何結果。 |
7024 | authenticateNullResult | 身分驗證未傳回任何結果。 |
7025 | quickLoginAccountBound | 僅 iOS: 此訪客帳號已綁定到某個 VGA 帳號。Android 將此情形對應為 7021。 |
7026 | quickLoginRequiredBinding | 必須綁定: 使用者必須綁定其帳號(無略過選項)。 |
7027 | quickLoginTurnOff | 快速登入已停用。改為顯示標準登入選項。 |
| 字段 | 类型 | 描述 |
|---|---|---|
7000 | undefined | 未映射的 GGID / OAuth 错误(兜底)。 |
7001 | cancelLogin | 玩家取消了登录。 |
7005 | invalidRequest | OAuth invalid_request 错误。 |
7006 | invalidClient | OAuth invalid_client 错误。 |
7007 | invalidGrant | OAuth invalid_grant 错误。 |
7008 | invalidScope | OAuth invalid_scope 错误。 |
7009 | unsupportedResponseType | OAuth unsupported_response_type 错误。 |
7010 | unsupportedGrantType | OAuth unsupported_grant_type 错误。 |
7011 | unauthorizedClient | OAuth unauthorized_client 错误。 |
7012 | unauthorizedCode | OAuth unauthorized_code 错误。 |
7013 | unauthorizedToken | OAuth unauthorized_token 错误。 |
7014 | expiredAccessToken | 访问令牌已过期。 |
7015 | expiredRefreshToken | 刷新令牌已过期。 |
7016 | inactiveAccessToken | 访问令牌未激活。 |
7017 | accessDenied | 访问被拒绝。 |
7018 | serverError | OAuth server_error。 |
7019 | internalError | OAuth internal_error。 |
7020 | invalidUserCredentials | 用户凭据无效。 |
7021 | validateAccessTokenNullResult | iOS: 令牌验证未返回结果。在 Android 上,7021 为 QUICK_LOGIN_ACCOUNT_BOUND(见上方平台说明)。 |
7022 | refreshAccessTokenNullResult | 令牌刷新未返回结果。 |
7023 | getProfileNullResult | 资料获取未返回结果。 |
7024 | authenticateNullResult | 身份验证未返回结果。 |
7025 | quickLoginAccountBound | 仅 iOS: 该访客账号已绑定到某个 VGA 账号。Android 将此情形映射为 7021。 |
7026 | quickLoginRequiredBinding | 必须绑定: 用户必须绑定其账号(无跳过选项)。 |
7027 | quickLoginTurnOff | 快速登录已禁用。改为显示标准登录选项。 |
Auth: Passport legacy (8xxx)
Passport-legacy login errors. The SDK maps each Passport server return code to an 8xxx value (8000 = unknown fallback). error.code carries the 8xxx band while the original server code is in the message. Type = the source Passport server return code.
Passport legacy 登入錯誤。SDK 會將每個 Passport 伺服器回傳碼對應到一個 8xxx 值(8000=未知備用)。error.code 帶有 8xxx 分段,而原始伺服器碼則在訊息中。Type=來源 Passport 伺服器回傳碼。
Passport 旧版登录错误。SDK 将每个 Passport 服务器返回码映射为一个 8xxx 值(8000 = 未知兜底)。error.code 携带 8xxx 段,而原始服务器码在消息中。Type = 来源 Passport 服务器返回码。
Codes
錯誤碼
错误码
| Field | Type | Description |
|---|---|---|
8000 | unknown | Unknown Passport-legacy login error (fallback). |
8001 | 1 | Success (server returned code 1). |
8002 | -500 | System error: inspect server logs. |
8003 | -404 | Invalid request (client called the wrong URL). |
8004 | -1 | Bad signature. |
8005 | -2 | Bad request parameters. |
8006 | -101 | Email is already registered. |
8007 | -102 | Email already in use (guest protection). |
8008 | -103 | Email does not exist (forgot / reset password). |
8009 | -104 | UserID is already protected. |
8010 | -105 | UserID not found (account disabled / deleted). |
8011 | -106 | Invalid login credentials. |
8012 | -107 | Invalid login credentials (profile mismatch / null). |
8013 | -108 | Invalid or expired session. |
8014 | -109 | Under the minimum age allowed to play. |
8015 | -110 | Account initialization failed. |
8016 | -111 | User is not in the early-access allow list. |
8017 | -112 | Account is locked. |
8018 | -113 | Account profile is incomplete. |
| 欄位 | 型別 | 說明 |
|---|---|---|
8000 | unknown | 未知的 Passport legacy 登入錯誤(備用)。 |
8001 | 1 | 成功(伺服器回傳碼 1)。 |
8002 | -500 | 系統錯誤: 請檢查伺服器記錄。 |
8003 | -404 | 無效的請求(用戶端呼叫了錯誤的 URL)。 |
8004 | -1 | 簽章錯誤。 |
8005 | -2 | 請求參數錯誤。 |
8006 | -101 | 電子郵件已註冊。 |
8007 | -102 | 電子郵件已被使用(訪客保護)。 |
8008 | -103 | 電子郵件不存在(忘記/重設密碼)。 |
8009 | -104 | UserID 已受保護。 |
8010 | -105 | 找不到 UserID(帳號已停用/已刪除)。 |
8011 | -106 | 登入憑證無效。 |
8012 | -107 | 登入憑證無效(個人檔案不符/為 null)。 |
8013 | -108 | 工作階段無效或已過期。 |
8014 | -109 | 未達允許遊玩的最低年齡。 |
8015 | -110 | 帳號初始化失敗。 |
8016 | -111 | 使用者不在搶先體驗的允許清單中。 |
8017 | -112 | 帳號已鎖定。 |
8018 | -113 | 帳號個人檔案不完整。 |
| 字段 | 类型 | 描述 |
|---|---|---|
8000 | unknown | 未知的 Passport 旧版登录错误(兜底)。 |
8001 | 1 | 成功(服务器返回码 1)。 |
8002 | -500 | 系统错误: 请检查服务器日志。 |
8003 | -404 | 请求无效(客户端调用了错误的 URL)。 |
8004 | -1 | 签名错误。 |
8005 | -2 | 请求参数错误。 |
8006 | -101 | 邮箱已被注册。 |
8007 | -102 | 邮箱已被使用(访客保护)。 |
8008 | -103 | 邮箱不存在(忘记 / 重置密码)。 |
8009 | -104 | UserID 已受保护。 |
8010 | -105 | 找不到 UserID(账号已禁用 / 删除)。 |
8011 | -106 | 登录凭据无效。 |
8012 | -107 | 登录凭据无效(资料不匹配 / 为空)。 |
8013 | -108 | 会话无效或已过期。 |
8014 | -109 | 未达到允许游玩的最低年龄。 |
8015 | -110 | 账号初始化失败。 |
8016 | -111 | 用户不在抢先体验白名单中。 |
8017 | -112 | 账号已被锁定。 |
8018 | -113 | 账号资料不完整。 |
Payment: billing server (6xxx)
Billing-server errors. The SDK maps each payment server return code to a 6xxx value (6000 = unknown fallback). Type = the source payment server code.
帳務伺服器錯誤。SDK 會將每個付款伺服器回傳碼對應到一個 6xxx 值(6000=未知備用)。Type=來源付款伺服器碼。
计费服务器错误。SDK 将每个支付服务器返回码映射为一个 6xxx 值(6000 = 未知兜底)。Type = 来源支付服务器码。
Codes
錯誤碼
错误码
| Field | Type | Description |
|---|---|---|
6000 | unknown | Unknown billing-server error (fallback). |
6001 | 1 | Success (server returned code 1). |
6002 | -8 | System under maintenance (any payment-system error maps here). |
6003 | -70 | Payment error (uncategorized IAP pay failure). |
6004 | -71 | Invalid receipt (bad signature or mismatched package / product / order). |
6005 | -72 | Duplicate receipt (already verified successfully). |
6006 | -73 | Expired receipt (older than 72 hours). |
| 欄位 | 型別 | 說明 |
|---|---|---|
6000 | unknown | 未知的帳務伺服器錯誤(備用)。 |
6001 | 1 | 成功(伺服器回傳碼 1)。 |
6002 | -8 | 系統維護中(任何付款系統錯誤都對應到此)。 |
6003 | -70 | 付款錯誤(未分類的 IAP 付款失敗)。 |
6004 | -71 | 收據無效(簽章錯誤或 package/product/order 不符)。 |
6005 | -72 | 重複的收據(已成功驗證過)。 |
6006 | -73 | 收據已過期(超過 72 小時)。 |
| 字段 | 类型 | 描述 |
|---|---|---|
6000 | unknown | 未知的计费服务器错误(兜底)。 |
6001 | 1 | 成功(服务器返回码 1)。 |
6002 | -8 | 系统维护中(任何支付系统错误都映射到此)。 |
6003 | -70 | 支付错误(未分类的 IAP 支付失败)。 |
6004 | -71 | 收据无效(签名错误或 package / product / order 不匹配)。 |
6005 | -72 | 收据重复(已成功验证过)。 |
6006 | -73 | 收据已过期(超过 72 小时)。 |
Payment: store / verification (9xxx)
Store, receipt, and verification errors raised during the purchase flow (9xxx client-side band). iOS and Android differ: both are merged here, so the same code number can carry a different meaning on each platform. Type shows the source symbol(s) (iOS / Android).
在購買流程期間引發的商店、收據與驗證錯誤(9xxx 用戶端分段)。iOS 與 Android 有所不同: 此處合併列出,同一組代碼在不同平台上可能代表不同含義。Type 欄顯示來源符號(iOS/Android)。
在购买流程中引发的商店、收据与验证错误(9xxx 客户端段)。iOS 与 Android 有所不同: 此处合并列出,同一组代码在不同平台上可能代表不同含义。Type 列显示来源符号(iOS / Android)。
Codes
錯誤碼
错误码
| Field | Type | Description |
|---|---|---|
9006 | paymentInfoInvalid / ITEM_NOT_FOUND_CHECK_ITEM | iOS: the purchase info is invalid. Android: product not found on the pre-purchase inventory check. |
9007 | paymentProductNotFound / ITEM_NOT_FOUND_PURCHASE_ITEM | Product id not found. |
9008 | paymentVerificationInProgress / ITEM_IS_VERIFYING | A verification is already in progress. |
9009 | paymentCanceled / PAYMENT_CANCEL | Player canceled the purchase. |
9010 | NOT_SIGN_IN_GOOGLE_PLAY | Android: the player is not signed in to Google Play. |
9011 | NOT_REGISTER_ITEM | Android: the item / reward package is not registered. |
9012 | HAS_SUBSCRIPTION | Android: the player already owns an active subscription for this item. |
9013 | PRODUCT_IS_PENDING | Android: the purchase is pending (not yet completed). |
9014 | PURCHASE_FAILED_WITH_BILLING_ERROR | Android: purchase failed due to a Google Play billing error. |
9015 | PURCHASE_FAILED_NOT_CONTAIN_PURCHASE_LIST | Android: purchase failed. The returned purchase list did not contain the item. |
9016 | paymentRetrieveAppleReceiptFailed | iOS: could not read the App Store receipt. |
9017 | paymentOrderDataInvalid | iOS: the order data is invalid. |
9049 | paymentPending | iOS: the purchase is pending approval (deferred / Ask-to-Buy). |
| 欄位 | 型別 | 說明 |
|---|---|---|
9006 | paymentInfoInvalid / ITEM_NOT_FOUND_CHECK_ITEM | iOS: 購買資訊無效。Android: 購買前查詢庫存時找不到該商品。 |
9007 | paymentProductNotFound / ITEM_NOT_FOUND_PURCHASE_ITEM | 找不到商品 ID。 |
9008 | paymentVerificationInProgress / ITEM_IS_VERIFYING | 已有一項驗證正在進行中。 |
9009 | paymentCanceled / PAYMENT_CANCEL | 玩家取消了購買。 |
9010 | NOT_SIGN_IN_GOOGLE_PLAY | Android: 尚未登入 Google Play。 |
9011 | NOT_REGISTER_ITEM | Android: 道具/獎勵包未註冊。 |
9012 | HAS_SUBSCRIPTION | Android: 已擁有此項目的有效訂閱。 |
9013 | PRODUCT_IS_PENDING | Android: 購買處於待處理狀態(尚未完成)。 |
9014 | PURCHASE_FAILED_WITH_BILLING_ERROR | Android: 因 Google Play 帳務錯誤導致購買失敗。 |
9015 | PURCHASE_FAILED_NOT_CONTAIN_PURCHASE_LIST | Android: 購買失敗。回傳的購買清單未包含該項目。 |
9016 | paymentRetrieveAppleReceiptFailed | iOS: 無法讀取 App Store 收據。 |
9017 | paymentOrderDataInvalid | iOS: 訂單資料無效。 |
9049 | paymentPending | iOS: 購買正等待核准(延遲/需家長同意)。 |
| 字段 | 类型 | 描述 |
|---|---|---|
9006 | paymentInfoInvalid / ITEM_NOT_FOUND_CHECK_ITEM | iOS: 购买信息无效。Android: 购买前查询库存时找不到该商品。 |
9007 | paymentProductNotFound / ITEM_NOT_FOUND_PURCHASE_ITEM | 找不到商品 id。 |
9008 | paymentVerificationInProgress / ITEM_IS_VERIFYING | 已有一个验证正在进行中。 |
9009 | paymentCanceled / PAYMENT_CANCEL | 玩家取消了购买。 |
9010 | NOT_SIGN_IN_GOOGLE_PLAY | Android: 尚未登录 Google Play。 |
9011 | NOT_REGISTER_ITEM | Android: 道具 / 奖励包未注册。 |
9012 | HAS_SUBSCRIPTION | Android: 已拥有此项目的有效订阅。 |
9013 | PRODUCT_IS_PENDING | Android: 购买处于待处理状态(尚未完成)。 |
9014 | PURCHASE_FAILED_WITH_BILLING_ERROR | Android: 因 Google Play 结算错误导致购买失败。 |
9015 | PURCHASE_FAILED_NOT_CONTAIN_PURCHASE_LIST | Android: 购买失败。返回的购买列表未包含该商品。 |
9016 | paymentRetrieveAppleReceiptFailed | iOS: 无法读取 App Store 收据。 |
9017 | paymentOrderDataInvalid | iOS: 订单数据无效。 |
9049 | paymentPending | iOS: 购买正在等待批准(延迟 / 需家长同意)。 |
Social (9xxx)
Facebook and Instagram profile / share / invite failures.
Facebook 與 Instagram 的個人檔案/分享/邀請失敗。
Facebook 与 Instagram 的资料 / 分享 / 邀请失败。
Codes
錯誤碼
错误码
| Field | Type | Description |
|---|---|---|
9024 | facebookGetProfileNullResult | Facebook profile fetch returned no result. |
9026 | facebookShareEmptyPhoto | No photo supplied to share. |
9027 | facebookAppNotInstalled | Facebook app is not installed. |
9028 | facebookShareEmptyLink | No link supplied to share. |
9029 | facebookInviteFriendTitleAndMessageEmpty | Invite title and message are both empty. |
9030 | facebookShareCanceled | Player canceled the share. |
9031 | facebookInviteFriendCanceled | Player canceled the invite. |
9032 | instagramAppNotInstalled | Instagram app is not installed. |
9033 | instagramPhotoLibraryNotAllowed | Photo-library access not granted. |
9034 | instagramShareEmptyPhoto | No photo supplied to share. |
9035 | facebookUnsupported | Facebook feature not enabled in this build. |
9038 | instagramUnsupported | Instagram feature not enabled in this build. |
| 欄位 | 型別 | 說明 |
|---|---|---|
9024 | facebookGetProfileNullResult | Facebook 個人檔案取得未傳回任何結果。 |
9026 | facebookShareEmptyPhoto | 未提供要分享的相片。 |
9027 | facebookAppNotInstalled | 未安裝 Facebook 應用程式。 |
9028 | facebookShareEmptyLink | 未提供要分享的連結。 |
9029 | facebookInviteFriendTitleAndMessageEmpty | 邀請的標題與訊息皆為空。 |
9030 | facebookShareCanceled | 玩家取消了分享。 |
9031 | facebookInviteFriendCanceled | 玩家取消了邀請。 |
9032 | instagramAppNotInstalled | 未安裝 Instagram 應用程式。 |
9033 | instagramPhotoLibraryNotAllowed | 未授予相片庫存取權。 |
9034 | instagramShareEmptyPhoto | 未提供要分享的相片。 |
9035 | facebookUnsupported | 此版本未啟用 Facebook 功能。 |
9038 | instagramUnsupported | 此版本未啟用 Instagram 功能。 |
| 字段 | 类型 | 描述 |
|---|---|---|
9024 | facebookGetProfileNullResult | Facebook 资料获取未返回结果。 |
9026 | facebookShareEmptyPhoto | 未提供要分享的照片。 |
9027 | facebookAppNotInstalled | 未安装 Facebook 应用。 |
9028 | facebookShareEmptyLink | 未提供要分享的链接。 |
9029 | facebookInviteFriendTitleAndMessageEmpty | 邀请标题和消息均为空。 |
9030 | facebookShareCanceled | 玩家取消了分享。 |
9031 | facebookInviteFriendCanceled | 玩家取消了邀请。 |
9032 | instagramAppNotInstalled | 未安装 Instagram 应用。 |
9033 | instagramPhotoLibraryNotAllowed | 未授予相册访问权限。 |
9034 | instagramShareEmptyPhoto | 未提供要分享的照片。 |
9035 | facebookUnsupported | 此构建版本未启用 Facebook 功能。 |
9038 | instagramUnsupported | 此构建版本未启用 Instagram 功能。 |
In-app ads (9xxx)
ironSource and Meta Audience Network ad failures.
ironSource 與 Meta Audience Network 的廣告失敗。
ironSource 与 Meta Audience Network 的广告失败。
Codes
錯誤碼
错误码
| Field | Type | Description |
|---|---|---|
9040 | ironSourceUnsupported | ironSource not enabled in this build. |
9041 | ironSourceMissingUserID | Missing ad user id. |
9042 | ironSourceMissingConfig | ironSource config missing. |
9043 | ironSourceConfigInvalidFormat | ironSource config malformed. |
9044 | ironSourcePlacementNameNotMatched | Placement name not found. |
9045 | ironSourcePlacementCapped | Placement is capped. |
9046 | ironSourceControllerToPresentNotFound | No screen available to present the ad. |
9048 | metaAdInvalid | Meta ad is invalid / not ready. |
| 欄位 | 型別 | 說明 |
|---|---|---|
9040 | ironSourceUnsupported | 此版本未啟用 ironSource。 |
9041 | ironSourceMissingUserID | 缺少廣告使用者 ID。 |
9042 | ironSourceMissingConfig | 缺少 ironSource 設定。 |
9043 | ironSourceConfigInvalidFormat | ironSource 設定格式錯誤。 |
9044 | ironSourcePlacementNameNotMatched | 找不到版位名稱。 |
9045 | ironSourcePlacementCapped | 版位已達上限。 |
9046 | ironSourceControllerToPresentNotFound | 沒有可用來顯示廣告的畫面。 |
9048 | metaAdInvalid | Meta 廣告無效/尚未就緒。 |
| 字段 | 类型 | 描述 |
|---|---|---|
9040 | ironSourceUnsupported | 此构建版本未启用 ironSource。 |
9041 | ironSourceMissingUserID | 缺少广告用户 id。 |
9042 | ironSourceMissingConfig | 缺少 ironSource 配置。 |
9043 | ironSourceConfigInvalidFormat | ironSource 配置格式错误。 |
9044 | ironSourcePlacementNameNotMatched | 找不到广告位名称。 |
9045 | ironSourcePlacementCapped | 广告位已达展示上限。 |
9046 | ironSourceControllerToPresentNotFound | 没有可用于展示广告的屏幕。 |
9048 | metaAdInvalid | Meta 广告无效 / 未就绪。 |
General & availability (9xxx)
Cross-cutting client errors any flow can surface, plus feature-availability sentinels. Customer support surfaces an error with the string code invalid_payload. (Reserved/unused: 9004, and 9010 to 9015.)
任何流程都可能出現的橫切用戶端錯誤,以及功能可用性的哨符值。客戶支援會以字串碼 invalid_payload 呈現一個錯誤。(保留/未使用:9004、9010 至 9015)
任何流程都可能暴露的横切客户端错误,以及功能可用性哨兵值。客户支持会以字符串码 invalid_payload 暴露一个错误。(保留 / 未使用:9004、9010 至 9015)
Codes
錯誤碼
错误码
| Field | Type | Description |
|---|---|---|
9000 | undefined | Undefined / unknown error. |
9001 | networkFailed | Network request failed (retryable). |
9002 | wrongDataFormat | Malformed response data. |
9003 | cancelLogin | Login canceled (SDK band). |
9005 | googleRefreshTokenFailed | Google token refresh failed. |
9018 | appleCredentialNotFoundInAuthorizationResult | Apple authorization returned no credential. |
9019 | googleConfigNotFound | Google config missing. |
9020 | facebookConfigNotFound | Facebook config missing. |
9021 | appleTwoAuthenticationError | Sign in with Apple 2FA error. |
9022 | appleCancelError | Player canceled Sign in with Apple. |
9023 | appleOtherError | Other Sign in with Apple error. |
9025 | appleCachedCredentialNotFound | No cached Apple credential. |
9036 | googleUnsupported | Google login not enabled in this build. |
9037 | vgaUnsupported | VGA login not enabled in this build. |
9047 | firebaseUnsupported | Firebase not enabled in this build. |
| 欄位 | 型別 | 說明 |
|---|---|---|
9000 | undefined | 未定義/未知的錯誤。 |
9001 | networkFailed | 網路請求失敗(可重試)。 |
9002 | wrongDataFormat | 回應資料格式錯誤。 |
9003 | cancelLogin | 登入已取消(SDK 分段)。 |
9005 | googleRefreshTokenFailed | Google 權杖重新整理失敗。 |
9018 | appleCredentialNotFoundInAuthorizationResult | Apple 授權未傳回任何憑證。 |
9019 | googleConfigNotFound | 缺少 Google 設定。 |
9020 | facebookConfigNotFound | 缺少 Facebook 設定。 |
9021 | appleTwoAuthenticationError | 使用 Apple 登入的兩階段驗證錯誤。 |
9022 | appleCancelError | 玩家取消了使用 Apple 登入。 |
9023 | appleOtherError | 其他使用 Apple 登入的錯誤。 |
9025 | appleCachedCredentialNotFound | 沒有快取的 Apple 憑證。 |
9036 | googleUnsupported | 此版本未啟用 Google 登入。 |
9037 | vgaUnsupported | 此版本未啟用 VGA 登入。 |
9047 | firebaseUnsupported | 此版本未啟用 Firebase。 |
| 字段 | 类型 | 描述 |
|---|---|---|
9000 | undefined | 未定义 / 未知错误。 |
9001 | networkFailed | 网络请求失败(可重试)。 |
9002 | wrongDataFormat | 响应数据格式错误。 |
9003 | cancelLogin | 登录已取消(SDK 段)。 |
9005 | googleRefreshTokenFailed | Google 令牌刷新失败。 |
9018 | appleCredentialNotFoundInAuthorizationResult | Apple 授权未返回凭据。 |
9019 | googleConfigNotFound | 缺少 Google 配置。 |
9020 | facebookConfigNotFound | 缺少 Facebook 配置。 |
9021 | appleTwoAuthenticationError | Sign in with Apple 双重验证(2FA)错误。 |
9022 | appleCancelError | 玩家取消了 Sign in with Apple。 |
9023 | appleOtherError | 其他 Sign in with Apple 错误。 |
9025 | appleCachedCredentialNotFound | 没有缓存的 Apple 凭据。 |
9036 | googleUnsupported | 此构建版本未启用 Google 登录。 |
9037 | vgaUnsupported | 此构建版本未启用 VGA 登录。 |
9047 | firebaseUnsupported | 此构建版本未启用 Firebase。 |