I'm getting an error on the iOS version when I specify ad sizes. For example:
<admob:BannerAd x:Name="FeedBannerAd" AdUnitId="{x:Static config:Constants.BannerAdId}" AdSize="LargeBanner" BackgroundColor="Transparent" Margin="0,10" />
This throws the error below:
System.NullReferenceException: Object reference not set to an instance of an object. at Google.MobileAds.AdSizeCons.get_LargeBanner() at Plugin.AdMob.Handlers.BannerAdHandler.GetAdSize() at Plugin.AdMob.Handlers.BannerAdHandler.CreatePlatformView() at Microsoft.Maui.Handlers.ViewHandler2[[Plugin.AdMob.BannerAd, Plugin.AdMob, Version=1.0.3.0, Culture=neutral, PublicKeyToken=null]`
I'm getting an error on the iOS version when I specify ad sizes. For example:
<admob:BannerAd x:Name="FeedBannerAd" AdUnitId="{x:Static config:Constants.BannerAdId}" AdSize="LargeBanner" BackgroundColor="Transparent" Margin="0,10" />
This throws the error below:
System.NullReferenceException: Object reference not set to an instance of an object. at Google.MobileAds.AdSizeCons.get_LargeBanner() at Plugin.AdMob.Handlers.BannerAdHandler.GetAdSize() at Plugin.AdMob.Handlers.BannerAdHandler.CreatePlatformView() at Microsoft.Maui.Handlers.ViewHandler
2[[Plugin.AdMob.BannerAd, Plugin.AdMob, Version=1.0.3.0, Culture=neutral, PublicKeyToken=null]`Removing
AdSize="LargeBanner"
resolves the issue.