ChartBoost / chartboost-mediation-unity-sdk

Chartboost Mediation Unity SDK provides support for Unity based games to easily integrate Chartboost Mediation for Android & iOS platforms
https://www.chartboost.com/mediate
MIT License
8 stars 3 forks source link

[HB-6516] Create a Separate Size Object for Newer Banner API Instead of Updating the Size from Deprecated API #173

Closed kushG closed 1 year ago

kushG commented 1 year ago

With new banner API the currently existing ChartboostMediationBannerAdSize enum is converted into a class and the existing values are replaced with static variables to support backward compatibility. This means

enum ChartboostMediationBannerAdSize {
  Standard,
  Medium,
  Leaderboard
}

becomes

class ChartboostMediationBannerAdSize {
  public static readonly ChartboostMediationBannerAdSize Standard;
  public static readonly ChartboostMediationBannerAdSize Medium;
  public static readonly ChartboostMediationBannerAdSize Leaderboard;
}

This may work while requesting a fixed size banner without breaking old API but will break publisher's code if they are using enum related properties of this size object. For example, if pubs are using this enum's int value to compare sizes their code will break since this is no longer an enum but a class

With this PR, we will keep the original size enum as it is to have the deprecated APIs working and create a new size class ChartboostMediationBannerSize (no Ad in name ) which will simply be a rename of ChartboostMediationBannerAdSize to ChartboostMediationBannerSize

github-actions[bot] commented 1 year ago

Test Results

1 tests  ±0   1 :heavy_check_mark: ±0   0s :stopwatch: ±0s 1 suites ±0   0 :zzz: ±0  1 files   ±0   0 :x: ±0 

Results for commit 844b89cf. ± Comparison against base commit 98930e46.