-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null reference on iOS when adding banner to page #134
Comments
Hi @GreenleafDk, were you able to resolve this issue, I have been battling for a few days now but haven't got into any solution yet. Much appreciated if you have any comments, please |
Yes and no. This was tested, and failing, on a physical ipad and iphone, both a bit dated, and it failed when debugging locally (both debug and release)... but when making a release build for ios store and installing from there, and then running, on those same two devices, there was no issue. This may or may not be helpful for you, and I honestly don't understand exactly what is going on, but the issue became a bit of a non issue that way. Same was happened with an issue with microsoft appcenter, which crashed on null exception in test (debug and release builds), but worked fine when installing from store and then running. |
Thanks for your response @GreenleafDk, you are lucky to get it working, for me it's crashing on physical device both from local and from the store (returning null) but works perfectly on the simulator. I might have to disable it for now unless @marcojak comes out with any solution. |
Hi, let me have a look if I can identify the issue and release a new version that fixes the issue. |
MTAdmob 1.9.0.6
Xamarin forms 5.0.0.2545
iOS 15.7.5
Works fine on Android but crashes for iOS with
ObjectReference not set to an instance of an object.mscorelib at Google.MobileAds.AdSizeCons.get_Banner()
at MarcTron.Plugin.Renderers-AdViewRenderer.GetAdSize
Basic repro case:
New empty page
public PageName()
{
InitializeComponent() ;
MYAdView adv = MTAdView();
StackLayoutOnPage.Children.Add(adv);
}
On adding to the UI, the null reference is thrown.
Tried setting this up in multiple ways, in xaml and in code, with and without setting the properties for banner type, size, addId etc. Always fails on this basic initial rendering. Same settings work fine without issue for android.
The text was updated successfully, but these errors were encountered: