Hive AdKit for ADOP: Unity

Hive AdKit for ADOP (hereinafter, AdKit for ADOP) is an advertisement module that uses ADOP‘s API and develops by following the guideline from ADOP. Using AdKit with Hive SDK, log data is sent to Hive Analytics server so that you can skip analyzing an advertisement.

This guide explains how to implement AdKit and makes it easier by fixing errors that occur during integrating the Unity package. Read this page for using AdKit as well as support SDK.

Installation

  1. Download and install the latest version of AdKit for ADOP here.
  2. In the Unity toolbar, select the .unitypackage file under Assets > Import Package > Custom Package and click Import.

  3. After import, check if Hive AdKit and ADOP related files and folders have been created under the Assets folder.
  4. Download and install the latest version of EDM4U here.
    • If you’re using Hive SDK v4, which includes EDM4U, you can skip this step.

Update

Uninstall the AdKit you are using and install the latest version to update.

Setting

Follow the guide below for each platform to configure AdKit.

  • Android
    Add AdMobId, which is formatted in caapppubXXXXX~YYYYY, to the Assets/Plugins/Android/AndroidManifest.xml file generated in the Unity project.
  • iOS
    Add GADApplicationIdentifier to Info.plist of the Xcode project generated in Unity build, and enter AdMobId, which is formatted in ca-app-pub-XXXXX~YYYYY, as string type.
    On iOS 14 and higher, add SKAdNetworkItems to Info.plist. (When using the Assets/Bidmad/Editor/BidmadPostProcessBuild.cs file to build, SKAdNetworkIdentifier will add automatically.)

How to Use

iOS

When you build an iOS project, Unity generates the UnityFramework target that behaves with DynamicFramework.

  1. Setting EDM4U (Based on 1.2.179)
    Make sure that set up to build static_framwork in iOS Resolver Settings (menu: Assets > External Dependency Manager > iOS Resolver > Settings) of Unity editor.
  2. In Assets/HIVEAdKit/Editor/AdKitPostprocess.cs file, uncomment the lines that import dynamicFramework. The location of the lines are as follows.

    Uncomment the lines only if static_framework is checked for the build. Uncommenting the lines above to activate them may cause conflicts when you use Dynamic Framework.

  3. Build the project. After the build is complete, open the Podfile in the project root path to check the file settings.

  4. After running pod install, proceed with the Xcode settings by opening the workspace. When checking the General tab, the required Dynamic /Frameworks are automatically embedded as follows:

ADOP Proguard Settings

If you are using Proguard, add the ADOP Proguard Settings as below.

Test Ad Key in ADOP

Using a test ad key that ADOP issued is required.

Initialize Hive AdKit

In order to initialize ADOP ads, adopAppKey must be issued. The issued adopAppKey must be used as an ADOP advertisement initialization method argument.

Callback

To use Callback, BidmadManager must be registered as GameObject.

Advanced Settings

Rewarded ads

Rewarded ads reward a user who watched a video for a period of time, and is able to load one ad at a time.

Interstitial ads

Interstitial ads are full-screen ads that cover the interface of game.

Adaptive Banner type

Adaptive Banner type ads are a type of rolling banner that occupies a spot on screen. You can adjust the banner position with the BannerPosition or an yPos value.
If you provide yPos to adjust the banner position, the banner will be aligned at the bottom of the screen and then will move up by the yPos value you specify.

Test Ads

It is important for advertiser not to be charged when test ad is clicked in development. If you click ads too much out of test mode, it is regarded as invalid action. Therefore, be aware not to be a target account to report. Refer to the Google Developers to use a test ad.

Uninstallation

To uninstall Hive AdKit for ADOP, remove the following folders within the Unity project.

    • Assets/Bidmad
    • Assets/HIVEAdKit
    • Assets/HIVEAdKit_Example