All engines
Regardless of the development engine (Unity, Unreal, ...) and platform (Android, iOS, ...), the SDK settings must be defined in the hive_config.xml file at the point before building the app. Therefore, to use the SDK, you must create a new hive_config.xml file, enter the content, and include it in your app project. The settings in this file apply at the point of initializing the SDK. It is recommended to pre-define all static items that do not change at runtime in this file. The file should be located at the path below.
- Unity
- Android
- Unity 2021 and above:
/Assets/HiveSDK/hive.androidlib/src/main/res/raw/hive_config.xml - Unity below 2021:
/Assets/Plugins/Android/res/raw/hive_config.xml
- Unity 2021 and above:
- 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 the hive_config.xml file in the desired location and link it directly to the Xcode project
SDK common settings¶
Regardless of which SDK feature you use, it is fundamentally an item that must be entered in hive_config.xml. Required items must be entered, while optional items are entered as needed. If optional items are not entered, the SDK will operate with the default values.
| Item | OS | Description | Required | SDK Default |
|---|---|---|---|---|
| appId | Android, iOS, Windows | Game build identifier. | X |
|
| zone | Android, iOS, Windows | The server that the SDK client will connect to.
| X | `real` |
| useLog | Android, iOS, Windows | Whether to enable logging for the internal operations of the SDK client. When logging is enabled, logs will be output to the development tool screen.
| X | `false` |
| ageGateU13 | Android, iOS, Windows | COPPA ageGateU13 application status. To apply COPPA ageGateU13 to the SDK, you must register the COPPA terms in the Console and set this value to true before initializing the SDK. If you do not want to apply COPPA ageGateU13, you must register terms other than COPPA in the Console and set this value to false before initializing the SDK.
| X | `false` |
| hiveOrientation | Android, iOS, Windows | The UI of the SDK will be displayed according to the device orientation settings.
| X | 'undefined' |
| channel | Android, iOS, Windows | The platform for login and in-app support services used in the game app. If you log in to external social media or use in-app purchases through the SDK, it corresponds to C2S. Used for SDK Analytics data collection.
| O | `C2S` |
| market | Android, iOS, Windows | This is the market for processing in-app purchases. It is used for SDK Analytics collection.
| O | Blank value |
| agreementDetermineBase | Android, iOS | Determines the criteria for obtaining agreement to the terms. You can choose either `device` or `account`, with the default being `device`.
| X | `device` |
| authV1Agreement | Android, iOS | SDK v1 or SDK C2S individual module specific settings, selects the UI of the terms to be displayed as Authentication v1 or v4. Games using SDK v4 do not set this and are not affected by the default.
| X | `true` |
| unsupportedUAShareType | Android | Android-specific settings, when using the Promotion User Acquisition (UA) Share feature, sets the sharing apps that will not be displayed as icons. The specified targets will not show icons in the UI.
| X | Blank value |
| httpConnectTimeout | Android, iOS, Windows | The timeout duration (in seconds) for HTTP Connect used internally by the SDK client.
| X | `8` (unit: seconds) |
| httpReadTimeout | Android, iOS, Windows | The HTTP Read timeout duration (seconds) used internally by the SDK client.
| X | `8` (unit: seconds) |
| usePrivateBrowsingForAuth | Windows | Determines whether to use incognito mode during Google login authentication.
| X | true |
Note
When applying COPPA ageGateU13, only the device-based consent popup can be displayed.
When applying COPPA ageGateU13, if any user responds that they are 13 years or older during the consent process, the SDK will not apply COPPA ageGateU13 to that user. However, the value set in hive_config.xml (true) itself does not change.
SDK feature settings¶
Settings for the SDK features you want to use, such as Authentication, Billing, and Marketing Attribution. Enter only the items corresponding to the SDK features you will use in hive_config.xml. For more details, please refer to the preparation page of each SDK feature developer guide as shown below.
Unsupported configuration¶
hive_config.xml The items in the file are as follows, which are no longer supported.
| Item | Description | Remarks |
|---|---|---|
| usePush | Sets whether Notification is used. | Deprecated from v4.16.2 |
| permissions | Android This is an Android-specific setting that controls whether Android permissions managed by SDK are used. The permissions settings allow controlling external storage access permissions through the sdwrite setting. | Deprecated from v4.16.2 |
| useCrashReport | iOS This is an iOS-specific feature that detects the situation just before the app crashes due to an error and saves the Analytics logs waiting to be sent to the server as a file. If using an external third-party crash reporter with similar functionality, it should be set to false to disable it for collision prevention. (+v4.16.0) | Deprecated from v4.16.3 |
| exitEventEnabled | Android iOS The exitEvent indicates that the game should directly exit the app instead of the SDK. If this value is True, this event will be received, and at this time, the SDK will not directly exit the game app. If this value is False, the SDK can directly exit the game app. (+v4.9.0). | Deprecated from v4.16.4 |
| company | Android iOS Windows Sets the name of the game publishing company. | Deprecated from v4.23.0 |
| gameLanguage | Android iOS This is the game language set in the SDK. | Deprecated from v4 25.2.0 |
hive_config.xml example¶
Below is an example of the hive_config.xml file when using Authentication (Google authentication) and Billing (Google Play Store). Please change, add, or delete values according to the SDK features you want to use and the app environment. The iOS platform only supports Apple App Store Billing, so in the Unity iOS environment, set the market to AP.
<properties>
<!-- SDK Common Settings: START -->
<!-- Set unique game build identifier -->
<appId>com.sample.your</appId>
<!-- Select Hive Platform server. sandbox for development, real for production
(sandbox, real) -->
<zone>real</zone>
<!-- Set whether to use SDK internal operation logs
(true, false) -->
<useLog>false</useLog>
<!-- Set whether to apply ageGateU13
(true, false) -->
<ageGateU13>false</ageGateU13>
<!-- hiveOrientation setting -->
<hiveOrientation>landscape</hiveOrientation>
<!-- Channel setting (login and in-app support service platform)
(C2S: Hive Platform) -->
<channel>C2S</channel>
<!-- Billing market setting (GO: Google Play, LE: Com2uS Lebi, AP: Apple App Store) -->
<market>GO</market>
<!-- Set criteria for receiving agreement to terms
(device, account) -->
<agreementDetermineBase>false</agreementDetermineBase>
<!-- Set terms exposure design (not set for SDK v4)
(true, false) -->
<!-- <authV1Agreement>device</authV1Agreement> -->
<!-- Set sharing apps not to be displayed for Promotion UA Share (Android Only) -->
<unsupportedUAShareType>
<value>SMS</value>
<value>URL</value>
</unsupportedUAShareType>
<!-- Set HTTP Connect Timeout used internally by SDK in seconds
(Do not change unless in special cases) -->
<httpConnectTimeout>8</httpConnectTimeout>
<!-- Set HTTP Read Timeout used internally by SDK in seconds
(Do not change unless in special cases) -->
<httpReadTimeout>8</httpReadTimeout>
<!-- SDK Common Settings: END -->
<!-- SDK Analytics Settings: START -->
<!-- Analytics settings, refer to Analytics pre-configuration guide -->
<!-- SDK Analytics Settings: END -->
<!-- SDK Feature Settings: START -->
<providers>
<!-- Set authentication product, refer to Authentication pre-configuration guide -->
<!-- Set billing product, refer to Billing pre-configuration guide -->
<!-- Set marketing attribution product, refer to Marketing Attribution pre-configuration guide -->
</providers>
<!-- SDK Feature Settings: END -->
</properties>