Prepare for OpenMediation SDK - iOS

Prepare for OpenMediation SDK

We have migrated from the AdTiming Mediation SDK to the fully open-source OpenMediation SDK, while providing some major changes, and simply renamed some APIs and removed deprecated APIs.

Integrate new OpenMediation SDK/Adapter

1. If you are using the cocoapods method to integrate the SDK, please modify the command to the following code:

pod 'OpenMediation','2.0.2'
Copy

If you are using the manual SDK integration method, please refer to the Add Mediation Networks for details.

2. Refer to the Add Mediation Networks for operations and update the Adapter required by the integrated advertising network.

3. Refer to the iOS SDK Integration document to update the initialization method.

4. Refer to the integrated documents of ad unit Rewarded Video, Interstitial, Native, and Banner, update the ad api name, load and show method and agent callback method.

Api Class Name Change

OpenMediation SDK has removed all class names and callback methods that include AdTiming, and added cross-promotion ad types. For the callback method changes of each ad type, please refer to the part of the ad unit document. The following are the main class name changes.

AdTiming Class Name
OpenMediation Class Name
AdTiming OpenMediation
AdTimingBanner OMBanner
AdTimingBannerDelegate OMBannerDelegate
AdTimingNative OMNative
AdTimingNativeAd OMNativeAd
AdTimingNativeView OMNativeView
AdTimingNativeDelegate OMNativeDelegate
AdTimingInterstitial OMInterstitial
AdTimingInterstitialDelegate OMInterstitialDelegate
AdTimingRewardedVideo OMRewardedVideo
AdTimingRewardedVideoDelegate OMRewardedVideoDelegate

The callback method name changes

Banner

/// AdTiming Call Back Method

- (void)adtimingBannerDidLoad:(AdTimingBanner *)banner;

- (void)adtimingBannerDidFailToLoad:(AdTimingBanner *)banner withError:(NSError *)error;

- (void)adtimingBannerWillExposure:(AdTimingBanner *)banner;

- (void)adtimingBannerDidClick:(AdTimingBanner *)banner;

- (void)adtimingBannerWillPresentScreen:(AdTimingBanner *)banner;

- (void)adtimingBannerDidDismissScreen:(AdTimingBanner *)banner;

- (void)adtimingBannerWillLeaveApplication:(AdTimingBanner *)banner;
/// OpenMediation Call Back Method

- (void)omBannerDidLoad:(OMBanner *)banner;

- (void)omBanner:(OMBanner *)banner didFailWithError:(NSError *)error;

- (void)omBannerWillExposure:(OMBanner *)banner;

- (void)omBannerDidClick:(OMBanner *)banner;

- (void)omBannerWillPresentScreen:(OMBanner *)banner;

- (void)omBannerDidDismissScreen:(OMBanner *)banner;

- (void)omBannerWillLeaveApplication:(OMBanner *)banner;

Native

/// AdTiming Call Back Method

- (void)adtimingNative:(AdTimingNative*)native didLoad:(AdTimingNativeAd*)nativeAd;

- (void)adtimingNativeDidFailToLoad:(AdTimingNative*)native withError:(NSError*)error;

- (void)adtimingNativeWillExposure:(AdTimingNative*)native;

- (void)adtimingNativeDidClick:(AdTimingNative*)native;
/// OpenMediation Call Back Method

- (void)omNative:(OMNative*)native didLoad:(OMNativeAd*)nativeAd;

- (void)omNative:(OMNative*)native didFailWithError:(NSError*)error;

- (void)omNativeWillExposure:(OMNative*)native;

- (void)omNativeDidClick:(OMNative*)native;

Interstitial

/// AdTiming Call Back Method

- (void)adtimingInterstitialChangedAvailability:(BOOL)available;

- (void)adtimingInterstitialDidOpen:(AdTimingScene*)scene;

- (void)adtimingInterstitialDidShow:(AdTimingScene*)scene;

- (void)adtimingInterstitialDidClick:(AdTimingScene*)scene;

- (void)adtimingInterstitialDidClose:(AdTimingScene*)scene;

- (void)adtimingInterstitialDidFailToShow:(AdTimingScene*)scene withError:(NSError *)error;
/// OpenMediation Call Back Method

- (void)omInterstitialChangedAvailability:(BOOL)available;

- (void)omInterstitialDidOpen:(OMScene*)scene;

- (void)omInterstitialDidShow:(OMScene*)scene;

- (void)omInterstitialDidClick:(OMScene*)scene;

- (void)omInterstitialDidClose:(OMScene*)scene;

- (void)omInterstitialDidFailToShow:(OMScene*)scene withError:(NSError *)error;

Rewarded Video

/// AdTiming Call Back Method

- (void)adtimingRewardedVideoDidLoad:(NSString *)placementID;

- (void)adtimingRewardedVideoDidFailToLoad:(NSString *)placementID withError:(NSError *)error;

- (void)adtimingRewardedVideoDidOpen:(NSString*)placementID;

- (void)adtimingRewardedVideoPlayStart:(NSString*)placementID;

- (void)adtimingRewardedVideoPlayEnd:(NSString*)placementID;

- (void)adtimingRewardedVideoDidClick:(NSString*)placementID;

- (void)adtimingRewardedVideoDidReceiveReward:(NSString*)placementID;

- (void)adtimingRewardedVideoDidClose:(NSString*)placementID;

- (void)adtimingRewardedVideoDidFailToShow:(NSString*)placementID withError:(NSError *)error;
/// OpenMediation Call Back Method

- (void)omRewardedVideoChangedAvailability:(BOOL)available;

- (void)omRewardedVideoDidOpen:(OMScene*)scene;

- (void)omRewardedVideoPlayStart:(OMScene*)scene;

- (void)omRewardedVideoPlayEnd:(OMScene*)scene;

- (void)omRewardedVideoDidClick:(OMScene*)scene;

- (void)omRewardedVideoDidReceiveReward:(OMScene*)scene;

- (void)omRewardedVideoDidClose:(OMScene*)scene;

- (void)omRewardedVideoDidFailToShow:(OMScene*)scene withError:(NSError *)error;
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.