Created
February 23, 2021 06:40
-
-
Save fredriccliver/c7e1a9daddad030483e605bea25867ee to your computer and use it in GitHub Desktop.
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
let functions = Functions.functions() | |
functions.useFunctionsEmulator(origin: "http://localhost:5001") | |
functions.httpsCallable("generateSound").call() { (result, error) in | |
if let error = error as NSError? { | |
if error.domain == FunctionsErrorDomain { | |
let code = FunctionsErrorCode(rawValue: error.code) | |
let message = error.localizedDescription | |
let details = error.userInfo[FunctionsErrorDetailsKey] | |
print(code ?? "", message , details ?? "") | |
} | |
print(error.localizedDescription) | |
return | |
} | |
print(result) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment