CRE8IT CRE8IT - 9 months ago 70
iOS Question

iOS Firebase Database URL

I have been searching the web and gone through all tutorials I found about this subject, read the API reference but ultimately couldn't find any solution to my simple requirement.

In iOS / Swift, one has to install a "GoogleService-Info.plist" in the xCode project and then call

in the AppDelegate in order to load the configuration from the aforementioned plist file.

That all works perfectly, but what I would like now is being able to retrieve the parameters from this plist, to be more precise the database URL, so that I don't have to hardcode it anywhere (other than in that plist).

Of course I could use a dictionary to separately read the plist and retrieve the database url, but I would have expected to access the FIRApp object and retrieve it from there...

Did I miss something or is that option not given to retrieve the Firebase Parameters / Options directly from the FIRApp Object?


You can use FIRDatabase.database().reference() to get a reference to your database that was loaded via FIRApp.configure().