DEV Community

Cover image for How to Use Firestore and Firebase Realtime Database with Combine in iOS
Raksha for Canopas Software

Posted on


How to Use Firestore and Firebase Realtime Database with Combine in iOS

In this post, you will learn how to observe items from the Firebase databases in real-time using combine framework.

The database is at the heart of every application, be it Android, iOS, or the Web. When it comes to iOS databases, there are so many popular options like Coredata, SQLite, and Realm.

They all have a common disadvantage though, they are local databases and thus it’s not sufficient if we want our users to interact with each other or want to store data in the cloud.

If we want to save data in the cloud, we will need a backend, which mostly comes at a huge cost.

That’s where the Firebase database comes into the picture. I’m not going to list out all the benefits of it as it’s a well-known database in the community but you can check out official docs for more information.

Today, we will explore how we can observe items from the database in real-time using combine framework.

Initially, we will understand an example but later we will create an extension that can convert any database reference to a combine stream.

For detailed implementation, please check out canopas blog.

Top comments (0)

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git