firebase / firebase/quickstart-unity

[Feature Requests] Optionally disable the "invalid bundle id" modal dialogbox and improve the Unity Firebase initialization flow to help avoid null pointer exceptions.

Aperta
#643 8 commenti 1 reazione 0 assegnatari Vedi su GitHub
api: core type: feature request
Lingua principale
C#
Stelle
923
Fork
456
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Please fill in the following fields:
Unity editor version: 2018.4LTS (or any)
Firebase Unity SDK version: 6.7.0 (or any)
Source you installed the SDK (.unitypackage or Unity Package Manager): .unitypackage
Firebase plugins in use (Auth, Database, etc.): Crashlytics, Messaging, Dynamic Link
Additional SDKs you are using (Facebook, AdMob, etc.): Facebook, Skillz
Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac, Windows
Platform you are targeting (iOS, Android, and/or desktop): iOS, Android
Scripting Runtime (Mono, and/or IL2CPP): IL2CPP

### Please describe the issue here:
Some people (like me) have many apps in one Unity project and each has a different bundle ID. Whenever the bundle ID is changed (due to a script we run in the editor), there is no function we call to tell Firebase to update its understanding of the current bundle ID. Instead, it triggers automatically according to some callback in Unity (presumably). This is really a bad design. What happens is, we have to change the bundle ID, swap the current .plist and .json files for GoogleServices, explicitly call AssetDatabase.SaveAssets(), and hope that we did this dance in the right order so that stupid bundle id selector window doesn't show up, because it sometimes pops up on a DIFFERENT MONITOR, and completely locks the Editor from accepting input until we deal with the modal dialog. Even having done this correctly, sometimes it decides to pop up when we hit Play, for no apparent reason. Please, don't ever put a modal dialog on my screen. Ever. Let me call a function to deliver the information you need directly, rather than gathering data indirectly via the environment (AssetDatabase, files, etc) at the wrong time. And if something doesn't look right, throw an error in the log and shut yourself off. Never interrupt the developer.

Further, on Android (and iOS?) if you install the C# .unitypackage for one of the Firebase modules, but don't actually install the .aar that goes with it, you get a null pointer exception at runtime. There's no way to know this is going to happen in the Editor, but you find out once you build for a device and it blows up during initialization.

Also, the fact that any and all calls will throw null pointer exceptions until after Firebases Initializes requires all your users to wrap the whole SDK with a proxy of some sort, so we don't accidentally blow up by touching a live wire. At least write the proxy on YOUR side of the SDK, so it returns an error code instead of blindly dereferencing null.

If you actually want people to LIKE using your products, you need to make it have a higher value-to-integration-pain ratio. Firebase has a lot of potential and some great features, but these kinds of issues take all the joy away.

### Please answer the following, if applicable:
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
Yes

What's the issue repro rate? (eg 100%, 1/5 etc)
100%

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia riproducendo il comportamento segnalato con i Firebase Unity quickstarts usando la configurazione iOS e Android indicata, quindi esamina il flusso di inizializzazione di Firebase in Unity e il comportamento della modale del bundle-ID. Confronta l'inizializzazione con artefatti dei moduli mancanti e prima del completamento dell'inizializzazione. Il lavoro sarà considerato completato quando sarà definito e testato un ambito concordato che copra le modifiche richieste alla modale, all'inizializzazione e alla gestione degli errori.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp, unity
Ambito
game-dev, mobile-dev
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
20/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.