marcojak / MTAdmob

Admob plugin for Xamarin Android and iOS
https://www.xamarinexpert.it/admob-made-easy/
160 stars 26 forks source link

Ios ads suddenly stopped #73

Open liamkavfc opened 3 years ago

liamkavfc commented 3 years ago

This isn’t a problem with the plug-in but I wonder if anyone has had this problem with AdMob too…

So when I put my app live my ads works perfect, 1 week later, the ads stopped appearing. I am getting request but match rate is 0%. All my account details are filled in etc. But now the test ads won’t even show in test mode now, anyone had this? The test ads still show in my test android app using the same Xaml element

ShadowOfPhantom commented 3 years ago

Hey! I faced the same and submitted the issue and solution here: https://github.com/marcojak/MTAdmob/issues/74 I don’t know if it’s applicable for iOS, I haven’t tested it yet because currently xcode 13 is unsupported but seems like it’s applicable for both android and ios. Check it out :)

liamkavfc commented 3 years ago

Yeah it's a weird one because my test ads started working randomly agin now but also my production ad got 1 impression yesterday randomly then went back down to 0 again so I'm not sure how it all works 😅

ShadowOfPhantom commented 3 years ago

Yeah it's a weird one because my test ads started working randomly agin now but also my production ad got 1 impression yesterday randomly then went back down to 0 again so I'm not sure how it all works 😅

Just add your device to list of test devices in your code and use your production ad units as usual, it will work. As far as i can say it’s the only way to show test ads, I still can’t use test ad units :)

bijington commented 3 years ago

I also appear to be seeing this behaviour. I don't know if this information helps at all but so far I have been able to identify these items that may be effecting it:

In the output window I see <Google:HTML> You are currently using version 7.66.0 of the SDK. Please consider updating your SDK to the most recent SDK version (8.12.0) to get the latest features and bug fixes. The latest SDK can be downloaded from https://goo.gl/UoiJ8F. A full list of release notes is available at https://developers.google.com/admob/ios/rel-notes. Given that the newest version is a major change there is the possibility that things could have changed enough to break things.

Currently the Xamarin.Google.iOS.MobileAds library is stuck on 7.66.0 and I can't see when a newer version could be supported yet. https://www.nuget.org/packages/Xamarin.Google.iOS.MobileAds/

In my CrossMTAdmob.Current.OnRewardedVideoAdFailedToLoad callback I am constantly receiving an ErrorCode of 8 which according to this site (https://developers.google.com/android/reference/com/google/android/gms/ads/AdRequest#ERROR_CODE_APP_ID_MISSING) the issue is due to The ad request was not made due to a missing app ID.. I think this backs up a potentially breaking change by Google.

Note I have tested against v1.6.3 and also v1.6.7 and both show the same behaviour. 1.6.3 did used to work.

I shall continue to investigate and report back my findings

bijington commented 3 years ago

Upon further investigation it does appear that the error code of 8 may not be referring to the App Id being missing... I see this message reported every time I receive a failed to load callback.

Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target.

I haven't worked out the cause/fix for this yet though.

bijington commented 2 years ago

OK I finally have my ads loading again. There was no issue with this library or the others it depends on but I wanted to report how I solved mine.

Basically I had to add this line:

google.com, pub-3940256099942544, DIRECT, f08c47fec0942fa0

in to our app-ads.txt file. Now the documentation (https://developers.google.com/admob/ios/test-ads) suggests this is only needed for running test ads this has solved the issue.