dreamsoftin / facebook_audience_network

Flutter Facebook Audience Network
https://pub.dartlang.org/packages/facebook_audience_network/
MIT License
154 stars 95 forks source link

Native Ad wrongly shown on iOS #95

Open ecorradini opened 3 years ago

ecorradini commented 3 years ago

Native ads are wrongly shown on iOS app. IMG_CE87F6A1B914-1 However, the same Native Ad works on Android. IMG_1246 This is the code: FacebookNativeAd( placementId: Platform.isIOS ? "iOS_id" : "Android_id", adType: NativeAdType.NATIVE_AD, backgroundColor: Theme.of(context).backgroundColor, titleColor: Colors.white, descriptionColor: Colors.white, buttonColor: Theme.of(context).accentColor, buttonTitleColor: Colors.white, buttonBorderColor: Theme.of(context).accentColor, keepAlive: true, keepExpandedWhileLoading: false, );

ecorradini commented 3 years ago

Update: Changing to NATIVE_AD_HORIZONTAL for iOS prevents the ad to be shown like the screenshot above. However, the first time the ad is loaded a blank space is left instead of the ad. I've seen that this behavior is caused by keepExpandedWhileLoading: false. Settings this to true the ad is shown correctly the first time. However, if the ad is not loaded it will leave the blank space.

SachinGanesh commented 3 years ago

Yes. keepExpandedWhileLoading is used to prevent the blank space from showing