iOS SDK Integration
Integrating the SDK
Cocoapods
The easiest way to integrate the SDK to your iOS project is to use CocoaPods.
Step 1: Simply open your project's Podfile and add a new source to the top:
source 'https://github.com/empowernet/specs.git'
Step 2: Add the following line to your app's target block:
pod 'EmpowerMobileAds', '9.4.9'
Step 3: Run the following command from the command line to install the dependencies:
pod install --repo-update
If you're new to CocoaPods, please refer to their official documentation for more information on getting started with it.
Update your Build Settings
Add ${inherited} line to your Other Linker Flags section in Build Settings.
Target -> Build Settings -> Other Linker Flags
Update your Info.plist
Declare that your app is an AdManager app by adding a key named GADApplicationIdentifier with the string value which will be provided by us to your app's Info.plist file.
You may also make this change manually by adding the following lines to Info.plist:
<key>GADApplicationIdentifier</key><string>ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy</string>
Importing the SDK
In order to be able to use the Empower Mobile Ads SDK, you must import it where necessary.
Projects using Swift
Please add the following line to the files where you refer to the classes provided by the Empower Mobile Ads SDK:
import EmpowerMobileAds
Projects using Objective-C
The SDK exposes an Objective-C-compatible API, so you can call it directly from your .m and
.h files. No bridging header is required — a bridging header only exposes your app's own
Objective-C code to your app's Swift code, which is not what you need to consume the framework.
Make sure your Podfile uses dynamic frameworks:
use_frameworks!
Then import the SDK module in every file that uses it:
@import EmpowerMobileAds;
Objective-C uses the same EMAManager / EMASettings entry points as Swift. The only
differences are the delegate and status types: adopt EMAAdObserver (instead of
AdStatusDelegate) and switch on EMAAdStatusType (instead of AdStatus). Each ad-format
page below shows both Swift and Objective-C examples.
Integrating Mediation Networks
Add the following libraries to your Podfile and run the command pod install --repo-update:
use_frameworks!inhibit_all_warnings!# Podstarget 'YOUR_PROJECT_NAME' dopod 'AppLovinMediationGoogleAdManagerAdapter' # Googlepod 'AppLovinMediationGoogleAdapter' # Google Biddingpod 'AppLovinMediationInMobiAdapter' # InMobipod 'AppLovinMediationVungleAdapter' # Liftoff Monetizepod 'AppLovinMediationByteDanceAdapter' # Panglepod 'AppLovinMediationUnityAdsAdapter' # Unity Adspod 'AppLovinMediationYandexAdapter' # Yandexpod 'GoogleMobileAdsMediationInMobi' # InMobipod 'GoogleMobileAdsMediationPangle' # Panglepod 'GoogleMobileAdsMediationUnity' # Unityend