Follow

Unity Plugin: Integration

1. Quick Overview

Download Here

2. Import Unity Plugin

  1. Right click on the Asset folder
  2. Select Import Package
  3. Choose Custom Package
  4. AerServ Unity Plugin file directory: aerserv-unity-plugin-x.x.x/lib/aerserv-unity-plugin-x.x.x.unitypackage
  5. Select Open

3. Choose your Build Settings

  1. Select File
  2. Choose Build Settings...
Choose your Build Settings

4. Building for iOS

  1. Check Symlink Unity Libraries & Development Build
  2. Click Build & Run

Building Sample App

  1. Click on Main Camera
  2. Click on Add Component 
  3. Click on Script and choose Aerserv>SampleApp
  4. Select File and choose your Build Setting for IOS or Android 
  5. Build and Run the Sample App

4.1. Configuring XCode

  1. Build Setting: Other Link Flags
  2. Click on +
  3. Add -ObjC
  4. Change Build Options:  change Enable Bitcode to No

4.2. Add Linked Frameworks and Libraries

  1. Go to General -> Linked Frameworks and Libraries and add the following:
    1. AdSupport.framework
    2. libz.tbd
    3. libxml2.2.tbd

4.3. Clean project and rebuild

  1. Select Product > Clean
  2. Click Play to build and run
Clean project and rebuild

5. Building Android project in Unity

Go to File > Build Settings and switch Platform to Android.

Building Android project in Unity

5.1. Update Android Manifest file entries

In AndroidManifet.xml under: Assets > Plugins > Android

<!-- Required Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"  />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<!-- Optional Permissions -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" /> 

<!-- Optional Google Play Service -->
<metadata android:name="com.google.android.gms.version"    android:value="@integer/google_play_services_version" /> <!-- Required Unity --> <application android:allowBackup="true" android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false" android:isGame="true" android:banner="@drawable/app_banner"> <activity android:label="@string/app_name" android:screenOrientation="fullSensor" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale" android:name="com.aerserv.sdk.unity.sample.UnityPlayerActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" /> <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" /> </activity> <!-- Required Aerserv Activity --> <activity android:name="com.aerserv.sdk.view.ASVastInterstitialActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"    android:theme="@android:style/Theme.Translucent" /> <activity android:name="com.aerserv.sdk.view.ASWebviewInterstitialActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" /> <activity android:name="com.aerserv.sdk.view.ASVpaidInterstitalActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<!-- Unity Mediation -->
<activity
android:name="com.unity3d.ads.android.view.UnityAdsFullscreenActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:hardwareAccelerated="true" />
<!-- AdColony Mediation --> <activity android:name="com.jirbo.adcolony.AdColonyOverlay"    android:configChanges="keyboardHidden|orientation|screenSize"    android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" /> <activity android:name="com.jirbo.adcolony.AdColonyFullscreen"    android:configChanges="keyboardHidden|orientation|screenSize"    android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" /> <activity android:name="com.jirbo.adcolony.AdColonyBrowser"    android:configChanges="keyboardHidden|orientation|screenSize"    android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" /> <!-- AdMob Mediation --> <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" /> <!-- Vungle Mediation --> <activity android:name="com.vungle.publisher.FullScreenAdActivity"    android:configChanges="keyboardHidden|orientation|screenSize"    android:theme="@android:style/Theme.NoTitleBar.Fullscreen" /> <service android:name="com.vungle.publisher.VungleService"            android:exported="false" />
</application > <uses-feature android:glEsVersion="0x00020000" /> <uses-feature android:name="android.hardware.touchscreen" android:required="false" /> <uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" /> <uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />

6. Using AerServ Component 

Below is sample code to show how to load ads and listen for event callbacks. The PLC and site ID listed in the example is for invoking the sample app placements; you should update the PLC and site ID with the setup you created on the AerServ platform.

using UnityEngine;
using System.Collections;
using System;

namespace AerServ {

    public class SampleApp : MonoBehaviour {
        private String plc = "1024876"; // replace here with your generated PLC
        private static String message = "";
        private static String del = "";

        void OnGUI() {

            GUIStyle style = new GUIStyle(GUI.skin.button);
            style.fontSize = 35;

          plc    = GUI.TextField(new Rect(Screen.width/2-150Screen.height/2-500300100), plcstyle);
        
        /*Load Interstitial**/
            if(GUI.Button(new Rect(Screen.width/2-150Screen.height/2-300300100), "Load Interstitial"style))
            {
                ifplc == null || plc.Equals(""))
                    plc = "1000741";    
                message = "";
                del = "";
                SDK.LoadInterstitial(plcaerServEventCallBack);
            }

        /*Preload Interstitial **/
            if(GUI.Button(new Rect(Screen.width/2-150Screen.height/2-175300100), "Preload Interstitial"style))
            {
                ifplc == null || plc.Equals(""))
                    plc = "1000741";    
                message = "";
                del = "";
                SDK.PreloadInterstitial(plcaerServEventCallBack);
            }
    
        /*Show Interstitialafter preoload ready event fired **/
            if(GUI.Button(new Rect(Screen.width/2-150Screen.height/2-50300100), "Show Interstitial"style))
            {
                ifplc == null || plc.Equals(""))
                    plc = "1000741";    
                message = "";
                del = "";
                SDK.ShowInterstitial();
            }

       /*Load Banner -- Banner alignment constants 
Public const int BANNER_TOP = 0;
        public const int BANNER_BOTTOM = 1; 
These are used to align the banner **/
        

            if(GUI.Button(new Rect(Screen.width/2-150Screen.height/2+75300100), "Load Banner"style))
            {
                ifplc == null || plc.Equals(""))
                    plc = "1024876";    
                message = "";
                del = "";
                SDK.ShowBanner(plc, (int)(320 * Camera.main.orthographicSize), (int)(50 * Camera.main.orthographicSize), SDK.BANNER_BOTTOMaerServEventCallBack);
            }

        /*Kill Banner method **/
            if(GUI.Button(new Rect(Screen.width/2-150Screen.height/2+200300100), "Kill Banner"style))
            {       
                message = "";
                del = "";
                SDK.KillBanner();
            }   
 
        /** Init SDK by SITE ID method **/

if(GUI.Button(new Rect(Screen.width/2-150, Screen.height/2+200, 300, 100), "Init", style))
            {
                message = "";
                del = "";
                SDK.InitSdk("101190");
            }
 

            GUIStyle style2 = new GUIStyle(GUI.skin.textArea);
            style2.fontSize = 20;
            message = GUI.TextArea(new Rect(Screen.width/2-350Screen.height/2+325700300), messagestyle2);
        }

        /*Event Callback**/
        [MonoPInvokeCallback (typeof (OnAerServEvent))]
        static void aerServEventCallBack(int eventTypeString args) {

/** The args parameter can be null depending on the event that's fired**/
            String[] argsArr = (!String.IsNullOrEmpty(args)) ? args.Split('|') : null;

            switch(eventType) {
                case SDK.AD_FAILED:
                    message += del + "AD_FAILED invoked! message: " + argsArr[0];
                    break;
                case SDK.AD_LOADED:
                    message += del + "AD_LOADED invoked!";
                    break;
                case SDK.AD_COMPLETED:
                    message += del + "AD_COMPLETED invoked!";
                    break;
                case SDK.AD_CLICKED:
                    message += del + "AD_CLICKED invoked!";
                    break;
                case SDK.AD_DISMISSED:
                    message += del + "AD_DISMISSED invoked!";
                    break;
                case SDK.PRELOAD_READY:
                    message += del + "PRELOAD_READY invoked!";
                    break;
                case SDK.PRECACHE_READY:
                    message += del + "PRECACHE_READY invoked!";
                    break;
                case SDK.VC_READY:
                    message += del + "VC_READY invoked! Name: " + argsArr[0] + " Amount: " + argsArr[1];
                    break;
                case SDK.VC_REWARDED:
                    message += del + "VC_REWARDED invoked! Name: " + argsArr[0] + " Amount: " + argsArr[1];
                    break;
                default:
                    break;
            }
            del = "\n";

}

        // Returns a dictionary that can be passed into ad requests to configure ad requests.
        // This is optional and is only included here as a sample to illustrate how it is done.
        static Dictionary<string, object> generateTestConfig() {
            Dictionary<string, object> config = new Dictionary<string, object>();
            config.Add(SDK.PARAM_USER_ID, "AerServTestUser");
            config.Add(SDK.PARAM_TIMEOUT_MILLIS, 10000);

            // Setting publisher keys
            Dictionary<string, object> pubKeys = new Dictionary<string, object>();
            pubKeys.Add("testPubKey1", "testPubKeyValue1");
            pubKeys.Add("testPubKey2", "testPubKeyValue2");
            config.Add(SDK.PARAM_PUB_KEYS, pubKeys);

            // Setting keywords
            List<string> keywords = new List<string>();
            keywords.Add("testKeyword1");
            keywords.Add("testKeyword2");
            config.Add(SDK.PARAM_KEYWORDS, keywords);

            return config;

        }
    }
}

Test PLC to verify integration: 

  • aerWall - PLC #1000741
  • 
aerBanner (300x250) - PLC #1001286
  • 
aerBanner (320x50) - PLC #1024876
  • 
aerBanner (728x90) - PLC #1000835

7. Additional Network Support

7.1. Admob iOS

  1. Add the following libraries and frameworks to Target > Build Phases > Link Binary With Libraries:
  2. Choose Admob iOS SDK aerserv-unity-plugin-1.x.x.unitypackage > lib > network-support > Admob > GoogleMobileAds.framework
  3. Select Open
Admob iOS

 

 

The Admob adapter is included in the AerserSDK framework. If you already have the latest Admob IOS SDK (7.2.1+ required), there is no need to do anything additional.

We have included the Admob SDK in the SDK download.

Xcode project Setup:

  1. Open Xcode and click on the + sign on Linked frameworks & libraries  
  2. File directory: aerserv-ios-sdk-min/network-support/Admob/GooglemobileIOSSDKframework
  3. The SDK depends on the following iOS development frameworks which may not already be part of your project:
  • AdSupport
  • AudioToolbox
  • AVFoundation
  • CoreGraphics
  • CoreMedia
  • CoreTelephony
  • EventKit
  • EventKitUI
  • MessageUI
  • StoreKit
  • SystemConfiguration

7.1. Admob Android

The Admob Adapter is already a package in Aerserv-Unity-plugin.

AdMob Android

 

7.2. AdColony iOS

Open Target > Build Settings > Architectures and confirm that your Xcode project uses Base SDK version 6.0 or greater and that it does not use the armv6 architecture.

Add the following libraries and frameworks to Target > Build Phases > Link Binary With Libraries:

  • libz.1.2.5.dylib
  • AdColony.framework
  • AdSupport.framework (Set to Optional)
  • AudioToolbox.framework
  • AVFoundation.framework
  • CoreGraphics.framework
  • CoreMedia.framework
  • CoreTelephony.framework
  • EventKit.framework
  • EventKitUI.framework
  • MediaPlayer.framework
  • MessageUI.framework
  • QuartzCore.framework
  • Social.framework (Set to Optional)
  • StoreKit.framework (Set to Optional)
  • SystemConfiguration.framework
  • WebKit.framework (Set to Optional)

Add two separate linker flags to Target > Build Settings > Linking > Other Linker Flags:

  • -ObjC
  • -fobjc-arc (this allows AdColony to use ARC even if your project does not)

AdColony Frameworks file directory: aerserv-unity-plugin-1.x.x.unitypackage > lib > Network-support > AdColony > AdColony.framework

AdColony iOS

7.2. AdColony Android

  • We have included the AdColony Android SDK in the Unity download.
  • Add Adcolony.jar to your unity Project Android Asset folder by dragging the jar file into the folder.

AdColony Android SDK file directory: aerserv-unity-plugin-1.x.x.unitypackage > lib > Network-support > AdColony > AdColony.jar

AdColony Android

7.3. Vungle iOS

Add Vungle Framework

Copy VungleSDK.embeddedframework/ into your project directory, then drag and drop it into Xcode (Frameworks) to have it linked to your project.

Note: The .embeddedframework directory should be added as a group (yellow folder) and not as a reference (blue folder).

Add Required Frameworks

The Vungle SDK requires the following frameworks to be linked to your project. Click on your project and head to:

General > Linked Frameworks and Libraries

Add any of the following that are not included:

  • AdSupport.framework
  • AudioToolbox.framework
  • AVFoundation.framework
  • CFNetwork.framework
  • CoreGraphics.framework
  • CoreMedia.framework
  • Foundation.framework
  • libz.dylib
  • libsqlite3.dylib
  • MediaPlayer.framework
  • QuartzCore.framework
  • StoreKit.framework
  • SystemConfiguration.framework
  • UIKit.framework
  1. It's also a good idea to check that the VungleSDK framework appears there. If the drag-n-drop didn't link it automatically, then manually add it by clicking the '+' and then 'Add Other'.
  2. Select Open

File Directory aerserv-unity-plugin-1.x.x.unitypackage > lib > Network-support > Vungle > VungleSDK.embeddedframework

Vungle iOS

7.3. Vungle Android

  1. Select Android Asset Folder
  2. Drag to your Android Asset Folder
  3. File Directory: aerserv-unity-plugin-1.x.x.unitypackage > lib > Network-support > Vungle > Vungle-publisher-id.3.3.0.jar, Javax.inject-1.jar, dagger-1.2.2.jar, nineoldandroids.2.40.jar
 

7.4 AppLovin iOS 

AerServ Platform Setup:
  • To add AppLovin as an ad source for mediation, include the latest Applovin SDK folder into your project framework  
  • File directory: .../Network-support/AppLovvin/
  • Required parameter: AppLovin SDK key
  • Enter Optional ApplovinPreloadSizes  BANNER,INTER - Leaving Blank will default to [BANNER,INTER] | BANNER is for the Banner ad method, INTER is for the Interstitial ad method
    1. Enter Optional ApplovinPreloadtype REGULAR. VIDEOA - Leaving Blank will default to [REGULAR. VIDEOA]  |  REGULAR= Graphic Interstitials, VIDEOA = Video Interstitials
  • For instructions on how to set up AppLovin as an ad source please click here

 Xcode project Setup:

Add libAppLovinSdk.a by dragging it to your app project navigator.

Step 5: IOS integration

File directory: aerserv-IOS-sdk/network-support/AppLovin/libAppLovinSdk.a  

Adding Required Frameworks:

Adding Required Frameworks

Add the following libraries and frameworks to Target > Build Phases > Link Binary With Libraries:

  • AdSupport.framework
  • AVFoundation.framework
  • CoreGraphics.framework
  • CoreMedia.framework
  • CoreTelephony.framework
  • MediaPlayer.framework
  • SystemConfiguration.framework
  • UIKit.framework
 

Set Header Search Paths = *path_to_Applovin Folder

Example: = ../../dist/network-support/AppLovin/

 

7.4 AppLovin Android 

  1. Copy the entire contents of network-support/AppLovin/applovin-sdk-6.0.1.jar into your project's libs folder
  2. Add the following to your AndroidManifest.xml
<activity android:name="com.applovin.adview.AppLovinInterstitialActivity" />
<activity android:name="com.applovin.adview.AppLovinConfirmationActivity" />

    3. Set up ProGuard 

# For Applovin
-keep class com.com.applovin.sdk.** { *; }

    4. Set up the AppLovin ad source in the AerServ mediation platform: here

 

 

7.5 Facebook iOS 
  • To add Facebook as an ad source for mediation include the latest the Facebook SDK folder in your project framework  
  • File directory: .../Network-support/Facebook/
  • Required parameter: 
    1. Enter Required FacebookPlacementId - Example key: 839999212758459_841267789298268
    2. Enter FacebookTestDeviceId  - Retrieve ID from debug log: When testing your app with Facebook's ad units you must specify the device hashed ID. To ensure the delivery of test ads, add the following code before loading an ad: AdSettings.addTestDevice("9f9c20ffc85004073e4080f68f13e540");
    3. Enter Optional FacebookBannerAdSize (BANNER_HEIGHT_50, BANNER_HEIGHT_90,RECTANGLE_HEIGHT_50) - Leaving Blank for INTERSTIAL Ads
  • For instructions on how to set up Facebook as an ad source please click here

Xcode project Setup:

Add FBAudienceNetwork.framework by clicking on the + or by dragging it to Linkeds framework and libraries

File directory: aerserv-IOS-sdk/network-support/Facebook/FBAudienceNetwork.framework

Adding Required Frameworks:

Adding Required Frameworks

Add the following libraries and frameworks to Target > Build Phases > Link Binary With Libraries:

  • CoreMotion.framework
  • StoreKit.framework

Set Framework Search Paths = *path_to_Mopub SDK folder* and select: recursive

Example: ../../dist/networksupport/Facebook/FBAudienceNetwork.framework/

 

 

7.5  Facebook Android 

  1. Copy the entire contents of network-support/Facebook/AudienceNetwork.jar into your project's libs folder
  2. Add the following to your AndroidManifest.xml
<activity android:name="com.facebook.ads.InterstitialAdActivity"  
android:configChanges="keyboardHidden|orientation|screenSize"/>

   3. Set up ProGuard 

# For Facebook
-keep class com.facebook.ads.** { *; }

   4. Set up the Facebook Audience Network ad source in the AerServ mediation platform: here

 

7.6 Unity Ads iOS
  • To add Unity as an Ad Source for mediation, include the latest Unity SDK folder in your project framework  
  • File directory: .../Network-support/UNITY/
  • Required parameter: Game ID, Zone ID
  • For instructions on how to set up unity ads as an ad source please click here

Xcode project Setup:

Add UnityAds.framework by clicking the + or by dragging it to Linked frameworks and libraries

File directory: aerserv-ios-sdk/network-support/Unity/UnityAds.framework

Locate UnityAds.bundle, and drag it to your sample app's project navigator. On the following screen check Copy items if needed, and select Create groups.

Adding Required Frameworks

Add the following libraries and frameworks to Target > Build Phases > Link Binary With Libraries:

  • AdSupport.framework
  • CoreTelephony.framework
  • StoreKit.framework
  • SystemConfiguration.framework
 
Set Unity Framework Search Paths =
Example: ../../dist/network-support/Unity/UnityAds.framework/
 
 

7.6 Unity Ads Android

  1. Copy the entire contents of network-support/unity/unity-ads.jar
    into your project's libs folder
  2. Add the following to your AndroidManifest.xml
<activity android:name="com.unity3d.ads.android.view.UnityAdsFullscreenActivity" 
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:hardwareAccelerated="true" />

    3. Set up ProGuard 

# For Unity Ads
-keep class com.unity3d.ads.android.** { *; }

    4. Setup the Unity Ads ad source in the AerServ mediation platform: here

7.7  Chartboost iOS
  • To add Chartboost as an ad source for mediation, include the latest Chartboost SDK folder in your project framework  
  • File directory: .../Network-support/Chartboost/
  • Required parameter:
    1. App ID: Created when you add your app. Example ID 5236c2b916ba47f46c000000
    2. App Signature:  Created when you add your app. Example ID:42a9b0ebb706fcc41059821e5c18e028adcede47
  • For instructions on how to setup Chartboost as an ad source please click here

Xcode project Setup:

Add Chartboost.framework by clicking on the + or by dragging it to Linked frameworks and libraries

File directory: aerserv-ios-sdk/network-support/Chartboost/Chartboost.framework

Adding Required Frameworks

Add the following libraries and frameworks to Target > Build Phases > Link Binary With Libraries:

  • AdSupport.framework
  • CoreTelephony.framework
  • StoreKit.framework
  • SystemConfiguration.framework
 
 
Set Framework Search Paths to Chartboost Folder.
Example: ../../dist/network-support/Chartboost/Chartboost.framework/
 

7.8 Mopub iOS
  • To add Mopub as an ad source for mediation, include the latest Moupubs sdk folder in your project framework  
  • File directory: .../Network-support/Fabric/MopubSDK
  • Required parameter: Mopub Adunit ID: Created when you add your app. Example ID 5236c2b916ba47f46c000000
  • For instructions on how to setup Mopub as an ad source please click here

Xcode project Setup:

 

Drag network-support/Fabric/MoPubSDK folder to your Xcode project.  Make sure to check the “Copy items into destination group's folder” option.

Adding Required Frameworks

Add the following libraries and frameworks to Target > Build Phases > Link Binary With Libraries:

  • AdSupport.framework
  • CoreGraphics.framework
  • CoreLocation.framework
  • CoreTelephony.framework
  • EventKit.framework
  • EventKitUI.framework
  • Foundation.framework
  • MediaPlayer.framework
  • QuartzCore.framework
  • StoreKit.framework
  • SystemConfiguration.framework
  • UIKit.framework
 
Set header Search Paths to Mopub sdk folder
Example: ../../dist/network-support/Fabric/MoPubSDK
 

7.8 Mopub Android

  1. Copy the entire contents of network-support/Fabric/mopub-volley-1.1.0.jar into your project's libs folder
  2. Add the following to your AndroidManifest.xml
<activity android:name="com.mopub.mobileads.MoPubActivity" android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize"/>
<activity android:name="com.mopub.mobileads.MraidActivity" android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize"/>
<activity android:name="com.mopub.common.MoPubBrowser" android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize"/>
<activity android:name="com.mopub.mobileads.MraidVideoPlayerActivity" android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize"/>

     3. Set up ProGuard 

# For Mopub
-keep class com.mopub.mobileads.** { *; }

     4. Set up the Mopub ad source in the AerServ mediation platform: here

 

7.9 Flurry iOS

Add libFlurry_6.7.0.a and libFlurryAds_6.7.0.a libraries to your project by clicking on the +  or drag it to your project libraries:

File directory:

aerserv-android-sdk/network-support/Flurry/Flurry/libFlurry_6.7.0.a

aerserv-android-sdk/network-support/Flurry/FlurryAds/libFlurryAds_6.7.0.a

Adding Required Frameworks

Add the following libraries and frameworks to Target > Build Phases > Link Binary With Libraries:

  • AdSupport.framework
  • AVFoundation.framework
  • CoreGraphics.framework
  • CoreMedia.framework
  • Foundation.framework
  • MediaPlayer.framework
  • Security.framework
  • StoreKit.framework
  • SystemConfiguration.framework
  • UIKit.framework
  • libz.dylib
 
Set header Search Paths for Flurry SDK
Example: ../../dist/network-support/Flurry
 

 

7.9 Flurry Android 

  1. Copy the entire contents of network-support/Flurry/FlurryAds-5.6.0.jar and network-support/Flurry/FlurryAnalytics-5.6.0.jar into your project's libs folder
  2. Add the following to your AndroidManifest.xml
<activity 
android:name="com.flurry.android.FlurryFullscreenTakeoverActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize">
</activity>

    3. Set up ProGuard 

# For Flurry by Yahoo
-keep class com.flurry.android.ads.** { *; }

    4. Set up the Flurry by Yahoo ad source in the AerServ mediation platform: here

8: Building the Sample App in Xcode

  1. Select the Sample app project
  2. Select your target device (IPhone, IPad, etc)
  3. Click the Play button to build

AerServ test PLCs:

aerWall - PLC #1000741
aerBanner (300x250) - PLC #1001286
aerBanner (320x50) - PLC #1024876
aerBanner (728x90) - PLC #1000835

aerBanner

  1. Enter PLC
  2. Click Banner Ad

aerWall

  1. Preload Interstitial Ad
  2. Enter PLC
  3. Toggle Preload on
  4. Click Interstitial Ad
  5. Wait for Ad loaded event to fire
  6. Click Show Button 
 
Your PLC will not be live to render aerMarket ads until your app is approved by our advertisers. The approval process can take up to 1 week.  This does not impact your ad networks/sources that you set up via mediation.  
 
FAQ:

My app stops when playing a video

AVPlayer and AVAudioPlayer throw C++ exceptions that are caught by exception breakpoints. Edit your exception breakpoint to catch only Objective-C exceptions. See here for details.  

9. iOS 9 integration 

Disable App Transport Security    

One of the changes in iOS9 is a default setting that requires apps to make network connections only over SSL; this is known as App Transport Security. We are working with our advertisers to ensure they are compliant. In the meantime, developers that want to release apps that build against iOS9 will need to disable ATS in order to ensure ads continues to work as expected.

  1. Open you project the info.plist 
  2. Add the following 
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowArbitraryLoads</key>
<true/>
<dict>

You can edit the plist by adding NSAppTransportSecurity key of dictionary type with a dictionary element of NSAllowsArbitraryLoads of boolean type set to “Yes”.

Disable Bitcode

  1. Go to project Build Settings
  2. Build Options 
  3. Enable Bitcode = No 

 

10. Building the Unity Test App

  1. Click on Main Camera
  2. Click on Add Component 
  3. Click on Script and choose Aerserv>SampleApp
  4. Select File and choose your Build setting for iOS or Android 
  5. Build and Run the Sample App

 
 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk