AdMob Mediation
Introduction
HyprMX iOS AdMob Adapter allows you to integrate HyprMX in your AdMob rewarded, interstitial, and banner/MREC waterfalls. The adapter can be set up with CocoaPods or by Manual Installation. See below for instructions on how to set up a new adapter or upgrade to newer versions.
Apple Privacy Manifest is included in iOS SDK 6.3.0.1+
Compatibility
The HyprMX-AdMob adapter version 6.4.1.0 is compatible with AdMob 11.0+. If you need support for an older version of AdMob, please reach out to your HyprMX account manager.
Setup Instructions
This guide assumes you already have the AdMob iOS SDK integrated into your Xcode project. You can either set up the adapter by using CocoaPods or through manual integration.
CocoaPods Integration
1. Install or update CocoaPods to version 1.10.2 or newer.
2. Add the following to your Podfile:
The HyprMX-AdMob Pod requires pod 'Google-Mobile-Ads-SDK'
with version'11.0.0'
or greater.
Manual Installation
To manually update the adapter, follow the steps below.
If you have set up the adapter before and are upgrading, perform steps 1 and 2. If not, skip to step 3.
Remove HyprMX.framework and all HyprMX adapter files from your project.
Find your target's Build Phases tab and open Link Binary with Libraries. If it exists, remove HyprMX.framework from this list.
Download the adapter file here and unzip the file.
Add the HyprMX.xcframework to the project. Make sure to copy and verify target membership.
Find your target's General tab, open Frameworks, Libraries, and Embedded Content and set the HyprMX.xcframework to Embed & Sign.
Add the AdMob-Adapter folder to the project. Make sure to copy and verify the target membership.
Ensure that your ATS (App Transport Security) settings are as described by AdMob.
Add or confirm that info.plist contains the required Privacy Keys. For more information, see the Configuring Privacy Controls section below.
Optional: Set user consent, as shown below.
Please note that the user ID has been removed in version 6.4.1.0 and can be safely removed from the integration.
That's it! You're up and running with the latest version of the HyprMX SDK.
Configuring Privacy Controls
iOS 14 introduced the AppTrackingTransparency framework to allow users control over the use of their Advertising Identifier.
The HyprMX 6.0.0+ SDK requires the `NSUserTrackingUsageDescription Plist Key to determine the authorization state.
iOS requires that the use of a user's camera, calendar, photo library, IDFA, etc. be declared by advertisers in the plist. Add all of the following entries to your app's plist.
SKAdNetwork Identifier
The HyprMX 6.0.0+ SDK supports Apple's new SKAdNetwork for Attribution. To add the HyprMX SKAdNetwork ID to your info.plist:
Note: SKAdNetwork IDs are case sensitive. For more information about SKAdNetwork please refer to Apple's documentation.
Integrating HyprMX On The AdMob Dashboard Using Custom Events
Create your Mediation Group on the AdMob Dashboard.
In the Ad Sources, select
Add Custom Event
.In the popup, enter a unique label such as "HyprMX Placement1" in the label field and set the default eCPM (e.g. $15.00).
Click Continue.
Set the adapter Class Name:
AdMob Ad Format
Class Name
HYPRAdMobRewardedAdapter
HYPRAdMobVideoAdapter
HyprMXCustomEventBanner
In the parameter field, enter the distributor ID and placement name assigned to you by your HyprMX account manager.
Click 'Done' and then 'Save'.
Optional: Tag for Child Directed Treatment
Regional laws and regulations such as COPPA, GDPR, and Apple's Privacy Policy require child-directed treatment of applicable users. It is the responsibility of the app developer to ensure compliance with applicable laws and regulations.
For instructions on how to tag the ad request as child-directed, please follow AdMob's child-directed setting documentation.
Optional: User Consent
Importing HyprMXAdapterConfiguration
To provide Consent Status to HyprMX, you will need to import the HyprMXAdapterConfiguration
header into your project.
Adding User Consent Status
HyprMX provides an API to indicate a user’s consent status. This API will be used to indicate a user’s opt-in or opt-out consent for the collection and use of personal data under applicable laws and jurisdictions (GDPR, CPRA, etc.). On App launch, the Consent value will be CONSENT_STATUS_UNKNOWN
. You can set CONSENT_DECLINED
by calling setHasUserConsent(false), or CONSENT_GIVEN
with setHasUserConsent(true) depending on the user's consent collected by your application.
It is recommended to set the consent status once on App Launch and whenever your user changes their consent status.
License
By downloading this SDK, you are agreeing to the LICENSE included with the SDK zip.
Last updated