AdMob Mediation Support
Integrate SDK and Mediation Adapter
Swift Package Manager
To add a package dependency to your project, follow these steps:
1.In Xcode, install the Carty SDK Swift Package by navigating to File > Add Package Dependencies....
2.In the prompt that appears, search for the CartyAdmobAdapter Swift Package GitHub repository:
https://github.com/cartysdk/CartyAdmobAdapter-iOS.git3.Select the version of the CartyAdmobAdapter Swift Package you want to use. For new projects, we recommend using the Up to Next Major Version.
4.Enable the -ObjC flag in Xcode: click on your project settings, go to Build Settings, search for Other Linker Flags and add -ObjC.
CocoaPods
To integrate the Carty SDK through CocoaPods:
1.Add the following line to your Podfile:
pod CartyAdmobAdapter2.Run the following on the command line:
pod install --repo-updateConfigure your Mediation Settings
1.Create a mediation
Click on the "Mediation" link on the side bar menu and Select "Create mediation group"

2.Add Custom Event
In your Mediation Group under the Waterfall Panel, select "Add Custom Event"

Fill in the relevant information and click Continue.

Fill the "Class Name" and "Parameter" fields based on the table below and the Ad Type that you are looking to monetize.
Then Done.

Supported Ad format
| Ad Type | Class Name | Parameter |
|---|---|---|
| Banner | CartyAdmobAdapter | {"appid":"your-app-id","pid":"your-placement-id"} |
| Native | CartyAdmobAdapter | {"appid":"your-app-id","pid":"your-placement-id"} |
| Interstitial | CartyAdmobAdapter | {"appid":"your-app-id","pid":"your-placement-id"} |
| Rewarded Video | CartyAdmobAdapter | {"appid":"your-app-id","pid":"your-placement-id"} |
| AppOpen | CartyAdmobAdapter | {"appid":"your-app-id","pid":"your-placement-id"} |
CustomExtras
Ad network extras sent to CartySDK when load ad
- Objective-C
#import "CartyCustomExtras.h"
GADRequest *request = [GADRequest request];
CartyCustomExtras *customExtras = [[CartyCustomExtras alloc] init];
//set userID
customExtras.userID = @"<user_id>";
//set doNotSell
customExtras.doNotSell = NO;
//set customRewardString (only for Rewarded Video)
customExtras.customRewardString = @"<custom_reward_string>";
//set Mute
customExtras.isMute = YES;
//set bannerSize (only for banner)
customExtras.bannerSize = CTBannerSizeType320x50;
[request registerAdNetworkExtras:customExtras];
//load with request
[GADAd loadWithAdUnitID:@"<ad_unit_id>" request:request completionHandler:^(GADRewardedAd * _Nullable rewardedAd, NSError * _Nullable error) {
}];- Swift
import CartyAdmobAdapter
let request = Request();
let customExtras = CartyCustomExtras()
//set userID
customExtras.userID = "<user_id>"
//set doNotSell
customExtras.doNotSell = true;
//set customRewardString (only Rewarded Video)
customExtras.customRewardString = "<custom_reward_string>"
//set Mute
customExtras.isMute = true;
//set bannerSize (only banner)
customExtras.bannerSize = CTBannerSizeType320x50;
request.register(customExtras)
//load with request
ad.load(with: "<ad_unit_id>", request: request)