AdMob Mediation
HyprMX iOS AdMob Adapter allows you to integrate HyprMX in your AdMob rewarded, interstitial, and banner 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.
The adapter can be set up by either using CocoaPods, a dependency manager for Swift and Objective-C Cocoa projects, or through manual installation.
The HyprMX-AdMob adapter version 6.2.0.0 is compatible with AdMob 9.0.0+
This guide assumes you already have the AdMob iOS SDK integrated into your Xcode project. You can either setup the adapter by using CocoaPods or through manual integration.
2. Add the following to your Podfile:
pod 'HyprMX-AdMob', '6.2.0.0'
The HyprMX-AdMob Pod requires
pod 'Google-Mobile-Ads-SDK', '9.0.0'
or greater.The HyprMX-AdMob Pod requires CocoaPods version 1.10.2 or newer installed in your development environment. Please refer to AdMob's Release Notes for the required minimum CocoaPods version required by the Google-Mobile-Ads-SDK Pod.
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.
1. Remove HyprMX.framework and all HyprMX adapter files from your project.
2. Find your target's Build Phases tab and open Link Binary with Libraries. If it exists, remove HyprMX.framework from this list.

4. Add the HyprMX.xcframework to the project. Make sure to copy and verify target membership.


3. Find your target's General tab, open Frameworks, Libraries, and Embedded Content and set the HyprMX.xcframework to Embed & Sign.

4. Add the AdMob-Adapter folder to the project. Make sure to copy and verify target membership.


6. Add or confirm that info.plist contains the required Privacy Keys. For more information, see the Configuring Privacy Controls section below.
That's it! You're up and running with the latest version of the HyprMX SDK.
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.
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.
<key>NSCameraUsageDescription</key>
<string>${PRODUCT_NAME} requests write access to the Camera</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>${PRODUCT_NAME} requests write access to the Photo Library</string>
<key>NSUserTrackingUsageDescription</key>
<string>${PRODUCT_NAME} would like to show you personalized ads</string>
The HyprMX 6.0.0+ SDK supports Apple's new SKAdNetwork for Attribution. To add the HyprMX SKAdNetwork ID to your info.plist:
<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>nu4557a4je.skadnetwork</string>
</dict>
...
</array>
Note: SKAdNetwork ID's are case sensitive. For more information about SKAdNetwork please refer to Apple's documentation.
- 1.Create your Mediation Group on the AdMob Dashboard.
- 2.In the Ad Sources, select
Add Custom Event
. - 3.In the popup, enter a unique label such as "HyprMX Placement1" in the label field and set the default eCPM (e.g. $15.00).
- 4.Click Continue.
- 5.Set the adapter Class Name:AdMob Ad FormatClass NameHYPRAdMobRewardedAdapterHYPRAdMobVideoAdapterHyprMXCustomEventBanner
- 6.In the parameter field, enter the distributor ID and placement name assigned to you by your HyprMX account manager.{ "distributorID": "YOUR_DISTRIBUTOR_ID", "placementName": "HyprMX Placement1" }
- 7.Click 'Done'.
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 the AdMob's child-directed setting documentation.
To add a User ID or provide Consent Status to HyprMX, you will need to import the
HyprMXAdapterConfiguration
header into your project.Swift
ObjectiveC
// Add the following to your project's Bridging-Header.h
#import "HyprMXAdapterConfiguration.h"
#import "HyprMXAdapterConfiguration.h"
The userId is a unique identifier supplied by your application and must be static for each user across sessions. The user ID should not contain personal information such as an email address, screen name, or Apple's Advertising Identifier (IDFA).
The User ID must be set once before loading ads with AdMob, we recommend setting it on App Launch.
Swift
Objective-C
HyprMXAdapterConfiguration.setUserId(your_user_id)
[HyprMXAdapterConfiguration setUserId:your_user_id];
Replace your_user_id with your user ID.
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.
Swift
Objective-C
HyprMXAdapterConfiguration.setHasUserConsent(false) // Consent is declined
HyprMXAdapterConfiguration.setHasUserConsent(true) // Consent has been granted
[HyprMXAdapterConfiguration setHasUserConsent:NO]; // Consent is declined
[HyprMXAdapterConfiguration setHasUserConsent:YES]; // Consent has been granted
By downloading this SDK, you are agreeing to the LICENSE included with the SDK zip.
Last modified 3mo ago