invertase / react-native-firebase

🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
https://rnfirebase.io
Other
11.65k stars 2.21k forks source link

[📚] AdMob - use `@invertase/react-native-google-ads` #5329

Closed mmskvortsov closed 2 years ago

mmskvortsov commented 3 years ago

AdMob documentation availability

Hi there! I've noticed that AdMob documentation is not available on the official website: https://rnfirebase.io/admob There is a 404 error:

image

Is there any issue with that or this part of documentation turned off intentionally? Thanks!

Deodes commented 3 years ago

Try this link

mikehardy commented 3 years ago

This came up as a comment on an unrelated issue and I think I may understand the confusion now - pasting in my comment from there:

Ah - sorry, we've already merged the change where Admob is removed from firebase following it's removal upstream, and the documentation site goes live immediately after merges to main branch.

It is not as great of an experience but for now until we have the admob code re-hosted in a non-firebase repo you can go direct to the usage docs and types / API reference from the v11.5.0 (current stable) tag

https://github.com/invertase/react-native-firebase/tree/v11.5.0/docs/admob https://github.com/invertase/react-native-firebase/blob/v11.5.0/packages/admob/lib/index.d.ts

Normally it's a great thing that the docs site is updated immediately between releases, but in this case it means the documentation for a module that is still live (and will always be, in that version) is gone. I'll have to think on that to see if there's some better way we can keep docs for old versions alive as they are still quite useful

mikehardy commented 3 years ago

I've pinned this issue for others

mmskvortsov commented 3 years ago

@mikehardy Thanks for clarification!

Kamani commented 3 years ago

@mikehardy Sorry it may seem stupid question but please help me. You said Admob is removed. does it mean that we will be not able to use yarn add @react-native-firebase/admob? As document is not available does it mean that? I would like to understand as I am creating app and want to integrate package I can go ahead right?

mikehardy commented 3 years ago

@Kamani v11.5.0 contains admob. That is the current latest release so you may use the command you mention. As admob will not be in the next release, it may be best to specify the version precisely so it does not auto-update other packages, all of your react-native-firebase packages should be pinned to exactly '@11.5.0' vs having any semver range

Kamani commented 3 years ago

@mikehardy Thank you for your reply. I really appriciate. Admob will be again integrade in future release? Or you guys are planning to remove it permenantly?

mikehardy commented 3 years ago

It's gone from upstream. The Google Firebase team have removed it. We track them. It will never be in react-native-firebase again.

We have plans to re-host the code on an external repository, but you will not be able to update react-native-firebase and use admob at the same time until we do so

This may not be great to hear but please understand we are downstream consumers of the SDKs. This is not our decision.

Kamani commented 3 years ago

@mikehardy I can understand. Thank you for explaining in detail. May be this detailed comment will be also useful for new users.

bezenson commented 3 years ago

Maybe someone knows great alternative admob libraries which are supported today?

mikehardy commented 3 years ago

V11.5 was just fine 2 days ago and is still fine today? Please be a little patient and the code will be in a new repo. Or there is react-native-admob I think?

bezenson commented 3 years ago

V11.5 was just fine 2 days ago and is still fine today? Please be a little patient and the code will be in a new repo. Or there is react-native-admob I think?

Oh, if you are going to create separate library then it is cool.

react-native-admob last updated 2 years ago and I had problems while installing on 0.64 RN

ifsnow commented 3 years ago

@mikehardy Thank you for your hard work and responses.

Do you have an expected timeline for @invertase/react-native-admob? I'm worried that I will not be able to apply the new version of react-native-firebase for a long time. There is no problem at all right now :)

mikehardy commented 3 years ago

Unfortunately not, and with admob it's a little tricky because even before the most recent change the code here was already in need of a breaking forward port #5150 - that forward port itself means that step 1 is simply to move the code, step 2 is then to forward port it (otherwise there will be collisions for folks trying to use up to date GoogleAppMeasurement symbols - which Firebase Analytics shares).

This is all unfunded work so it's a lower priority - I do love making things work but I have to prioritize as there is of course an infinite task queue ;-).

If you wanted to help it would be really really welcome and even before moving (step 1 as I listed it) it is actually possible to start with what I listed as step 2 by branching from the v11.5.0 tag here and beginning the forward port based on google documentation. Any work done here can then be merged onto a branch and I'll just use the branch for the repo extraction, but the forward port work will have the support of all our E2E testing / test app infrastructure which is tremendously helpful I think.

mikehardy commented 3 years ago

That offer is open to anyone of course! Any future admob repo will have to have a large community participation to move forward, but the test infrastructure and CI and build/release tooling and stuff - that's what we / the future repo will get all for free so it's easy to contribute I hope.

aleluiah commented 3 years ago

setDebugGeography dosen't reflect even when i whitelist my deviceId

spazfeed commented 3 years ago

Use react-native-admob-next for admob this is based on expo-ads-admob.

mikehardy commented 3 years ago

That sounds good and could be a good solution @spazfeed do you know if it's already forward-ported to the new AdMob breaking changes? I'm just curious, because we are not forward-ported here, and if that library already is then it is ahead of anything we'd have by splitting the previous code here out

mars-lan commented 3 years ago

That sounds good and could be a good solution @spazfeed do you know if it's already forward-ported to the new AdMob breaking changes? I'm just curious, because we are not forward-ported here, and if that library already is then it is ahead of anything we'd have by splitting the previous code here out

Most probably not. It's still on v19 (Android) & v7 (iOS).

nonth commented 3 years ago

That sounds good and could be a good solution @spazfeed do you know if it's already forward-ported to the new AdMob breaking changes? I'm just curious, because we are not forward-ported here, and if that library already is then it is ahead of anything we'd have by splitting the previous code here out

Most probably not. It's still on v19 (Android) & v7 (iOS).

I just create pull request for update Mobile Ads SDK here or you can use it directly from my fork

Mikenso commented 3 years ago

It seems like @invertase/react-native-admob has huge advantage (comparing to react-native-admob-next) as it allows to create few interstitial instances and react-native-admob-next does not (correct me if I am wrong) So I hope @invertase/react-native-admob will find itself in good hands of developer

mikehardy commented 3 years ago

Still on the radar as something to port out yes but I was curious yes if it still had value compared to any other efforts, thanks for chiming in

teamseamive commented 3 years ago

Any plans to update AdMob & IID to the latest version? Stuck on 11.5.0 due to both.

quan2nd commented 3 years ago

I hope you develop admob-next soon. Currently all the admob react native libraries I see have errors, or are not updated to the latest GMA. Thank you firebase/Admob 11.5 worked great for me

mikehardy commented 3 years ago

I'm going to re-open this issue as it is where I/we point most people, and it should be clear that admob as a separate repo is still an active item in our backlog. I will issue announcements here as I have them.

sdb1228 commented 3 years ago

Hey @mikehardy I assume most people make money off of this integration/package existing. Is there a price tag on getting this to work/migrated? I personally wouldn’t mind donating money towards this specific feature given its longevity is crucial for my future apps viability.

I could also dedicate time obviously as well to get this to work but I assure you it would take me triple the time it might take someone else who is more familiar with the underlying tech and I would be more than happy to pay someone with more experience to do it.

tarouboy commented 3 years ago

Agree with @sdb1228 I wouldn't mind paying for a well maintained package. How about making it a paid package like Notifee?

Acetyld commented 3 years ago

Agree with @sdb1228 I wouldn't mind paying for a well maintained package. How about making it a paid package like Notifee?

100% feeling the same. There is as far as i know nothing that uses new format or that uses the old one and is being updated. There is one but that only uses native ones. And yhea again donating/paying is no problem. (Preferably one time payment or a subscription format wich is reasonable)

bezenson commented 3 years ago

For myself I found https://github.com/appodeal/react-native-appodeal. It is not only AdMob, but it works fine on latest RN

Acetyld commented 3 years ago

For myself I found https://github.com/appodeal/react-native-appodeal. It is not only AdMob, but it works fine on latest RN

These are the comments i love! Thank you so Appodeal is a alternative to admob. This look amazing! I might try it.

tarouboy commented 3 years ago

For myself I found https://github.com/appodeal/react-native-appodeal. It is not only AdMob, but it works fine on latest RN

Appodeal is a good alt but I have concern about how they use and collect all the data. :/

Acetyld commented 3 years ago

For myself I found https://github.com/appodeal/react-native-appodeal. It is not only AdMob, but it works fine on latest RN

Do you got a demo project perhaps, setting it up currently, did you do the admob adapter etcc as wel? Because the RN documentantion is pretty minimal or maybe @tarouboy has a github repo?

bezenson commented 3 years ago

For myself I found https://github.com/appodeal/react-native-appodeal. It is not only AdMob, but it works fine on latest RN

Do you got a demo project perhaps, setting it up currently, did you do the admob adapter etcc as wel? Because the RN documentantion is pretty minimal or maybe @tarouboy has a github repo?

I can't check admob now, because I am banned for 30 days for now, but actually you should enable AdMob in Appodeal dashboard and thats it. Nothing from app code side.

mikehardy commented 3 years ago

For my part, I wish I just had a shiny new git URL to point you all at :-). It is still on my general priority list but sadly just has not hit the #1 spot yet relative to priorities that have a direct obligation (that is: are directly related to Firebase and Firebase APIs). I have surfaced this to the Invertase folks tho, perhaps there is potential for a Notifee-like library that's free to test-integrate and has a one-time license etc but then has a funding model for sustained / higher-priority effort.

khalisafkari commented 3 years ago

I use the react native firebase plugin but I don't use the admob plugin because I write using tapdaq.com because it's easier to manage ads and supports mediatation and fbads bidding

if you like you can try to see my repo https://github.com/khalisafkari/react-native-tapdaq-ad

but I haven't written the installation document and api but you can see the api in the src folder

birdofpreyru commented 3 years ago

These attempts to sell 3rd party ads-related products are annoying. The time it takes Invertase to update and split the library is also annoying, considering quite small size of the package in question. I'm considering to do my own fork with blackjack and hookers 🤖

wjaykim commented 3 years ago

Check out my new package https://github.com/react-native-admob/admob, which supports new SDK versions and newly added hooks for Interstitial and Rewarded Ad.

mars-lan commented 3 years ago

Check out my new package https://github.com/react-native-admob/admob, which supports new SDK versions and newly added hooks for Interstitial and Rewarded Ad.

@wjaykim Thanks fo this great library. ~Please see my comments in https://github.com/react-native-admob/admob/issues/2~ Please consider merging https://github.com/react-native-admob/admob/pull/1

mikehardy commented 3 years ago

@wjaykim - looks cool - I notice in the install instructions there is no version of admob specified - what's the version compatibility like? Is it all forward-ported to the new versions of AdMob (and thus compatible with analytics / google app measurement pulled in from here)?

wjaykim commented 3 years ago

@wjaykim - looks cool - I notice in the install instructions there is no version of admob specified - what's the version compatibility like? Is it all forward-ported to the new versions of AdMob (and thus compatible with analytics / google app measurement pulled in from here)?

I believe for now it's compatible for all Google Mobile Ads SDK version 8+ for iOS and 20+ for Android, but I have not tested with all of them.

mars-lan commented 3 years ago

I believe for now it's compatible for all Google Mobile Ads SDK version 8+ for iOS and 20+ for Android, but I have not tested with all of them.

In that case you may wish to add the valid version range in Podfile & build.gradle.

birdofpreyru commented 3 years ago

Not sure I support the enthusiasm over the new package by @wjaykim. At a brief look it does not seem to be a fork of this (Invertase's) library, which IMHO was the best RN AdMob library so far, and it uses a different API, thus not a simple drop-in replacement. Not sure it supports ads personalization opt-in/-out, as this lib does. Also other comments pointing out it was not packaged and distributed as per best practices do not increase my trust in it :(

unstableair commented 3 years ago

At least it's in active development (3 commits today, 3 yesterday), @wjaykim seems responsive to feedback and accepts PRs It's the only RN admob solution I can find that supports the latest major release of the admob SDK Regarding personalisation, for some time the Invertase library was broken and ONLY showed non-personalised ads (https://github.com/invertase/react-native-firebase/pull/5262), so no-one always gets it right first time. It might not be production ready (I haven't tried it yet) but the dev deserves support and encouragement.

birdofpreyru commented 3 years ago

no-one always gets it right first time

Exactly, and this is a general wisdom, that's why my criticism: it would be a way better to build upon Invernase lib, rather than building from scratch and re-inventing the wheel.

wjaykim commented 3 years ago

@birdofpreyru Yes, it is true. My package is under active development and many new issues are opening more than I expected. Also since the package is my first attempt to distribute to public, so the package may not follow best practices as other general packages does. So please understand those points 😅

Mikenso commented 3 years ago

So will '@invertase/react-native-admob' ever be officially port out as separate npm package, at least as it is at 11.5.0 version?

huseyin39 commented 3 years ago

Guys, @react-native-firebase/admob@v11.5.0 is compatible with wich version of RN ?It's crashing with RN 0.64.

Mikenso commented 3 years ago

@huseyin39 It's crashing when you have latest gms sdk at your project. Doesn't matter if it is RN 0.64

huseyin39 commented 3 years ago

@Mikenso which version of the gms sdk are we supposed to have?

Mikenso commented 3 years ago

@huseyin39 for Android It is 19.8.0