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', '7.0.0'

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.

Swift Package Manager

To add Empower Mobile Ads via package dependency to your project, follow these steps:

  1. In Xcode, install the Empower Mobile Ads by navigating to File -> Add Package Dependencies

  2. In the prompt that appears, search for the Empower Mobile Ads Swift Package GitHub Repository:

    https://github.com/empowernet/EmpowerMobileAds-SPM.git

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>

Build Settings

Please follow the following steps below as well, if your project is written in Objective-C:

  • Set Defines Module value to Yes.
  • Set Always Embed Swift Standard Libraries value to Yes.
  • Set Install Objective-C Compatibility Header value to Yes.

Setting Content URL for Targeting

You can set the page URL by using EMAMAnager's contentURL parameter. You have to set this parameter in every page you open in the app.

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

Since Empower Mobile Ads SDK is written in Swift, you need to create a Bridging-Header.h file.

You may do so by creating an empty Swift file and allowing the Xcode to create one for you, by simply accepting the prompt.

After the bridging header is created, you may use the line below to import the SDK in your .m and .h files.

@import EmpowerMobileAds;

Integrating Mediation Networks

Add following libraries to your Podfile and run the command `pod install --repo-update

use_frameworks!
inhibit_all_warnings!
# Pods
target 'YOUR_PROJECT_NAME' do
pod 'AppLovinSDK'
pod 'AmazonPublisherServicesSDK'
pod 'AppLovinMediationAmazonAdMarketplaceAdapter'
pod 'AppLovinMediationFyberAdapter'
pod 'AppLovinMediationGoogleAdManagerAdapter'
pod 'AppLovinMediationGoogleAdapter'
pod 'AppLovinMediationInMobiAdapter'
pod 'AppLovinMediationIronSourceAdapter'
pod 'AppLovinMediationVungleAdapter'
pod 'AppLovinMediationFacebookAdapter'
pod 'AppLovinMediationMintegralAdapter'
pod 'AppLovinMediationByteDanceAdapter'
pod 'AppLovinMediationSmaatoAdapter'
pod 'AppLovinMediationUnityAdsAdapter'
pod 'AppLovinMediationPubMaticAdapter'
pod 'GoogleMobileAdsMediationAppLovin'
pod 'GoogleMobileAdsMediationChartboost'
pod 'GoogleMobileAdsMediationFyber'
pod 'GoogleMobileAdsMediationInMobi'
pod 'GoogleMobileAdsMediationIronSource'
pod 'GoogleMobileAdsMediationVungle'
pod 'GoogleMobileAdsMediationFacebook'
pod 'GoogleMobileAdsMediationMintegral'
pod 'GoogleMobileAdsMediationPangle'
pod 'GoogleMobileAdsMediationUnity'
end