-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix(ios, analytics): remove now-optional analytics dependencies #4131
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/invertase/react-native-firebase/cx5dilcto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh - there were 2 more of these than I was thinking. I remember analyzing it on the linked issue though, this is still correct I think and should work just fine.
I am approving provisionally with one question: Did you build your app with these modules but without Analytics to make sure it worked? If not, that's the final test pre-merge - a quick throwaway build (like from https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh but without this line https://github.com/mikehardy/rnfbdemo/blob/eda24a71990e95e8a91b17b27b0cc1417031808b/make-demo.sh#L79)
(the reason I ask for the build test is because the e2e test pulls them all in, so it won't verify the "analytics is not there" build case) |
I cloned the rfnbdemo repo, ran the script to build the project, modified the 4 podspecs and App.js to exclude analytics, cleared the pods and then rebuilt. I confirmed that analytics was not present and that the app ran correctly. Note I also had to remove Crashlytics as it references Firebase/Core which references Firebase/Analytics. (This appears to be correct as the Crashlytics podspec in the IOS SDK still references Firebase/Core). |
Very interesting result about Crashlytics! @UberMC has a fork that did something similar but on an older RNFB version - when Core was still propagated everywhere, before it was pulled up to just rnfb/app and switched to CoreOnly I can't think of a way to switch Crashlytics from Core to CoreOnly though except via some Podfile-fu postinstall. Have you tried (just to see if it would work?) to edit FirebaseCrashlytics to be CoreOnly instead of Core? My Podfile-fu is weak unfortunately - I know things are possible but it takes me ages to express them in ruby with the unfamiliar object graph in Podfiles This is already a great improvement of course, I'll merge this right away, but the result of that test would shape what sort of issue to open upstream |
Perhaps the inimitable @wilhuff would know - or know the right people - with regard to the FirebaseCrashlytics.podspec and whether it can go CoreOnly as a dependency vs Core, enabling Crashlytics use in an app for Kids on iOS |
This just went live:
|
👋 hey folks - Ryan from the Firebase iOS team here (@wilhuff pointed this thread out). The naming here is a bit confusing with some overloaded terms, but Crashlytics does not have a hard dependency on Analytics and shouldn't pull in the framework. We have the
The
Let me know if that makes sense or if there's something else I'm missing that's pulling in FirebaseAnalytics unintentionally - it's definitely not the intention to have it as a hard requirement. |
@ryanwilson - I've seen you helping out in the firebase-ios-sdk repo, thanks for stopping by here to clarify, I appreciate it. Your expectation obviously makes sense but runs counter to the user report here. I haven't replicated that but it seems like the next step is to make 100% sure - @dlockwo did you actually build with FirebaseCrashlytics and see a build failure, resulting in your removal of that module, or did you pre-emptively remove it after inspecting the podspec / seeing FirebaseCore and assuming it would pull in analytics? |
@ryanwilson - thanks again (and thanks @wilhuff for the quick referral), that was the info I needed to get a handle on it. The problem was on our side (as I'm sure you guessed) We still had a rogue 'Firebase/Core' transitive dependency in our 'RNFBCrashlytics' podspec, ...even though
I thought those direct 'Firebase/Core' dependencies were all cleaned out but that one stray remainder was the culprit @dlockwo when I remove that 'Firebase/Core' dependency in RNFBCrashlytics.podspec I build and run successfully on iOS with Crashlytics, and without AdMob and Analytics, and the Podfile.lock confirms the FirebaseAnalytics and GoogleAppMeasurement pods are no longer pulled in You may run it yourself as a test with my demonstrator using the new The required patch to make it work, in patch-package format, is here https://github.com/mikehardy/rnfbdemo/blob/master/patches/%40react-native-firebase%2Bcrashlytics%2B8.3.3.patch I'll have that integrated and released as |
Cool. I was clearly looking at the wrong podspec in the IOS SDK. Thanks for sorting it. Would love to use Crashlytics in our kids app. |
…rtase#4131) Everything but Crashlytics may be used without Analytics linked in, allowing for all but Crashlytics to be used in apps targeted for kids on iOS
Description
Removed remaining analytics dependencies from IOS podspecs. Analytics cannot be used in the IOS apps in the kids category. FirebaseCore no longer pulls analytics. Analytics can still be added separately and interop correctly with these modules.
Related issues
Fixes #4072
Release Summary
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
Ran jest and e2e tests successfully.
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter