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
- 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)
- Open xcode and open
xxxx.xcworkspace
(replace xxxx with project name) in the created project's folder. - 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)
- Add
GNAdSDK.framework
to theAssets/Plugins/iOS
folder. - 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)
Open xcode and open
xxxx.xcodeproj
(replace xxxx with project name) in the created project's folder.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
Add net connection confirmation library Reachability.
- If Reachability has already been included in the project, other libraries, no addition is necessary. Compiling conflicts will occur when you add them.
- Reachability If unused, add
Reachability.h
andReachability.m
of Reachability under GenieeUnityPlugin/Libs/ios to the project.
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
- 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.
- 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"/>
2
3
If properly set at this point, ads will be displayed at runtime.
Manual installation procedure (not recommended)
- Add
GNAdSDK.jar
to theAssets/Plugins/Android
folder. - 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.
- 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"/>
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>
2
3