2.5.4 Unreal SDK. Integration guide

Get started

1. Get the app key

Add your app to Appodeal and get the app key for your application, as it is used during SDK integration.

2. Link your Admob account to Appodeal

Appodeal yields optimal results in cooperation with Admob. Use our Chrome extension to link them. The extension will allow Appodeal to access your Admob reports over API, and will create new ad units on Admob and submit them to Appodeal.

If you don't have Admob account, please sign up on admob.com.

Before installing the Appodeal extension, disable all third-party extensions. They may interfere with the correct operation of the Appodeal extension.


General Data Protection Regulation (GDPR) compliance

Publishers need to update their apps to collect the user consent prior to initializing our SDK (Read our guide on collecting consent here).

Publishers need to pass the boolean consent flag(with 'false' meaning that the user declined to give the consent) by parameter Appodeal Is Consent  in Initialize or Appodeal Initialize with Parameters Actions.

Integrate SDK

Appodeal SDK is included into Unreal Engine libraries. To activate it, go to Settings → Plugins → Advertising and select Appodeal Ads Plugin and tick Enabled. In this case Appodeal SDK will be activated for all of your projects. 

If Appodeal SDK is not part of the libraries, download and add it manually. Appodeal SDK will be enabled for a particular project.

You can use our demo app as a reference project.

1. Download SDK

Current available versions - 2.4.10 stable and 2.5.3 beta. Visit the Marketplace to download it.

Minimum OS requirements:

  • Unreal Engine 4.21
  • Android 14+
  • iOS 8.1+

Mediation A/B testing

If you want to compare Appodeal's performance to another mediation, please follow this Mediation A/B testing guide.

To use beta version of the plugin you should update Google Play Services in your project. Please check this manual for details.


2. Copy SDK files to your project

Unpack the archive and place the files from archive to the SDK (plugin) folder of your project. The name of the folder should comply to the format <project_folder>/Plugins/Appodeal/. If the folder does not exist, create it manually. 

If your project is a pure Blueprint project, please add an empty C++ class to the project, otherwise the plugin may fail to compile.

3. Unreal Engine Project Configuration

Now configure your project.

Android

Open File → Package Project → Packaging Settings... and open Android in Platforms section.

Then check the settings:

  • Minimum SDK Version should be at least 14.
  • Target SDK is better to set 22 or above.
  • It is recommended to have  "Enable Gradle instead of Ant" option enabled.
  • Android Package Name should match the one you've set in Appodeal when creating the app.
  • Add Extra Permissions to Advanced APK Packaging section:
    • Mandatory:
      • android.permission.ACCESS_NETWORK_STATE;
      • android.permission.INTERNET.
    • Optional:
      • android.permission.ACCESS_WIFI_STATE;
      • android.permission.ACCESS_COARSE_LOCATION;
      • android.permission.WRITE_EXTERNAL_STORAGE;
      • android.permission.RECEIVE_BOOT_COMPLETED (for Vungle).

iOS

1. Open File → Package Project → Packaging Settings... and open iOS in Platforms section.

2. Go to the build settings and set one Additional Linker Flag: -ObjC.

Configuration for using the plugin in C++ code

Add the Appodeal module to your *.Build.cs file public dependency module name:


Build.cs
PublicDependencyModuleNames.AddRange(new string[] { ...,  "Appodeal"});
Import this header anywhere in source code project if you want to call functions to show, load, and check ads availability:


include Appodeal
#include "AppodealComponent.h"

4. AdMob Configuration

It's required to provide your AdMob Application Id. You can add the Application Id in the project settings: Settings > Project Settings > Plugins > Appodeal AdMobAppId

You can find the Application Id in AdMob App Settings.


5. Initialization

There are two way to initialize the Appodeal SDK:

  • via the Appodeal Initialize with Parameters Action

Use Appodeal Initialize with Parameters Action to initialize Appodeal plugin. 

In this case, only direct methods will be available. To have access to ad types events, please add Appodeal Component and use events there. 

  • via Appodeal Component  

Add Appodeal Component somewhere to your Actor, to be able to access Events and Appodeal initialization settings.

All Appodeal actions are under Actions → Advertising → Appodeal. 

To set events, go to Components → Appodeal → Events.

When Appodeal component has been configured, call Appodeal Initialize Action. 

To Initialize Appodeal SDK, add Initialize action somewhere on the app start (best place to do that is on BeginPlay Event in starting Scene), then configure app keys (you can find it in App settings in Appodeal dashboard) and check ad types you want to initialize.

Initialization from C++

UE4 initialization
FString appKey;
#if PLATFORM_ANDROID
appKey = FString(TEXT("fee50c333ff3825fd6ad6d38cff78154de3025546d47a84f"));
#elif PLATFORM_IOS
appKey = FString(TEXT("4b46ef930cd37cf11da84ae4d41019abb7234d5bbce3f000"));
#endif
UAppodealComponent::initialize(appKey, consent, AdType::INTERSTITIAL | AdType::BANNER | AdType::REWARDED_VIDEO);