Skip to content
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

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

Open
Thaina opened this issue Mar 10, 2021 · 8 comments
Open

Comments

@Thaina
Copy link
Contributor

Thaina commented Mar 10, 2021

  • Unity editor version: 2020.2.6
  • Firebase Unity SDK version: 7.1.0
  • Source you installed the SDK:UPM
  • Problematic Firebase Component: Crashlytics
  • Other Firebase Components in use: Auth, FireStore, Analytics
  • Additional SDKs you are using: Facebook, AdMob, OneSignal
  • Platform you are using the Unity editor on: Windows
  • Platform you are targeting: iOS, Android
  • Scripting Runtime: IL2CPP

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
Copy link
Contributor

vimanyu commented Mar 11, 2021

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,

  • Open the (Crashlytics unity quickstart) [https://github.com/firebase/quickstart-unity/tree/master/crashlytics/testapp] project in Unity 2020.1.7f1 and installed Firebase Crashlytics 7.1.0 unitypackage
  • Open "Assets/Firebase/Sample/Crashlytics/MainScene" in Unity and set "Build Settings" platform to Android.
  • Hit "Build" and the apk built without google-services.json
  • Check "Export Project" and the Android project was again exported without build errors.

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

@vimanyu vimanyu added needs-info Need information for the developer and removed new New issue. labels Mar 11, 2021
@Thaina
Copy link
Contributor Author

Thaina commented Mar 12, 2021

@vimanyu Sorry for some misinformation

  • android can be built without google-services.json but it was throwing error at runtime, maybe not related to crashlytics, I might try again some other times
  • ios was not able to build without GoogleService-Info.plist at all

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Mar 12, 2021
@cynthiajoan
Copy link
Contributor

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.

@cynthiajoan cynthiajoan added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels Mar 17, 2021
@Thaina
Copy link
Contributor Author

Thaina commented Mar 18, 2021

@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

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Mar 18, 2021
@cynthiajoan
Copy link
Contributor

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.

@cynthiajoan cynthiajoan added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels Mar 18, 2021
@Thaina
Copy link
Contributor Author

Thaina commented Mar 19, 2021

@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 ?

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Mar 19, 2021
@samedson
Copy link

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!

@cynthiajoan cynthiajoan removed the needs-attention Need Googler's attention label Mar 24, 2021
@raybarrera-aofl
Copy link

@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.

@samedson samedson removed their assignment Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants