Closed mmskvortsov closed 2 years ago
v11.5.0 was issued while react-native 0.64 existed and should work fine with it @Mikenso yes it will - it took a long long time to get the AppCheck module up but I just finished that work #5581 which was blocking everything since approximately May. A more rapid tempo will resume here now https://github.com/invertase/react-native-firebase/commits/master ...
@Mikenso Which SDK are you talking about? This one "implementation 'com.google.android.gms:play-services-ads:19.8.0'" on app/build.gradle ?
I added it alogn with "classpath('com.google.gms:google-services:4.2.0')" on build.gradle and still crashing:
The error is *Invalid application ID.
Thank you.
@huseyin39 I have in app/build.gradle classpath 'com.google.gms:google-services:4.3.4'
, and it works. I don't think I have com.google.android.gms:play-services-ads
explicitly mentioned in gradle files.
@huseyin39 Try these classpath 'com.android.tools.build:gradle:4.2.2' classpath 'com.google.gms:google-services:4.3.8
The error is *Invalid application ID
Maybe you forgot to add application ID at root folder
Wish I would have that deeper knowledge so that I could help out 😞
Ok guys, it seems working thanks I had indeed an issue with the ID and the version of gms!
We still have plans to shift our AdMob implementation from v11.5 out to a standalone and then update it and if you've seen the flurry of activity here recently (just released Installations module, App Distribution module, App Check module!) you'll see I've nearly cleared the backlog that built up while I was solving a nasty App Check issue.
I'm mostly writing to say that if you are still using react-native-firebaes v11.5 to access the AdMob APIs, there was an issue with react-native v0.65 that caused warnings in the log - #5614 but as I went to fix it with #5616 it did not seem like the log warnings were an actual problem. No, they aren't great but if you need the combination of react-native-firebase v11.5.0 and react-native v0.65+ it should be okay to try and then use, if it works for you.
@mikehardy when can we expect the Admob shift and what Admob package do you recommend to use as standalone until then?
Soon. V11.5 here.
Yeah, I am so sponsoring this!! Awesome job @mikehardy
@mikehardy Hello, side question. Since I use @react-native-firebase/admob
, I don't see this in rnfirebase documentation but do I have to add com.google.android.gms:play-services-ads
in my app/build.gradle
file? I do have classpath 'com.google.gms:google-services:
in my main build.gradle and the ads worked sometimes but Google kept limiting my ads so I'm not sure if that is because I'm missing com.google.android.gms:play-services-ads
in my app/build.gradle
file
Thank you
Google may limit ads for any number of reasons, none of which we can help with unfortunately. If the ads worked at all, the software is working, that's the only knowable thing, as a module maintainer. Sorry I can't help more
@mikehardy I know they do this to a lot of people but my question is more on the implementation is if I have to add com.google.android.gms:play-services-ads to my app/build.gradle file if I'm already using @react-native-firebase/admob
since it's not in rnfirebase doc but it's in Google Admob SDK doc
So you can do . /gradlew :app:dependencies
(I think that is the right command) and save the output and see your whole android dependency tree. You can also see what we add to the build.gradle by just looking at it in node_modules right? Investigate, experiment, it's the best way
@mikehardy thank you!
@mikehardy would like to help with upgrading to the latest SDK and getting new features in such as "App Open Ads". Have been relying on this package for quite some time now.
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
How can I use your fork? How to install it?
Just FYI, we're getting close here, I'm at the "setting up e2e testing" part but the module from previous code here / extracted moved is public now https://github.com/invertase/react-native-google-ads/
next steps are finish a quick e2e bringup to verify functionality, then forward port
No documentation is available yet and it's not on npmjs.com but git references should work
for the migration the general idea is "admob" is now "googleAds" / "AdMob" in types is now "GoogleAds" etc, and the example app shows how to use app.json
(not firebase.json
) to put in the config keys
It's my current project here, it will be finished before I move to something else
Found a great alternative which also supports app open ads.
Just FYI, we're getting close here, I'm at the "setting up e2e testing" part but the module from previous code here / extracted moved is public now https://github.com/invertase/react-native-google-ads/
next steps are finish a quick e2e bringup to verify functionality, then forward port
No documentation is available yet and it's not on npmjs.com but git references should work
for the migration the general idea is "admob" is now "googleAds" / "AdMob" in types is now "GoogleAds" etc, and the example app shows how to use
app.json
(notfirebase.json
) to put in the config keysIt's my current project here, it will be finished before I move to something else
Glad to hear that 🎉 Looking forward to first release 👀
@mikehardy any update? when https://github.com/invertase/react-native-google-ads/ will be released? Will you also support app open ads?
When it's released it will hopefully support the entire API surface area of google ads, and one of the reasons to do a native module wrapper vs pure JS is that if it's possible with the SDK natively (app open ads, for example) it will be possible with the wrapper.
As for progress the last time I had a good chunk of hours to throw at it, I thought it was pretty close :shrug: - it is slow going though, I do understand. Only so many hours in the day and I have a couple hot work projects at the moment
@mikehardy I've a question regarding to: one of the reasons to do a native module wrapper vs pure JS is...
The previous library (@react-native-firebase/admob
) was a "native module wrapper" or a "pure JS"? And the new library will be "native wrapper" or "pure js"? So, the future library will work with the same architecture or will be different?
Thanks
PD: Thank you so much for your hard work!
Hi @RodolfoGS - the previous incarnation of admob in @react-native-firebase/admob
was a native module wrapper, yes. If you just want JS you can probably do that right now without waiting on anyone :-), but it won't have any native integrations
@mikehardy Any update? I understand you must be very busy, I'm just wondering if I should wait out a bit more or switch to another package.
I submitted a few PR's which makes the new repo usable (at least on iOS). For the time being (no npm package yet) it can be added to your projects package.json using: "react-native-google-ads": "github:invertase/react-native-google-ads"
.
Thanks for getting those in fast @mikehardy!
Happy to help! Thanks for helping get out the door. Sorry I did not have the time but I do want to make it clear that the goal is for the package to be alive, and I will look at and merge any PRs that help get it there, as I have with those from @dylancom :-)
The new repo is alive and updated to the latest SDKs for AdMob now. It's still moving very quickly and you should test carefully before deploying on it, but it's alive. I'm going to close this, cheers
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
Do you have any idea if it is being updated, or are you planning to update the library in the future? version 11.5.0 is the latest stable version and it works perfectly, but I have doubts if updating the @react-native-firebase/app core to version 14.5.0 makes the application stop working.
Have you used admob v11.5.0 with app v14.5.0? or is this not possible? Sorry for the question, it may sound a bit silly.
@Ronald3217 you are in luck! It was peeled out to https://github.com/invertase/react-native-google-mobile-ads and has gone through a few revisions so it is all up to date, it now appears to be stable and we're consolidating the rest of the react-native admob packages in to it (by working with / collaborating with their maintainers)
Go grab that package and move forward with admob, fully separate from Firebase
Oh, and as for versioning, never mix versions of react-native-firebase: https://invertase.io/blog/react-native-firebase-versioning
@Ronald3217 you are in luck! It was peeled out to https://github.com/invertase/react-native-google-mobile-ads and has gone through a few revisions so it is all up to date, it now appears to be stable and we're consolidating the rest of the react-native admob packages in to it (by working with / collaborating with their maintainers)
Go grab that package and move forward with admob, fully separate from Firebase
i am working with @react-native-firebase/app and @react-native-firebase/admob versions 11.5.0 (in released apps) but building one and using firestore and app v14.5.0.
From what I understand you no longer recommend working with the /admob module and instead use react-native-google-mobile-ads (because I've been using the /admob module for a long time and I'm used to its implementation) but it is better implement the new library, I'll have to learn how to use it.
@Ronald3217 https://github.com/invertase/react-native-google-mobile-ads, as of its v4.2.0 is just react-native-firebase/admob
module split into a standalone package, with a bunch of updates / fixes done on the way. You won't have to learn how to use it, just carefully rename library imports and config files in your source code, and maybe do a few other minor changes according to the changelog.
RN Firebase 11.5.0 is almost one year old at this point, still using it you are probably missing some performance / features because of older underlying SDKs, and keep around some bugs fixed since then.
@Ronald3217 https://github.com/invertase/react-native-google-mobile-ads, as of its v4.2.0 is just
react-native-firebase/admob
module split into a standalone package, with a bunch of updates / fixes done on the way. You won't have to learn how to use it, just carefully rename library imports and config files in your source code, and maybe do a few other minor changes according to the changelog.RN Firebase 11.5.0 is almost one year old at this point, still using it you are probably missing some performance / features because of older underlying SDKs, and keep around some bugs fixed since then.
Reading the documentation, I don't see that dependencies need to be implemented in build.gradle app and project. I just have to install it, add app.json and implement it as it says in the documentation?
Thanks in advance for taking the time to respond.
Yeah, just follow the docs. I believe, there is nothing to do in gradle config for this lib.
@mikehardy thank you very much, have a nice afternoon.
Yeah, just follow the docs. I believe, there is nothing to do in gradle config for this lib.
Hello, I have a question for you, have you implemented the new library https://docs.page/invertase/react-native-google-mobile-ads? I've been trying all day but I couldn't.
I have sdk 29, do you think that is the problem. If so, which one should I use?
@Ronald3217 if you have a problem with that library, please post in that library. Prior to doing so, please examine the example app (and/or the example construction script - it's scripted: https://github.com/invertase/react-native-google-mobile-ads/blob/main/refresh-example.sh) to make sure you are following best practices and that your local environment is not busted in some way
I know this is closed but @mikehardy and Team over at invertase have done a fantastic job with the new admob package and made migrating from this package super simple (removed firebase admob from package.json cleared dependencies for ios and node_modules reinstalled and added my app id to my app.json) I personally strongly encourage anyone who hasn't yet migrated to do so. Thanks again to @mikehardy and team for putting for the effort to keep this package running.
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:
Is there any issue with that or this part of documentation turned off intentionally? Thanks!