iOS Swift Tutorial: App like Twitter with Firestore Cloud Database

Daniel Autenrieth · 23K views · 2017 · 29:10

Open on YouTube

Software (other)Databases & storagetutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as the Firestore-with-Swift guide they followed, usually when asking how to extend its patterns to snapshot listeners and mapping documents to Swift objects.

Recommended by 1 people across 1 different months, 2018 to 2019.

What it is

A 29-minute iOS Swift tutorial by Daniel Autenrieth (Brian Advent) that builds a simple Twitter-like app on Google's Firestore cloud database. It covers adding data, running simple queries and listening for realtime updates.

What people said

Recommends Warren O'Brien · 2019-08 · Stack Overflow · on “How can I properly leverage Firestore realtime updates in swift using the onSnapshot() method?”

I'm new to Google Firestore and swift generally, and am wondering how to properly set up a onSnapshot() method so my view controller can receive updates automatically and to fit all situations. I have a very simple struct (Llama) that I am using to model my data. I was able to build a rudimentary Firestore setup by following this excellent tutorial: ( [this video] ) However, I've found that in implementing my own version of the code, I only know how to allow for document creation on the server. I would like to be able to update an object in my app if it changes on the server, and I would like to be able to delete one also. I'm currently at a loss on how to accomplish this. Additionally, when it c

Cites tomaculum · 2018-03 · Stack Overflow · on “Get Firebase document objects as Swift object”

I try to implement a simple shopping list swift application for iOS as a personal project. I did follow a guide for iOS on [this video] . My question is how do I parse the Item object from firebase to my ShoppingListItem swift object? If I execute the following code, it doesn't show any error message but it does not show any results either. If I uncomment all "items" lines, it shows the expected results without the item information. Here is a screenshot from the firebase console of my firebase firestore structure / example object [LINK] Thanks in advance! ShoppingListItem.swift import Foundation import FirebaseFirestore protocol DocumentSerializable { init?(dictionary: [String: Any]) } struct Sho

Cites Vins · 2018-06 · Stack Overflow · on “Firestore snapshot map with multiple types of object”

I followed this tutorial [this video] to perform queries from Firebase firestore As long as I had only one type of object Note everything is fine. This is my object struct: protocol DocumentSerializable { init?(dictionary:[String:Any]) } struct Note { var title:String var date:Date var text:String var type:String var dictionary:[String:Any] { return [ "title":title, "date":date, "text":text, "type":type, ] } } extension Note : DocumentSerializable { init?(dictionary: [String : Any]) { guard let title = dictionary["title"] as? String, let date = dictionary["date"] as? Date, let text = dictionary["text"] as? String, let type = dictionary["type"] as? String else {return nil} self.init(title: title,