Skip to content

Hive SDK Development flow

The summary of the entire flow from installing the Hive SDK to app distribution is as follows.

  1. Installation
  2. Configuration
  3. Development
  4. Build
  5. Deployment

1. Installation

To implement features such as authentication and payment in your app using the Hive SDK, first sign up for the Hive console and create an AppID. After that, install the Hive SDK suitable for your development environment.

Preparation before installation

Most of the Hive SDK features require the data entered in the Hive console. Therefore, to use the SDK, you must first sign up for the Hive console and create an AppID.

SDK installation

After creating the AppID in the console, install the SDK. The Hive SDK may have different installation methods depending on the development engine (Unity, Unreal Engine, etc.) and OS (Android, iOS). For example, if you are developing the app with the Unity engine, you can conveniently install the latest SDK version using the SDK Manager, but if you are developing the app in a Native Android environment, you will need to install the SDK using Gradle.

Info
  • You can download the latest SDK versions and sample apps for each development engine from the download page.
  • The latest SDK versions are also distributed via Maven (Android) and Cocoapod (iOS).

Install features

After completing the installation of the Hive SDK, you need to install the SDK features you will use. The SDK provides various features such as authentication, payment, push notifications, promotions, and matchmaking, and it is recommended to use authentication and payment features as mandatory and the remaining features as optional.

Note

Installing the authentication feature means choosing the desired identity providers (IdP) such as Google Login, Apple Login, etc. Even if not all IdPs are installed, guest login is supported by default. Developers who are using the Hive SDK for the first time can quickly experience the Hive SDK by using only the guest login.

2. Environment setup

If the SDK installation is complete, you will configure the SDK environment. There are required settings and optional settings.

(Required) Basic settings: hive_config.xml

hive_config.xml is a file that contains essential configuration values necessary for the SDK to function and is included in the app build. To use the SDK, you need to enter the AppID generated in the Hive console and the IdP you will use in this file. The SDK includes hive_config.xml in the app build at the time of initialization.

As with SDK installation, the configuration method for hive_config.xml may vary depending on the development engine (Unity, Unreal Engine, etc.) and OS (Android, iOS). For example, when developing an app with the Unity engine, you can generate hive_config.xml using the Unity Inspector without directly entering the configuration values in hive_config.xml, whereas in a Native environment, you need to manually create this file and enter the values directly into it.

(Optional) Market-specific settings

If you want to use specific app markets such as Google Play Games on PC, Amazon, Steam (Windows), additional configuration is required. Additional settings are needed.

(Optional) Runtime settings

Some SDK settings should be done at the app runtime rather than during SDK initialization (build time). However, changing runtime settings during live service is not recommended.

3. Development

After completing the log settings and development preparation, implement the desired features in the app. You need to pass the events that occur according to the app lifecycle in the entire app source code to the Hive SDK and call the SDK methods that receive these events. Below are the key items to know when developing the SDK.

SDK initialization

SDK Initialization is the first preparation step to execute SDK functionalities. In the SDK code flow, initialization is executed first, and after the initialization is complete, various SDK features such as authentication, payment, and promotions can be used.

The SDK displays the terms agreement screen (such as the device identification information collection and personal information collection consent popup that is exposed when the app user runs the app) during the initialization process. One of the main advantages of the SDK is that it allows for easy and convenient implementation of compliance-compliant terms agreement requests.

Once the initialization is complete, you can check the device identification information and the list of supported IdPs during login in the Hive console.

Login

When the app user logs in with the IdP set up earlier, the SDK obtains user identification information. You can use this information to identify users and provide services.

When implementing login, exception handling must be implemented. Exception handling is necessary for issues caused by SDK configuration errors or users who have successfully logged in. Examples of users who need to be handled as exceptions include login of suspended users and the process of resolving account conflicts.

If the app user has successfully logged in, the login token must be verified. The SDK issues a token that can be verified to determine if the user is inappropriate, and this token can be verified to determine if the token has not been forged.

Payment

The billing feature shows the list of products sold in the app to the app users and allows them to purchase these products. When implementing a store in the app and selling in-app products, the product list is exposed, and the sales product information is provided differently based on the country, currency type, and language. Each product has a product identification code, which distinguishes the information of each product.

When you sell a product in the in-app store, the SDK issues a receipt. Your app must receive this receipt data and call the receipt verification API to validate the receipt. If the receipt is valid, the app provides the product to the user who purchased it. Once the product delivery is complete, the SDK declares the end of the payment transaction.

When the payment transaction termination is declared, the receipt for the purchase cannot be used for Product Restoration. If the app user has purchased a product from the in-app store but the product has not been delivered to the user for any reason, the issued receipt can be used to attempt to deliver the product again.

Debugging

Enabling logging allows you to check development issues and perform debugging. If the development engine is Unity, real-time debugging is supported with RTT4U.

4. Build

Items to check before building, depending on the development engine, OS, or build pipeline. For example, in the Android environment (Native Android and Unity Android), permissions are automatically included in the SDK, so no additional configuration is required. In contrast, in the Native iOS environment, permissions must be declared based on the features the app intends to use before building. In the Unity iOS environment, only the necessary permissions can be automatically added using the HivePostProcess Editor.

Note

Android OS supports optimization of multilingual resources. You can remove unused languages from the app or add languages to the app.

5. Deployment

Before distributing the app to app markets (Google Play Store, App Store, etc.), you must ensure that the app is well implemented according to the Hive platform policies, and you must submit the types and purposes of personal data collected by the app to the app market. Please refer to the personal information guide used by the Hive SDK or third-party libraries for submission.