My AdMob code doesn't work since I linked it to Firebase

54 Views Asked by At

I want to implement Firebase in my project to use the database service. I had already implemented AdMob to display video rewards to users. I have done, as advised, the link between AdMob and Firebase to optimize the presentation of the ads. Only since everything is implemented, my adMob code to load and display the reward video is not working anymore. I get error messages like this:

Instance member 'load' cannot be used on type 'GADRewardedAd'; did you mean to use a value of this type instead?


Contextual closure type '(GADRequestError?) -> Void' expects 1 argument, but 2 were used in closure body

...

But nothing has changed in my code. So unless the way to implement AdMob changes depending on whether you use Firebase or the AdMob SDK, I don't understand why nothing works anymore.

I also import the same module whether I use Firebase or not:

import GoogleMobileAds

So if anyone knows what the problem is I'm interested :)

0

There are 0 best solutions below