广告聚合

Migration from Helium 3.X to Chartboost Mediation 4.0.0

Cocoapods 🔗

As part of Chartboost’s rebranding efforts, Chartboost Mediation 4.0.0 will be using all new Cocoapod names. Use the tables below to assist in migrating from the old Cocoapod name to the updated name.

Chartboost Mediation SDK 🔗

Helium 3.X Chartboost Mediation 4.0.0
ChartboostHelium ChartboostMediationSDK

Partner Adapters 🔗

Partner Network Helium 3.X Chartboost Mediation 4.0.0
AdMob ChartboostHeliumAdapterAdMob ChartboostMediationAdapterAdMob
Amazon Publisher Services ChartboostHeliumAdapterAPS ChartboostMediationAdapterAmazonPublisherServices
AppLovin ChartboostHeliumAdapterAppLovin ChartboostMediationAdapterAppLovin
Chartboost N/A ChartboostMediationAdapterChartboost
Digital Turbine Exchange ChartboostHeliumAdapterFyber hartboostMediationAdapterDigitalTurbineExchange
Google Bidding ChartboostHeliumAdapterGoogleBidding ChartboostMediationAdapterGoogleBidding
InMobi ChartboostHeliumAdapterInMobi ChartboostMediationAdapterInMobi
IronSource ChartboostHeliumAdapterIronSource ChartboostMediationAdapterIronSource
Meta Audience Network ChartboostHeliumAdapterFAN ChartboostMediationAdapterMetaAudienceNetwork
Mintegral ChartboostHeliumAdapterMintegral ChartboostMediationAdapterMintegral
Pangle ChartboostHeliumAdapterPangle ChartboostMediationAdapterPangle
Unity Ads ChartboostHeliumAdapterUnity ChartboostMediationAdapterUnityAds
Vungle ChartboostHeliumAdapterVungle ChartboostMediationAdapterVungle

Public API 🔗

Module Name 🔗

As part of the rebranding effort, the name of the module has changed. You can easily perform a find and replace in the code base.

The following table shows the various Objective-C and Swift module imports and their renamed equivalents:

Helium 3.X Chartboost Mediation 4.0.0
#import <HeliumSdk/HeliumSdk.h> #import <ChartboostMediationSDK/ChartboostMediationSDK.h>
import HeliumSdk import ChartboostMediationSDK

Load Request Identifier 🔗

The load request identifier has been moved from being a return value from loads to a parameter in the load completion delegate callback.

Heliuim 3.x

  • if let banner = Helium.shared().bannerProvider(with: self, andPlacementName: "your placement", andSize: .standard) {
        let requestIdentifier = banner.load(with: self)
        // Handle `requestIdentifier`
    }
    
  • HeliumBannerView *banner = [[Helium sharedHelium] bannerProviderWithDelegate:self andPlacementName:@"your placement" andSize:CHBHBannerSize_Standard];
    if (banner != nil) {
            NSString *requestIdentifier = [banner loadAdWithViewController:self];
            // Handle `requestIdentifier`
    }
    

Mediation 4.x

  • func heliumBannerAd(placementName: String, requestIdentifier: String, winningBidInfo: [String : Any]?, didLoadWithError error: ChartboostMediationError?) {
        // Handle `requestIdentifier`
    }
    
  • - (void)heliumBannerAdWithPlacementName:(NSString * _Nonnull)placementName requestIdentifier:(NSString * _Nonnull)requestIdentifier winningBidInfo:(NSDictionary<NSString *,id> * _Nullable)winningBidInfo didLoadWithError:(ChartboostMediationError * _Nullable)error {
        // Handle `requestIdentifier`
    }
    

Interstitial 🔗

Helium 3.x

  • if let interstitial = Helium.shared().interstitialAdProvider(with: self, andPlacementName: "your placement") {
        let requestIdentifier = interstitial.load()
        // Handle `requestIdentifier`
    }
    
  • id<HeliumInterstitialAd> interstitial = [[Helium sharedHelium] interstitialAdProviderWithDelegate:self andPlacementName:@"your placement"];
    if (interstitial != nil) {
        NSString *requestIdentifier = [interstitial loadAd];
        // Handle `requestIdentifier`
    }
    
    

Mediation 4.x

  • func heliumInterstitialAd(withPlacementName placementName: String, requestIdentifier: String, winningBidInfo: [String : Any]?, didLoadWithError error: ChartboostMediationError?) {
        // Handle `requestIdentifier`
    }
    
    
  • - (void)heliumInterstitialAdWithPlacementName:(NSString * _Nonnull)placementName requestIdentifier:(NSString * _Nonnull)requestIdentifier winningBidInfo:(NSDictionary<NSString *,id> * _Nullable)winningBidInfo didLoadWithError:(ChartboostMediationError * _Nullable)error {
        // Handle `requestIdentifier`
    }
    

Rewarded 🔗

Helium 3.x

  • if let rewarded = Helium.shared().rewardedAdProvider(with: self, andPlacementName: "your placement") {
        let requestIdentifier = rewarded.load()
        // Handle `requestIdentifier`
    }
    
  • id<HeliumRewardedAd> rewarded = [[Helium sharedHelium] rewardedAdProviderWithDelegate:self andPlacementName:@"your placement"];
    if (rewarded != nil) {
        NSString *requestIdentifier = [rewarded loadAd];
        // Handle `requestIdentifier`
    }
    

Mediation 4.x

  • func heliumRewardedAd(withPlacementName placementName: String, requestIdentifier: String, winningBidInfo: [String : Any]?, didLoadWithError error: ChartboostMediationError?) {
        // Handle `requestIdentifier`
    }
    
  • - (void)heliumRewardedAdWithPlacementName:(NSString * _Nonnull)placementName requestIdentifier:(NSString * _Nonnull)requestIdentifier winningBidInfo:(NSDictionary<NSString *,id> * _Nullable)winningBidInfo didLoadWithError:(ChartboostMediationError * _Nullable)error {
        // Handle `requestIdentifier`
    }
    

Clear Loaded Ad 🔗

The return value for clearLoadedAd() has been removed, and it is assumed to succeed.

Helium 3.x

  • let success = banner.clear()
    
  • BOOL success = [banner clearAd];
    

Mediation 4.x

  • // The result of `clear` is assumed to succeed.
    banner.clear()
    
  • // The result of `clearAd` is assumed to succeed.
    [banner clearAd];
    

Interstitial 🔗

Helium 3.x

  • let success = interstitial.clearLoadedAd()
    
  • BOOL success = [interstitial clearLoadedAd];
    

Mediation 4.x

  • // The result of `clearLoadedAd` is assumed to succeed.
    interstitial.clearLoadedAd()
    
  • // The result of `clearLoadedAd` is assumed to succeed.
    [interstitial clearLoadedAd];
    

Rewarded 🔗

Helium 3.x

  • let success = rewarded.clearLoadedAd()
    
  • BOOL success = [rewarded clearLoadedAd];
    

Mediation 4.x

  • // The result of `clearLoadedAd` is assumed to succeed.
    rewarded.clearLoadedAd()
    
  • // The result of `clearLoadedAd` is assumed to succeed.
    [rewarded clearLoadedAd];
    

Merge Winning Bid Information with Load Completion 🔗

The optional winning bid delegates have been merged into the load completion delegate callbacks.

Helium 3.x

  • func heliumBannerAd(placementName: String, didLoadWinningBidWithInfo bidInfo: [String : Any]) {
        // Handle `bidInfo`
    }
    
  • - (void)heliumBannerAdWithPlacementName:(NSString *)placementName didLoadWinningBidWithInfo:(NSDictionary<NSString *,id> *)bidInfo {
        // Handle `bidInfo`
    }
    

Mediation 4.x

  • func heliumBannerAd(placementName: String, requestIdentifier: String, winningBidInfo: [String : Any]?, didLoadWithError error: ChartboostMediationError?) {
        // Handle `winningBidInfo`
    }
    
  • - (void)heliumBannerAdWithPlacementName:(NSString * _Nonnull)placementName requestIdentifier:(NSString * _Nonnull)requestIdentifier winningBidInfo:(NSDictionary<NSString *,id> * _Nullable)winningBidInfo didLoadWithError:(ChartboostMediationError * _Nullable)error {
        // Handle `winningBidInfo`
    }
    

Interstitial 🔗

Helium 3.x

  • func heliumInterstitialAd(withPlacementName placementName: String, didLoadWinningBidWithInfo bidInfo: [String : Any]) {
        // Handle `bidInfo`
    }
    
  • - (void)heliumInterstitialAdWithPlacementName:(NSString *)placementName didLoadWinningBidWithInfo:(NSDictionary<NSString *,id> *)bidInfo {
        // Handle `bidInfo`
    }
    

Mediation 4.x

  • func heliumInterstitialAd(withPlacementName placementName: String, requestIdentifier: String, winningBidInfo: [String : Any]?, didLoadWithError error: ChartboostMediationError?) {
        // Handle `winningBidInfo`
    }
    
  • - (void)heliumInterstitialAdWithPlacementName:(NSString * _Nonnull)placementName requestIdentifier:(NSString * _Nonnull)requestIdentifier winningBidInfo:(NSDictionary<NSString *,id> * _Nullable)winningBidInfo didLoadWithError:(ChartboostMediationError * _Nullable)error {
        // Handle `winningBidInfo`
    }
    

Rewarded 🔗

Helium 3.x

  • func heliumRewardedAd(withPlacementName placementName: String, didLoadWinningBidWithInfo bidInfo: [String : Any]) {
        // Handle `bidInfo`
    }
    
  • - (void)heliumRewardedAdWithPlacementName:(NSString *)placementName didLoadWinningBidWithInfo:(NSDictionary<NSString *,id> *)bidInfo {
        // Handle `bidInfo`
    }
    

Mediation 4.x

  • func heliumRewardedAd(withPlacementName placementName: String, requestIdentifier: String, winningBidInfo: [String : Any]?, didLoadWithError error: ChartboostMediationError?) {
        // Handle `winningBidInfo`
    }
    
  • - (void)heliumRewardedAdWithPlacementName:(NSString * _Nonnull)placementName requestIdentifier:(NSString * _Nonnull)requestIdentifier winningBidInfo:(NSDictionary<NSString *,id> * _Nullable)winningBidInfo didLoadWithError:(ChartboostMediationError * _Nullable)error {
        // Handle `winningBidInfo`
    }
    

New Rewarded Callback 🔗

The integer value from the old reward callback has been removed since it never provided useful information.

Rewarded 🔗

Helium 3.x

  • func heliumRewardedAd(withPlacementName placementName: String, didGetReward reward: Int) {
        // Old reward was an integer and never provided useful information
    }
    
  • - (void)heliumRewardedAdWithPlacementName:(NSString *)placementName didGetReward:(NSInteger)reward {
        // Old reward was an integer and never provided useful information
    }
    

Mediation 4.x

  • func heliumRewardedAdDidGetReward(withPlacementName placementName: String) {
        // Rewarding was successful
    }
    
  • - (void)heliumRewardedAdDidGetRewardWithPlacementName:(NSString * _Nonnull)placementName {
        // Rewarding was successful
    }
    

Error Codes 🔗

Helium 4.0.0 introduces a new system of errors (plus dozens of brand new ones) complete with diagnosis and recommendation.

See Error Codes for more information.