firebase / quickstart-unity

Firebase Quickstart Samples for Unity
https://firebase.google.com/games
Apache License 2.0
824 stars 428 forks source link

[Question] Can we use crashlytics without googleservice json and plist? #988

Open Thaina opened 3 years ago

Thaina commented 3 years ago

I try to build app that could switch firebase project when restart the app. So I don't want to include googleservice file into the build and want to create firebaseapp at runtime. However it seem Crashlytics trying to access those files in build process and cause build to fail. Is it anyway possible to do it?

vimanyu commented 3 years ago

Hi @Thaina, It will help us debug if you could provide more information. I tried building the Unity Crashlytics quickstart example without google-services.json and it built just fine.

Here is what I tried,

Are you able to reproduce this problem in the quickstart and what is the error during the build?

Thaina commented 3 years ago

@vimanyu Sorry for some misinformation

cynthiajoan commented 3 years ago

Hi @Thaina, I checked with the team. Since crashlytics is fully integrated into Firebase, so the google service json and plist file will be a requirement for projects to use it. The firebase setup is a precondition for crashlytics setup.

Thaina commented 3 years ago

@cynthiajoan Thank you. Then is it possible to change this? Can crashlytics be initialized and specified main project at runtime?

If it is I would like to have this issue as feature request

cynthiajoan commented 3 years ago

Unfortunately it's not possible at the moment. The main reason is it requires a GoogleService-info.plist to upload symbols, and that happens during the build time.

Thaina commented 3 years ago

@cynthiajoan OK, then, howabout allowing us to specified multiple plist file asset for all project we can switch, but don't use it in the main runtime. Then upload multiple symbols for each plist ?

samedson commented 3 years ago

Hey @Thaina, right now I don't know of a good way to do this. It may be technically possible by swapping out the Google Service files at runtime. If you were to try to figure out a workaround, it would probably require building the app in Unity initially with one file, and then trying to swap them out in Objective-C code. You are right that you would need to upload symbols for each plist file. Right now I know this is supported at build time on iOS, but I haven't seen it be done at runtime.

Regardless we'll leave this open as a Feature Request to judge interest if we ever decide to take this on!

raybarrera-aofl commented 3 years ago

@samedson @Thaina we were discussing a similar issue in #880

This is a major issue for projects that build more than a single project out of a single codebase.