Skip to main content

Unity SDK Integration

This guide installs the Unity package and configures the native Android and iOS projects.

Step 1: Install the Package

Option A — Unity Package Manager (Git URL)

  1. Open Window > Package Manager.
  2. Click + in the top-left and choose Add package from git URL....
  3. Enter the repository URL provided by Empower and click Add.

Tip: append #v1.0.0 (or the desired tag) to the URL to pin a specific version.

Option B — Local Package

  1. Clone or download the repository.
  2. In Package Manager, click + and choose Add package from disk..., then select package.json.

Option C — Embed in Your Project

Copy the EmpowerMobileAds-Unity folder into your project's Packages/ directory. Unity detects it as an embedded package automatically.

After Installation

If you have EDM4U installed, it resolves native dependencies automatically:

  • Android: Maven dependencies from https://maven.empower.net/release.
  • iOS: the EmpowerMobileAds CocoaPod is added to your Podfile.

Run Empower > Mobile Ads > Validate Setup from the Unity menu to confirm everything is configured (see Validate Your Setup).


Step 2: iOS Configuration

Minimum deployment target: 13.0. Set it under Edit > Project Settings > Player > iOS > Target minimum iOS Version.

Native SDK & CocoaPods

The plugin declares the native pod EmpowerMobileAds (~> 9.6.14, resolving to the latest 9.6.x). If EDM4U is installed, CocoaPods integration is handled automatically. If EDM4U is not installed, the plugin's build post-processor generates a Podfile for you — after building, run:

cd <Xcode build output>
pod install

Then open the .xcworkspace (not .xcodeproj).

Build post-processing (automatic)

The plugin's IPostprocessBuildWithReport handler configures the exported Xcode project for you:

  • Sets IPHONEOS_DEPLOYMENT_TARGET to 13.0 on the main and UnityFramework targets.
  • Enables CLANG_ENABLE_MODULES (for @import).
  • Adds -ObjC to OTHER_LDFLAGS.
  • Adds framework search paths.
  • Generates a Podfile if EDM4U is not present.

Info.plist — AdMob / Ad Manager application ID

Add your application ID (provided by Empower) to the exported app's Info.plist:

<key>GADApplicationIdentifier</key>
<string>ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy</string>

Configure SKAdNetwork

Required for production. Ad networks use SKAdNetwork to attribute installs without tracking the user; if a network's ID isn't listed, it can't attribute conversions, which lowers your fill and revenue. Add an SKAdNetworkItems array to Info.plist:

<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>cstr6suwn9.skadnetwork</string>
</dict>
<!-- …add the full list here -->
</array>

Ask Empower for the current SKAdNetwork ID list to add here.

App Tracking Transparency

The SDK requests ATT automatically in Automatic/NonPersonalized privacy mode (alongside the UMP consent flow) — you don't call it yourself. You only need to declare NSUserTrackingUsageDescription in Info.plist, or the app crashes when the prompt is shown:

<key>NSUserTrackingUsageDescription</key>
<string>This app uses your data to provide personalized ads.</string>

Step 3: Android Configuration

Minimum API level: 21. Set it under Edit > Project Settings > Player > Android > Minimum API Level.

Native SDK version: 5.7.28, pulled from https://maven.empower.net/release. If EDM4U is installed the dependencies resolve automatically; otherwise the plugin's Gradle post-processor injects them.

AdMob application ID (required): Enable Player Settings > Publishing Settings > Custom Main Manifest, then add inside <application> of Assets/Plugins/Android/AndroidManifest.xml:

<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="YOUR_ADMOB_APP_ID"/>

For testing you can use Google's public test app id ca-app-pub-3940256099942544~3347511713.


Mediation Adapters

Add the adapter pods Empower has enabled for your account. On iOS these are added as CocoaPods (via EDM4U or your Podfile); on Android they resolve from Maven. Contact your Empower account manager for the recommended configuration for your markets.


Validate Your Setup

Run Empower > Mobile Ads > Validate Setup from the Unity menu. It checks:

  • Whether EDM4U is installed (warns if missing).
  • Android minimum API level ≥ 21.
  • iOS deployment target ≥ 13.0.
  • That the dependencies file is present.

Run it after installation and after changing platform settings.