Unity Plugin Implement banner ad

Banner ads are ads placed at the bottom, top of the Unity screen. Depending on the size of the inventory, you can place it as icon type advertisement or inline type advertisement.

Preparation for implementation

To prepare for mounting banner ads, from the start guide below, It is necessary to install Geniee SDK Unity Plugin in the project. Start Guide

Output of XCode project

  1. Create an XCode project.
  • File -> Build Settings -> iOS -> Build to generate the Xcode file.
  • When you select SDK version of Player Setting, you can download files for actual machine or iPhone simulator You can choose to output. (Projects corresponding to both can not be output)
  1. Open xcode and open xxxx.xcworkspace (replace xxxx with project name) in the created project's folder.
  2. Add non-ARC configuration
  • Grant -fno-objc-arc option to GNAdViewUnityController.mm in TARGETS -> Build Phases -> Compile Sources.

If properly set at this point, ads will be displayed at runtime.


Manual installation procedure (not recommended)
  1. Add GNAdSDK.framework to theAssets/Plugins/iOS folder.
  2. Create an XCode project.
  • File -> Build Settings -> iOS -> Build to generate the Xcode file.
  • When you select SDK version of Player Setting, you can download files for actual machine or iPhone simulator You can choose to output. (Projects corresponding to both can not be output)
  1. Open xcode and open xxxx.xcodeproj (replace xxxx with project name) in the created project's folder.

  2. Add the necessary framework. Make sure the required framework has been added to the application project. To add a framework, open the project settings, select Build Phases, Expand Link Binary With Libraries and add the following framework.

    • AdSupport.framework
    • CoreLocation.framework
    • CoreTelephony.framework
    • libxml2.dylib
    • SystemConfiguration.framework
  3. Add net connection confirmation library Reachability.

    1. If Reachability has already been included in the project, other libraries, no addition is necessary. Compiling conflicts will occur when you add them.
    2. Reachability If unused, add Reachability.h and Reachability.m of Reachability under GenieeUnityPlugin/Libs/ios to the project.
  4. Add non-ARC configuration

  • Grant -fno-objc-arc option to GNAdViewUnityController.mm in TARGETS -> Build Phases -> Compile Sources.

If properly set at this point, ads will be displayed at runtime.


Output of Android project

  1. Create an Android project.
  • File -> Build Settings -> android -> Build to generate Android files.
  • Checking Google Android Project outputs project for eclipse.     When unchecked, an apk file will be created.
  1. Describe the Google Play Services SDK information used by the SDK.
  • Write it in <application> of the manifest file.
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
1
2
3

If properly set at this point, ads will be displayed at runtime.


Manual installation procedure (not recommended)
  1. Add GNAdSDK.jar to theAssets/Plugins/Android folder.
  2. Create an Android project.
  • File -> Build Settings -> android -> Build to generate Android files.
  • Checking Google Android Project outputs project for eclipse.     When unchecked, an apk file will be created.
  1. Describe the Google Play Services SDK information used by the SDK.
  • Write it in <application> of the manifest file.
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
1
2
3

If properly set at this point, ads will be displayed at runtime.

About Hardware Acceleration Settings

If you want to display the banner's video properly, hardware acceleration must be set.

<application android:hardwareAccelerated="true">
</application>
1
2
3
Last Updated: 7/21/2020, 4:39:55 PM