05/15/2024 15:19:45

Configure MSDK Environment

I. Overview

MSDKConfig.ini contains MSDK's environment Configuration and the application information Configuration of each channel. When these Configurations apply for application in the Feiying System, they are generated once. It is only needed to fill in this ini file.

In the Unity Editor environment, when you click the menu MSDK-> MSDKConfig.ini Settings, you can edit the configuration information. After the configuration information is edited, it will be automatically synchronized to Android and iOS files.
Unity ConfigINI 文件配置

Location of MSDKConfig.ini file in Unity projec:

  • Android is below Assets/Plugins/Android/assets/ directory
  • iOS is in Assets/Plugins/iOS/GCloudSDK/MSDKCore/MSDKAppSetting.bundle/

Location of MSDKConfig.ini file in the UnrealEngine project:

  • Android is below Plugins/xxx/MSDKCore/Source/MSDKCore/lib/Android/assets directory
  • iOS is in Plugins/xxx/MSDKCore/Source/MSDKCore/lib/iOS/MSDKCore/MSDKCore.embeddedframework.zip/MSDKAppSetting.bundle/

The Configuration file is in the form of Key-Value, uses # to indicate comments and use [] to indicate different modules. These Configurations can be delivered via the MSDK backend control.

  • The order in which the Configurations are drawn is:
    Cloud Control > MSDKConfig.ini

[info] Special reminding
(1) bool type: true is 1, false is 0
(2) MSDK's related switches are prefixed with MSDK_
(3) Channel-related fields are not required

II. Configure the environment

2.1 Configure MSDK DEBUG mode

  • MSDK_DEBUG switch controls global debugging. SettingMSDK_DEBUG to 0 can disable the DEBUG mode of all plugins.
  • MSDK_DEBUG is used with MSDK_DEBUG_CHANNEL. Only when the MSDK_DEBUG switch is turned on can you control the debugging information of channel plugins by configuring 'MSDK_DEBUG_CHANNEL'. Multiple channels should be separated with commas.

1) Configuration example

MSDK_DEBUG = 1                                                        
MSDK_DEBUG_CHANNEL = Beacon,Bugly,TDM,Adjust,AppsFlyer,XG,QQ

2)Description

Currently MSDK_DEBUG is enabled, indicating that global debugging is enabled.MSDK_DEBUG_CHANNEL Set the corresponding channel name, indicating that the debugging function of these channel plug-ins is currently enabled.
When MSDK_DEBUG is set to 0, the configuration of MSDK_DEBUG_CHANNEL is invalid.

[info] Warning
Before a game is officially released, it is recommended to turn off the DEBUG mode and set MSDK_DEBUG to 0.

2.2 MSDK DISABLE LOG mode configuration

Starting from version 5.30.001, MSDK has added the configuration to completely disable MSDK log. By default, this field is in a comment state.

1) Configuration example

MSDK_ DISABLE_ LOG=1

2) Description

When MSDK_ DISABLE_ When LOG=1, no MSDK logs are output at all. This field is effective for all channels, with priority greater than MSDK_ DEBUG configuration field

2.3 Required fields for MSDK Environment Configuration

[info] Special Reminder
In order to reduce the configure options in MSDKConfig.ini file, the configure options that are not frequently changed in SDK should be deleted, but they have default values. If a game needs to change a configuration item, it can directly add the item into MSDKConfig.ini file.

Field Term interpretation Remarks
MSDK_URL MSDK backend service domain name, Fill in according to Background Environment Description Required; for more details, contact frandchen@tencent.com
MSDK_GAME_ID MSDK's unique identifier used to mark a game, assigned by Feiying System Required
MSDK_SDK_KEY Encryption key communicating with the backend Required
MSDK_POP_URL Domain name of MSDKPopup universal popup background service
Domain name of the game test: pop-hktest.itop.qq.com
Domestic official domain name: pop-release.itop.qq.com
Optional
MSDK_DEBUG Whether or not to enable MSDK's log function? The default is to enable Required. If you go online, it is suggested Disenabled, so as to avoid performance problems
MSDK_DEBUG_CHANNEL Third-party channel debugging, optional values: Beacon, Bugly, TDM, Adjust, AppsFlyer, XG, Twitter, Garena, Firebase,QQ Used with MSDK_DEBUG. The MSDK_DEBUG_CHANNEL setting takes effect when the value of MSDK_DEBUG is 1
MSDK_DISABLE_LOG Completely disable MSDK logs
MSDK_LIFECYCLE_OBSERVERS Android lifecycle monitoring channel; multiple channels should be separated by commas, such as "QQ, WeChat" Required for Android
MSDK_HTTP_TIMEOUT Timeout duration for the backend request, in seconds, defaulted as 15s -
MSDK_HTTPDNS_ENABLE Whether or not to enable DNS parsing and network optimization? defaulted as 1 (enabled) -
MSDK_IPV6_ENABLE IPV6 switch, defaulted as 0 (off) -
MSDK_LOGIN_OVERTIME Login timeout duration, in seconds, defaulted as 30s. The combined time with MSDK_HTTP_TIMEOUT is the time of the entire login timeout -
MSDK_REFRESH_INTERVAL Time interval for the automatic refresh of login channel's token, in seconds, default as half an hour 60*30s -
MSDK_LIFECYCLE_SCHEME Whether or not to enable the third-party app to launch the data transfer function? defaulted as 0 (disabled) Only when accessing the third-party startup function do Android and iOS need to configure the startup protocol and the configuration item
MSDK_KEYCHAIN_ENABLE Whether or not to enable keychain to ensure that Guest ID can be retrieved? defaulted as 1 (enabled). Only iOS optionally configures this
MSDK_ENCRYPT_STORAGE File encryption switch, defaulted as 0 (off) To comply with GDPR specifications, this configuration item is used to enable or disable file encryption. To keep the existing online business scene, it is defaulted as off. Only the games newly accessing MSDK need to enable this configuration item to comply with GDPR specifications, but the existing games already accessing MSDK do not need to enable this configuration item. Once the configuration item is enabled and the project goes online, this configuration item can no longer be disabled.
MSDK_DEVICE_INFO Get the device information, defaulted as 1 (enabled) In order to comply with GDPR specifications, this configuration item is used to enable or disable the function of obtaining device information. To maintain the existing online business scene, it is defaulted as enabled. Once this configuration item is disabled, the MSDKUtils::GetDeviceInfoWrapper() method will no longer return any device information.
MSDK_V2_SIGN_ENABLE V2 signature switch, defaulted as 1 (enabled) Android optionally configures this only. MSDK supports both V1 and V2 signatures. When the channel number of the Feiying management tool is packaged, it supports the write/read logic of Android V2 signature package. To enable V2 signature package, you must turn on this switch (otherwise, the channel number will be read wrongly when the Feiying channel package tool is used).
Remarks: 5.5.000 version's configuration file has deleted the MSDK_V2_SIGN_ENABLE field, and V2 signature is enabled by default. If you use V1 signature, you need to manually configure this field and set it to 0.
MSDK_LBS_GPS_TIMEOUT LBS function's GPS positioning timeout duration, in millisecond, defaulted as 4000ms, that is 4s Optional for Android platform
MSDK_AUTOLOGIN_NOT_PLUGIN_CHANNEL This configuration item is used to set that automatic login does not call plugins. If this configuration item is mot set, this means that automatic login calls plugins by default Currently, only the automatic login of Google and Garena channels will call plugins. You can set the channel name as "not call plugins". Multiple channels should be separated by commas
MSDK_MIGRA_GUEST_FROMV3_ENABLE Whether or not to enable the guest data migration of V3? 1: enable; 0: disable; defaulted as 0. Note: Make sure MSDK_KEYCHAIN_ENABLE is enabled When the game is upgraded from MSDKV3 version to MSDKV5, it should make sure that the guest will not be lost after the guest login of V3 is upgraded to V5.

[info] Special reminders for V3 guest migration

  1. Do not change the original project's QQ-AppId and WeChat AppId parameters
  2. Do not change the Keychain Sharing parameter configuration of the original iOS XCode project.

2.4 Crash Reporting Configuration

Field Term interpretation Remarks
CRASH_REPORT_ENABLE Whether or not to report Crash? the default is 1 --
CRASH_REPORT_CHANNEL Statistics channel list which need to be initialized, separated with comma --
CRASH_UPDATE_USER_ID This item is used to control whether setUserId is called in the login/logout callback to update Bugly or Firebase information. It is defaulted as 1 (enabled) optional, defaulted as enabled. If you have special debugging requirements, you can set it to 0 (disabled) and then use the setUserId interface alone to set user ID
BUGLY_CLOSE_ERROR_CALLBACK_ANDROID Used to shield the error type of callbacks, disabled by default, this configuration item is only available on Android Optional, disabled by default. When the item is enabled, the error type of callbacks will be shielded, but other types of callbacks can normally trigger reporting. 5.10 and higher versions

2.5 GameCenter Reporting Configuration

Field Term interpretation Remarks
MSDK_GAMECENTER_KEEPLOGIN_ENABLE Does the GameCenter channel enable continuous login? No by default, that is, disabled by default Only iOS platform optionally sets this configuration item, 1: after GameCenter fails to log in for the first time, every time the backend is switched to the front end and continues to try to log in.
0: the backend is switched to the front end and no longer inquires GameCenter login

2.6 WeChat Channel Configuration

Field Term interpretation Remarks
WECHAT_APP_ID WeChat channel's APP ID --
WECHAT_AUTO_REFRESH_ENABLE Does WeChat Channel refresh token? Yes by default, that is, 1 (refresh) --

2.7 QQ channel Configuration

Field Term interpretation Remarks
QQ_APP_ID QQ channel's APP ID --

2.8 Facebook Channel Configuration

Field Term interpretation Remarks
FACEBOOK_DISPLAYNAME Fill in on your own according to the project; similar to: MSDK joint test --
FACEBOOK_APP_ID Facebook channel's APP ID --

2.9 TDM Configuration

Field Term interpretation Remarks
TDM_SRC_ID src_id that needs to be passed in when the game makes TDM reporting --

2.10 Beacon Configuration

Field Term interpretation Remarks
BEACON_APP_KEY Beacon's App Key --
BEACON_DEBUG Whether or not to enable debug? --

2.11 Adjust Configuration

Field Term interpretation Remarks
ADJUST_OPEN_DEEPLINK_ENABLE Whether to enable the deeplink function? defaulted as 0 (disabled) -
ADJUST_COPPA_COMPLIANT_ENABLE Whether to enable the CoppaCompliance function; the default value is 0, which means not to enable it Optional
ADJUST_PLAYSTORE_KIDS_APP_ENABLE Whether to enable the PlayStoreKidsApp function; the default value is 0, which means not to enable it Optional, unique to Android
ADJUST_APP_TOKEN_ANDROID Android App token -
ADJUST_INFO1_ANDROID Optional Android client feature value Optional
ADJUST_INFO2_ANDROID Optional Android client feature value Optional
ADJUST_INFO3_ANDROID Optional Android client feature value Optional
ADJUST_INFO4_ANDROID Optional Android client feature value Optional
ADJUST_APPSECRET_ANDROID Android App Key switch, which is empty by default To set Android App Key, this option must be set to a value
ADJUST_APP_TOKEN_IOS iOS App token -
ADJUST_INFO1_IOS Optional iOS client feature value Optional
ADJUST_INFO2_IOS Optional iOS client feature value Optional
ADJUST_INFO3_IOS Optional iOS client feature value Optional
ADJUST_INFO4_IOS Optional iOS client feature value Optional
ADJUST_APPSECRET_IOS iOS App Key switch, defaulted as -1 To set an iOS app key, this option must be set to a value other than -1

2.12 AppsFlyer Configuration

Field Term interpretation Remarks
APPSFLYER_APP_ID_IOS AppsFlyer's iOS APP ID -
APPSFLYER_APP_KEY_IOS AppsFlyer's iOS APP KEY -
APPSFLYER_APP_KEY_ANDROID AppsFlyer's Android APP KEY -
FIREBASE_SENDER_ID Firebase's sender ID -

2.13 TPNS configuration - MSDKV5.10 and higher versions

Field Term explanation Remarks
XG_ACCESS_ID_IOS [XG channel] (../Channel/XGTPNS/README.md)’s Access ID, used by iOS end -
XG_ACCESS_KEY_IOS [XG channel] (../Channel/XGTPNS/README.md)’s Access KEY, used by iOS end -
XG_ACCESS_ID_ANDROID XG channel’s Access ID, used by Android end -
XG_ACCESS_KEY_ANDROID XG channel’s Access KEY, used by Android end -
XG_SHOW_FOREGROUND_ALERT XG iOS front-end push switch; disabled by default -
XG_OTHER_ENABLE Does XG support other manufacturers' channel? No, not supported by default -
XG_XIAOMI_ENABLE Does XG support Xiaomi channel? Yes, supported by default -
XG_XIAOMI_APP_ID XG Xiaomi channel's APP ID -
XG_XIAOMI_APP_KEY XG Xiaomi channel's APP Key -
XG_HUAWEI_ENABLE Does XG support Huawei channel? Yes, supported by default -
XG_FLYME_ENABLE Does XG support Flyme channel? Yes, supported by default -
XG_FLYME_APP_ID XG Flyme channel's APP ID -
XG_FLYME_APP_KEY XG Flyeme channel's APP Key -
XG_HOST XG access point domain name -
XG_PORT XG access point port -
XG_FREE_ACCESS_ID_IOS XG free version's access_id; after being configured, the ID is used to avoid the problem of pushing duplicate messages when the messages are pushed on the two platforms, that is, [old version of XG] and [Tencent mobile push], at the same time -

2.14 Bugly Channel Configuration

Field Term interpretation Remarks
BUGLY_APP_ID_ANDROID Android APP ID of Bugly channel -
BUGLY_APP_ID_IOS iOS APP ID of Bugly channel -
BUGLY_UNEXPECTED_TERMINATE_DETECTION_ENABLE_IOS Abnormal exit event recording switch. It is disabled by default. This configuration is only available in iOS. Optional, disabled by default. When the switch enabled, the system can capture exceptions like SIGKILL, which refers to an abnormal exit event. "SIGKILL" is generally not a user or developer problem, but a situation that the system issues "SIGKILL" to force the program to end directly when the program has entered the "suspend" state and applicationDidEnterBackground has been called back. For example, the user double-clicks the "Home" button to kill the running process to end the operation of his program.

2.15 WebView Configuration

Field Term interpretation Remarks
WEBVIEW_SHARE_CHANNEL JS's sharing channel; support QQ, WeChat and Facebook. When the item is set to NONE, the "Share" button will not be displayed -
WEBVIEW_IS_FULLSCREEN Is Webview in the full screen? No by default -
WEBVIEW_PORTRAIT_BAR_HIDEABLE Whether to hide the menu bar when the screen is in the portrait mode? Yes by default -
WEBVIEW_LANDSCAPE_BAR_HIDEABLE Whether to hide the menu bar when the screen in the landscape mode? Yes by default -
WEBVIEW_X5_CLOSE_ANDROID Whether Webview Android closes the X5 kernel; 1 by default, meaning to disable x5 kernel -
WEBVIEW_X5_UPLOAD_ANDROID Webview Android can upload files under X5 kernel; defaulted as 1 (can upload) -
WEBVIEW_URL_KEY_FILTER User-defined sensitive field filtering -

2.16 Google Channel Configuration

Field Term interpretation Remarks
GOOGLE_APP_ID APP ID of Google channel -
GOOGLE_CLIENT_KEY client key of Google channel -
GOOGLE_EVERY_LOGIN_CHOICE_USER Whether to perform a plugin logout before login; defaulted as 0 (not log out). Plugin logout before login, that is, there is a user selection UI for each login
MSDK_GOOGLE_LOGOUT_NEED_CONNECT When Google logs out in the non-connect state, does the configuration execute a "connect" and then log out. Defaulted as 0 (not execute) -

2.17 Twitter Channel Configuration

Field Term interpretation Remarks
TWITTER_KEY key of Twitter channel -
TWITTER_SECRET secret of Twitter channel -

2.18 MSDK self-built account configuration

Include email and SMS channels.

Field Term interpretation Remarks
MSDK_ACCOUNT_URL The backend environment of the self-built account joint debugging server: https://cotest.msdkpass.com
Official server: https://us.msdkpass.com
MSDK_ACCOUNT_SDK_KEY Key of Self-built Account -
MSDK_ACCOUNT_APP_ID Appid of Self-built Account -

2.19 Garena configuration

Field Description Remarks
GARENA_APP_SDK_ASSIGN_ID assignId of Garena Channel Required for Android
GARENA_APP_SDK_KEY appKey of Garena channel Required
GARENA_LOGIN_TITLE For Garena Web login, the user can set the user-defined title; empty by default Optional for Android

2.20 LINE configuration

Field Description Remarks
LINE_CHANNEL_ID channelID configuration of Line Channel Required
LINE_CHECK_SDK_VERSION_ENABLE Whether to verify the SDK version running on the Android device. Line SDK at least requires the system version to be 4.2 and higher. Defaulted as 1 (enabled) Optional for Android

2.21 Notice configuration

Field Term explanation Remarks
NOTICE_INTERVAL_REQUEST Time interval, in seconds, 300s (5min) by default When the notice-getting interface is called with the same parameters within the time interval, SDK will directly return the data cached by the client last time instead of going to the backend to draw the data



Copyright © 2024 MSDK.
All rights reserved.

results matching ""

    No results matching ""