react-native-firestack icon indicating copy to clipboard operation
react-native-firestack copied to clipboard

[v3] Is it possible to remove unnecessary dependencies from Podfile?

Open rohitgoyal opened this issue 7 years ago • 9 comments

Hi Basically I just want to use the Firebase Analytics which would just require Firebase and Firebase.Core dependencies as far as i know. I am never gonna use Firebase database/Auth/RemoteConfig for sure. Now these dependencies would be taking unnecessary space in my app.

I tried removing the unnecessary pods and running pod install. But the build is failing after that show errors for FirebaseAuth etc. Is there any way to avoid this?

rohitgoyal avatar Nov 23 '16 09:11 rohitgoyal

@auser @chrisbianca reckon it'd be possible to do this ios side, only load the RN modules we have the SDK's for? As far as I remember it should be doable android wise?

But then it's an extra setup step I guess to add FB SDK's

Thoughts?

Salakar avatar Nov 23 '16 09:11 Salakar

@Salakar this is probably stretching my knowledge of iOS a little far.

I guess the normal way to resolve this would be to break Firestack into different packages (similar to how Firebase is) but that defeats some of the point of having it nicely centralised.

chrisbianca avatar Nov 23 '16 10:11 chrisbianca

@chrisbianca Analytics and Ads would be 2 category that would be used in far greater numbers than the rest of the functionalities of Firebase I guess.

rohitgoyal avatar Nov 23 '16 11:11 rohitgoyal

but that defeats some of the point of having it nicely centralised.

@chrisbianca very true, does bloat it however - for example ads is a big one and has a ton of sub modules, rn views etc - deffo think this should be separate if we get round to implementing it, as @rohitgoyal said.

Think the rest then just remain part of core I guess? Come to think of it now I don't think there'd be any way to do this within the same repo as you said @chrisbianca. JS side it'd be easy with dynamic modules imports etc, but... you can't do that on the native side (at least without a ton of work - i.e android optional modules/submodules)

@auser @Ehesp @BlooJeans thoughts?

Salakar avatar Nov 23 '16 18:11 Salakar

It should be doable on iOS, actually. I can get to implementing that on iOS this weekend.

auser avatar Nov 23 '16 18:11 auser

it might also be possible to do it entirely on the JS side and only require modules as they are required through the JS API.

auser avatar Nov 23 '16 18:11 auser

@auser this will still get compiled by gradle for example though, its the individual firebase SDKs that need to be optional really

Salakar avatar Nov 23 '16 18:11 Salakar

Mmm good point. We should be able to handle it on iOS. I'll explore a few thoughts tomorrow. I think we can handle it with an #ifdef clause

auser avatar Nov 23 '16 18:11 auser

@auser any update on this?

Salakar avatar Dec 29 '16 12:12 Salakar