bdlukaa / native_admob_flutter

Easy-to-make native ads in flutter using AdMOB SDK.
https://pub.dev/packages/native_admob_flutter
BSD 3-Clause "New" or "Revised" License
80 stars 56 forks source link

Fix: Bug Cannot find 'kGADAdSizeBanner' in scope #134

Closed yusriltakeuchi closed 2 years ago

yusriltakeuchi commented 2 years ago

I found this bug happening in several other people, not just me. Examples of this: #133

When I saw the error, i think that kGADAdSizeBanner couldn't longer be used as the default. So I made a small change like the following:

In native_admob_flutter/ios/Classes/Banner/BannerAdView.swift line 9: I Change from:

private var adSize: GADAdSize = kGADAdSizeBanner

to :

private var adSize: GADAdSize = GADAdSizeFromCGSize(CGSize(width: 320, height: 100))

This will make the default large banner if the size is not specified, as shown in line 38. Well i hope @bdlukaa will merge this PR.