Last active
April 23, 2020 17:28
-
-
Save akshitzaveri/c6075971c1df93fbd695eb05e9301dc3 to your computer and use it in GitHub Desktop.
Setup Firebase Firestore connecting to localhost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Checking if unit tests are running | |
if ProcessInfo.processInfo.environment["unit_tests"] == "true" { | |
print("Setting up Firebase emulator localhost:8080") | |
let settings = Firestore.firestore().settings | |
settings.host = "localhost:8080" | |
settings.isPersistenceEnabled = false | |
settings.isSSLEnabled = false | |
Firestore.firestore().settings = settings | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment