duyduong / flutter_native_admob

Plugin to integrate native firebase admob to Flutter application
MIT License
62 stars 85 forks source link

iOS crash when trying to load an ad #63

Open aacbbc9 opened 4 years ago

aacbbc9 commented 4 years ago

When I use this plugin to show the native ads, my iOS app crashes with the below exception:

'NSInvalidArgumentException', reason: '-[UIImageView autoSetDimensionsToSize:]: unrecognized selector sent to instance It appears that Exception is thrown from NativeAdView.swift file

let adIconView: UIImageView = { let imageView = UIImageView() imageView.autoSetDimensions(to: CGSize(width: 40, height: 40)) return imageView }()

I have got the required properties in the info.plist file (GADApplicationIdentifier and io.flutter.embedded_views_preview).

What could be the reason for this?

pacifio commented 4 years ago

Facing the same issue I am using an ios simulator and it crashes everytime

aacbbc9 commented 4 years ago

I could solve this issue by upgrading to the latest version of flutter.