Skip to main content

Integration

This guide explains how to add the Empower Mobile Ads SDK to your Unity project.

Step 1: Install the Package​

The package is on OpenUPM. Install it with the OpenUPM CLI:

openupm add net.empower.mobile.ads

Or add it from its git URL:

  1. Open Window > Package Manager.
  2. Click + and choose Add package from git URL....
  3. Enter the URL below and click Add.
https://github.com/empowernet/empower-mobile-ads-unity.git#v1.2.4
note

Remove the Google Mobile Ads, AppLovin MAX and Unity Ads plugins from your project. The package adds these SDKs itself.

Step 2: Android Configuration​

Set the API Levels​

Open Edit > Project Settings > Player > Android and set:

SettingValue
Minimum API Level24 or higher
Target API Level35 or higher, or Automatic (highest installed) with API 35 or higher installed

Native Dependencies​

The package adds the native SDK and its mediation bundle to the Android build, together with the Maven repositories and build options they need. You do not add any dependency or mediation adapter yourself.

net.empower.mobile.ads:empower-mobile-ads:5.9.19
net.empower.mobile.ads:empower-mobile-ads-mediation:5.9.19

If you use EDM4U, turn on Custom Main Gradle Template, Custom Gradle Settings Template and Custom Gradle Properties Template under Project Settings > Player > Android > Publishing Settings. Then run Assets > External Dependency Manager > Android Resolver > Force Resolve after you install or upgrade the package. Without the properties template EDM4U stops with an error about Jetifier.

Add the Google App ID​

  1. Enable Custom Main Manifest under Edit > Project Settings > Player > Android > Publishing Settings. Unity creates Assets/Plugins/Android/AndroidManifest.xml.
  2. Add the Empower application ID inside the <application> tag of that file, exactly as below. Keep everything else Unity generated in the file.
Assets/Plugins/Android/AndroidManifest.xml
<manifest>
<application>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-6593523210010154~7395142271"/>
</application>
</manifest>
warning

If this meta-data entry is missing or wrong, the app crashes at startup with "The Google Mobile Ads SDK was initialized incorrectly". Use the value exactly as shown.

Step 3: iOS Configuration​

Set the Deployment Target​

Set Target minimum iOS Version to 13.0 or higher under Edit > Project Settings > Player > iOS.

Native Dependency​

The package adds the native SDK pod to the iOS build and runs pod install after each build. If pod install fails, the Console shows a warning. Run it yourself in the Xcode project folder.

Podfile
pod 'EmpowerMobileAds', '~> 9.9.0'

Open the .xcworkspace file, not the .xcodeproj file.

The package adds only this pod. Ask your Empower account manager which mediation adapter pods your account needs on iOS.

Add the Google App ID​

Set the AdMob application ID provided by Empower in Edit > Project Settings > Empower Mobile Ads > AdMob App ID (from package 1.2.3). The package writes it into the exported Info.plist as GADApplicationIdentifier on every build. The value is saved in Assets/EmpowerMobileAds/EmpowerAdsSettings.asset, so package updates keep it.

Without a value there, an ID the game already has in Info.plist (for example from Google's Unity plugin) is kept. Only when there is none does Google's test application ID go in, with a build warning.

warning

The test ID serves no real AdMob or Google ads, also none through AppLovin MAX. Set your ID before you release. On packages before 1.2.3, the test ID was written on every build and you had to replace it in the exported Info.plist after each build.

Configure SKAdNetwork​

Ad networks use SKAdNetwork to attribute installs. The package adds only the Google and AppLovin identifiers. For production, copy every entry from the AppLovin SKAdNetwork ID list into the SKAdNetworkItems array of the exported Info.plist:

<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>cstr6suwn9.skadnetwork</string>
</dict>
<!-- all identifiers from the AppLovin list -->
</array>

Check the list again before each release.

App Tracking Transparency​

The package adds a default NSUserTrackingUsageDescription text to Info.plist when the key is missing. To use your own wording, edit the value in the exported Info.plist.

Step 4: Validate Your Setup​

Run Empower > Mobile Ads > Validate Setup from the Unity menu bar. It checks the Unity version, the Android Minimum API Level, the iOS deployment target and whether EDM4U is installed, and writes the result to the Console.

It does not check the Target API Level or the Google application ID.

The quickest way to check a setup on a device is the Android Ad Tester sample. Import it from Package Manager > Empower Mobile Ads > Samples.

Next Steps​

The SDK is now part of your project. Continue with Privacy & Consent to handle user consent, then Configuration to initialize the SDK, and finally implement the ad formats your game uses.