0
0
iOS Swiftmobile~5 mins

Cloud Firestore in iOS Swift - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is Cloud Firestore in mobile development?
Cloud Firestore is a flexible, scalable database for mobile, web, and server development. It stores data in documents, which are organized into collections, and syncs data in real-time across devices.
Click to reveal answer
beginner
How do you add a document to a Firestore collection in Swift?
Use the Firestore instance to reference a collection, then call addDocument(data:) with a dictionary of key-value pairs representing your data.
Click to reveal answer
beginner
What is the difference between a document and a collection in Firestore?
A document is a single record that contains fields with data. A collection is a group of documents. Collections can contain documents, and documents can contain subcollections.
Click to reveal answer
intermediate
How does Firestore handle real-time updates?
Firestore lets your app listen to document or collection changes. When data changes, Firestore sends updates instantly to keep your UI in sync without manual refresh.
Click to reveal answer
intermediate
What is a Firestore query and how is it used?
A Firestore query lets you retrieve documents that match specific conditions, like filtering by a field value or ordering results. Queries help you get only the data you need.
Click to reveal answer
Which Firestore data structure holds multiple documents?
ADatabase
BDocument
CField
DCollection
How do you listen for real-time updates in Firestore on iOS?
ACall getDocuments() repeatedly
BUse a timer to refresh data
CUse addSnapshotListener() on a document or collection reference
DUse URLSession to fetch data
What type of data does a Firestore document store?
AKey-value pairs
BOnly strings
COnly numbers
DOnly arrays
Which method adds a new document with an auto-generated ID in Firestore?
AaddDocument(data:)
BsetData(_:)
CupdateData(_:)
Ddelete()
How can you filter documents in Firestore?
ABy using setData(_:)
BBy using whereField() in a query
CBy calling delete()
DBy using addSnapshotListener()
Explain how you would set up a Firestore listener in Swift to update your app UI in real-time.
Think about how Firestore notifies your app when data changes.
You got /5 concepts.
    Describe the structure of data in Cloud Firestore and how documents and collections relate.
    Imagine folders and files on your computer.
    You got /4 concepts.