All engines
Regardless of the development engine (Unity, Unreal, ...) and platform (Android, iOS, ...), the Hive SDK settings are defined in the hive_config.xml file before building the app. Therefore, to use the Hive SDK, you must create a new hive_config.xml file, enter the contents, and include it in your app project. The settings in this file are applied when the Hive SDK is initialized. It is recommended to pre-define all static items that are not changed at runtime in this file. The file should be located at the following location:
- Unity
- Android
- Unity 2021 or later:
/Assets/HiveSDK/hive.androidlib/src/main/res/raw/hive_config.xml - Unity 2021 or earlier:
/Assets/Plugins/Android/res/raw/hive_config.xml
- Unity 2021 or later:
- iOS
/Assets/Plugins/iOS/hive_config.xml
- Windows
/Assets/Plugins/Windows/res/hive_config.xml
- Android
- Unreal Engine
- Android
/HIVESDK/Source/HIVESDK/ThirdParty/android/resource/res/raw/hive_config.xml
- iOS
/HIVESDK/Source/HIVESDK/ThirdParty/iOS/resource/hive_config.xml
- Windows
/HIVESDK/Source/HIVESDK/ThirdParty/Windows/config/hive_config.xml
- Android
- Android Native
/app/res/raw/hive_config.xml
- iOS Native
- Create a hive_config.xml file at your desired location and connect it directly to your Xcode project.
Hive SDK common settings¶
These are the items that must be entered in hive_config.xml regardless of which Hive SDK feature you are using. The required items must be entered, and the optional items are entered as needed. If you do not enter the optional items, the Hive SDK will operate with the default values.
Item | Description | Required | SDK Default |
---|---|---|---|
appId | Identifier for the game build. | X | Android: App default package name, iOS: Bundle ID |
zone | The server to which the Hive client connects.
| X | `REAL` |
useLog | Whether to enable logging for the internal operation of the Hive client. If logging is enabled, logs are output to the development tool screen.
| X | `false` |
company | Game publishing company.
| O | Blank |
channel | Login service platform used in the game app. C2S: Hive platform (default) | O | `C2S` |
market | Market for in-app purchase payments.
| O | Blank |
httpConnectTimeout | HTTP Connect timeout time (seconds) used internally by the Hive client. The default value is 8 seconds, and changing the value is prohibited unless there are special circumstances. | X | `8`(Unit: seconds) |
httpReadTimeout | HTTP Read timeout time (seconds) used internally by the Hive client. The default value is 8 seconds, and changing the value is prohibited unless there are special circumstances. | X | `8`(Unit: seconds) |
gameLanguage | Game language set in the Hive SDK. | X | `en` |
ageGateU13 | COPPA ageGateU13 application. To apply COPPA ageGateU13 to the Hive SDK, you must register the COPPA terms in the Hive console and set this value to true before initializing the Hive SDK. If you do not want to apply COPPA ageGateU13, you must register terms other than the COPPA terms in the Hive console and set this value to false before initializing the Hive SDK.
| X | `false` |
agreementDetermineBase | Determines the basis for obtaining consent to the terms of service. You can choose either `device` or `account`, and the default is `device`.
| X | `device` |
Note
When applying COPPA ageGateU13, only device
-based terms of service consent popup can be displayed. When applying COPPA ageGateU13, if a user responds that they are 13 years or older during the terms of service consent process, the Hive SDK will not apply COPPA ageGateU13 to that user. However, the value (true
) set in hive_config.xml itself will not change.
Hive SDK feature-specific settings¶
These are the items that must be entered in hive_config.xml for each Hive SDK feature that you will use. Enter only the items that correspond to the Hive SDK features that you will use. Here, we will guide you through the items that must be set when using the authentication product (Google login) as an example. Refer to the "Getting Started" page for each Hive SDK feature to find out which items are required for each Hive SDK feature.
Item | Description |
---|---|
providers | Specifies attribute values for third-party libraries. |
A child element of the providers element, it adds Google-related settings used when authenticating with authentication v4. To implement Google login on desktops, you must add a `clientId` attribute within this element and enter the Client ID issued from Google Cloud Console as the attribute value. To implement Google login on Steam Deck (Hive SDK v4 Unity Windows 22.0.0 or later), you must add a `deviceFlowClientId` attribute within this element and enter the Client ID issued from Google Cloud Console as the attribute value. |
Unsupported settings¶
The following are the items in the hive_config.xml file that are no longer supported:
Item | Description | Notes |
---|---|---|
exitEventEnabled | The exitEvent is an event that notifies the Hive SDK that the app needs to be terminated directly by the game, not by the Hive SDK. If this value is True, it will receive this event and the Hive SDK will not terminate the game app directly. If this value is False, the Hive SDK can terminate the game app directly (+v4.9.0). | Deprecated since v4.16.4 |
useCrashReport | An iOS-only feature that detects the situation immediately before the app crashes due to an error and saves the analytics logs waiting to be sent to the server to a file. If you are using an external third-party crash reporter with similar functionality, you should disable it by setting it to false to prevent conflicts (+v4.16.0). | Deprecated since v4.16.3 |
hive_config.xml example¶
Below is an example of a hive_config.xml file when using authentication (Google authentication) and payment (Google Play Store). Change, add, or delete values as needed for the Hive SDK features you want to use and the app environment. Since the iOS platform only supports Apple AppStore payments, set the market to AP
in the Unity iOS environment.
<properties>
<!-- Hive SDK Common Settings: START -->
<appId>com.sample.your</appId>
<gameLanguage>en</gameLanguage>
<!-- Hive platform server selection. Sandbox is for development, real is for commercial use
(sandbox, real) -->
<zone>real</zone>
<!-- SDK internal operation log usage setting
(true, false) -->
<useLog>false</useLog>
<!-- Company setting
(C2S: Com2uS, GVI: Com2uS Holdings) -->
<company>C2S</company>
<!-- Channel setting
(C2S: Hive platform) -->
<channel>C2S</channel>
<!-- Payment market setting
(GO: Google Play, LE: Com2us Lebi, AP: Apple App Store) -->
<market>GO</market>
<!-- HTTP Connect Timeout time in seconds used internally by Hive SDK
(Do not change unless there are special circumstances) -->
<httpConnectTimeout>8</httpConnectTimeout>
<!-- HTTP Read Timeout time in seconds used internally by Hive SDK
(Do not change unless there are special circumstances) -->
<httpReadTimeout>8</httpReadTimeout>
<agreementDetermineBase>device</agreementDetermineBase>
<!-- Hive SDK Common Settings: END -->
<!-- Hive SDK Feature-Specific Settings: START -->
<!-- Authentication product setting: Using Google authentication -->
<providers>
<google playAppId="123456789012" clientId="123456789012-abc.apps.googleusercontent.com" serverClientId="123456789012-abc.apps.googleusercontent.com" reversedClientId="com.googleusercontent.apps.123456789012-abc" deviceFlowClientId="331526026701-gn1abq1ev23nqj7rdvvlaamf7ii4f3u9.apps.googleusercontent.com" />
</providers>
<!-- Hive SDK Feature-Specific Settings: END -->
</properties>