FirebaseDatabaseSwift Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
DataSnapshot
public extension DataSnapshot
-
Retrieves the value of a snapshot and converts it to an instance of
caller-specified type.
Throws DecodingError.valueNotFound
if the document does not exist and T
is not an Optional
.
See Database.Decoder
for more details about the decoding process.
Declaration
Swift
func data<T: Decodable>(as type: T.Type,
decoder: Database.Decoder =
Database.Decoder()) throws -> T
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-05-11 UTC.
[null,null,["Last updated 2022-05-11 UTC."],[],[]]