Guide for migrating to version 5

Warning.

This is an archived version of the documentation. Actual documentation for all platforms can be found here.

  1. Additions
  2. Changes
  3. Removals
  4. Recommendations

Additions

YMAAdViewDelegate protocol
  • Added the -adViewDidClick: method that notifies you that the user clicked on the banner.

YMAInterstitialAdDelegate protocol
  • Added the -interstitialAdDidClick: method that notifies you that the user clicked on the ad.

YMANativeAdDelegate protocol
  • Added the -nativeAdDidClick: method that notifies your that the user clicked on the ad.

YMARewardedAdDelegate protocol
  • Added the -rewardedAdDidClick: method that notifies you that the user clicked on the ad.

Changes

YMAAdView class
  • The blockID property was renamed adUnitID.

  • The -initWithBlockID:adSize: method was renamed -initWithAdUnitID:adSize:.

YMAInterstitialAd class
  • The blockID property was renamed adUnitID.

  • The -initWithBlockID: method was renamed -initWithAdUnitID:.

YMANativeAdRequestConfiguration class
  • The blockID property was renamed adUnitID.

  • The -initWithBlockID: method was renamed -initWithAdUnitID:.

YMARewardedAd class
  • The blockID property was renamed adUnitID.

  • The -initWithBlockID: method was renamed -initWithAdUnitID:.

Removals

YMAAdSize class

Removed the following methods:

  • +flexibleSize
  • +flexibleSizeWithContainerWidth:

Recommendations

Version 4.X.Y Version 5

YMAAdSize *adSize = [YMAAdSize flexibleSizeWithContainerWidth:width];

Removed, an alternative option is YMAAdSize *adSize = [YMAAdSize fixedSizeWithCGSize:size];

YMAAdSize *adSize = [YMAAdSize flexibleSize:width];

Removed, an alternative options is YMAAdSize *adSize = [YMAAdSize fixedSizeWithCGSize:size];

YMAAdView *adView = [[YMAAdView alloc] initWithBlockID:<BlockID> adSize:adSize];

The BlockID parameter is no longer supported, use the new parameter AdUnitID:YMAAdView *adView = [[YMAAdView alloc] initWithAdUnitID:<AdUnitID> adSize:adSize];

YMAInterstitialAd *interstitialAd = [[YMAInterstitialAd alloc] initWithBlockID:<BlockID>];

The BlockID parameter is no longer supported, use the new parameter AdUnitID:YMAInterstitialAd *interstitialAd = [[YMAInterstitialAd alloc] initWithAdUnitID:<AdUnitID>];

YMARewardedAd *rewardedAd = [[YMARewardedAd alloc] initWithBlockID:<BlockID>];

The BlockID parameter is no longer supported, use the new parameter AdUnitID:YMARewardedAd *rewardedAd = [[YMARewardedAd alloc] initWithAdUnitID:<AdUnitID>];

YMANativeAdRequestConfiguration *requestConfiguration =
        [[YMANativeAdRequestConfiguration alloc] initWithBlockID:<BlockID>];
The BlockID parameter is no longer supported, use the new parameter named AdUnitId:
YMANativeAdRequestConfiguration *requestConfiguration =
        [[YMANativeAdRequestConfiguration alloc] initWithAdUnitID:<AdUnitID>];                             
Version 4.X.Y Version 5

YMAAdSize *adSize = [YMAAdSize flexibleSizeWithContainerWidth:width];

Removed, an alternative option is YMAAdSize *adSize = [YMAAdSize fixedSizeWithCGSize:size];

YMAAdSize *adSize = [YMAAdSize flexibleSize:width];

Removed, an alternative options is YMAAdSize *adSize = [YMAAdSize fixedSizeWithCGSize:size];

YMAAdView *adView = [[YMAAdView alloc] initWithBlockID:<BlockID> adSize:adSize];

The BlockID parameter is no longer supported, use the new parameter AdUnitID:YMAAdView *adView = [[YMAAdView alloc] initWithAdUnitID:<AdUnitID> adSize:adSize];

YMAInterstitialAd *interstitialAd = [[YMAInterstitialAd alloc] initWithBlockID:<BlockID>];

The BlockID parameter is no longer supported, use the new parameter AdUnitID:YMAInterstitialAd *interstitialAd = [[YMAInterstitialAd alloc] initWithAdUnitID:<AdUnitID>];

YMARewardedAd *rewardedAd = [[YMARewardedAd alloc] initWithBlockID:<BlockID>];

The BlockID parameter is no longer supported, use the new parameter AdUnitID:YMARewardedAd *rewardedAd = [[YMARewardedAd alloc] initWithAdUnitID:<AdUnitID>];

YMANativeAdRequestConfiguration *requestConfiguration =
        [[YMANativeAdRequestConfiguration alloc] initWithBlockID:<BlockID>];
The BlockID parameter is no longer supported, use the new parameter named AdUnitId:
YMANativeAdRequestConfiguration *requestConfiguration =
        [[YMANativeAdRequestConfiguration alloc] initWithAdUnitID:<AdUnitID>];