<!-- Generated from the rendered page by scripts/write-llm-mirrors.mjs. Do not edit by hand. -->
Canonical: https://molo17.com/blog/your-first-app-with-couchbase-lite/
Markdown mirror: https://molo17.com/blog/your-first-app-with-couchbase-lite/index.md
Title: #4 Discover Couchbase: your first app with Couchbase Lite - Blog M17
Description: Discover how to build offline-first iOS and Android applications and to sync data across platforms using Couchbase Lite, with an example app.

[← All articles](/blog/)

Article

# #4 Discover Couchbase: your first app with Couchbase Lite

7 Feb 2020  [Knowledge sharing](/blog/?category=knowledge-sharing)  2 min read

In the previous articles we had a first look at Couchbase Lite and we discovered how to integrate it into a mobile app. Moreover, we got aware of Couchbase \[…\]

![](https://molo17.com/wp-content/uploads/2020/02/M17BLOG-Cover_Couchbase_rubrica.png)

**In the [previous articles](\"https://molo17.com/category/knowledge-sharing/discover-couchbase/\") we had [a first look at Couchbase Lite](\"https://molo17.com/2019/09/scopri-couchbase-con-molo17-couchbase-lite-in-7-minuti/\") and we discovered how to integrate it into a mobile app.**

Moreover, [we got aware of Couchbase Sync Gateway](\"https://molo17.com/2019/11/3-discover-couchbase-introduction-to-couchbase-sync-gateway/\") in this article for synchronizing data with ease across all our apps installations. With this post I want to finally show you those technologies in action!

## The contacts app with Couchbase Lite

For the sake of this series, we developed a sample application for both iOS and Android. This app allows you to create your personal address book with all your contacts, and sync it in real time across all your devices which have the app installed. Contacts are persisted using Couchbase Lite, as we have seen in the [previous post](\"https://molo17.com/2019/10/2-scopri-couchbase-come-couchbase-lite-live-query-e-caching-locale/\"). Thanks to the fact that the data are actually saved into the database and not explicitly sent to a remote server, we can work in absence of network without any sort of problems. This ensures a full offline user experience, with no potential lags due to a slow connectivity or any kind of network failures. All the replication is made possible out-of-the-box by the Couchbase library.

## Features

Opening the sample app, you will see the list of all the contacts you added into your synced address book. You can add a new contact by pressing the “+” button. Also, by clicking on a list item you can edit the contact info as you prefer. Eventually, you can delete a contact directly from the contacts list.

## Demonstration of Couchbase Lite

This video shows a real-time data synchronization between two instances of the same app, running both on iOS and Android. This app acts as a basic address book that allows to manage the contacts of the user. Thanks to Couchbase Sync Gateway, all the data replication process is made possibile with ease.  
In particular, when creating, editing or deleting an address book Contact, the change is immediately spread to all the connected devices.

Works like a charm! You can find all the application sources in our GitHub repositories:

-   Android: [https://github.com/MOLO17/couchbase-contacts-android](\"https://github.com/MOLO17/couchbase-contacts-android\")
-   iOS: [https](\"https://github.com/MOLO17/couchbase-contacts-ios\")[:](\"https://github.com/MOLO17/couchbase-contacts-ios\")[//github.com/MOLO17/couchbase-contacts-ios](\"https://github.com/MOLO17/couchbase-contacts-ios\")

As mentioned in the readme files, you need a running Couchbase Server and Couchbase Sync Gateway instances for replicating data. If you don’t have such instances up and running, you may want to have a look at [my previous blog post](\"https://molo17.com/2019/11/3-discover-couchbase-introduction-to-couchbase-sync-gateway/\")! Let’s setup them on the fly! 

That’s all, thanks for reading and stay tuned for more!  

[← Older article Easy with Gluesync: connect E2000 (Euro2000) ERP with your mobile app](/blog/easy-with-gluesync-connect-e2000-erp-with-your-mobile-app/) [Newer article → Serverless 101: first overview](/blog/serverless-101-first-overview/)

## Keep reading

1.  [Knowledge sharing #6 Couchbase Server: integrate Couchbase to your serverless backend Do you need to use Couchbase as a database on your serverless backend? Or do you simply need a Proof-of-Concept (POC)? Discover Couchbase Server and how to use AWS \[…\] 1 Apr 2020](/blog/couchbase-server-integrate-couchbase-to-your-serverless-backend/)
2.  [Knowledge sharing #5 Discover Couchbase: Couchbase Peer-to-Peer Sync The Discover Couchbase section continues with the fifth chapter, which deals in particular with Peer-to-Peer Sync. In the previous article we discovered how to make an app using the \[…\] 6 Mar 2020](/blog/couchbase-peer-to-peer-sync-en/)
3.  [Knowledge sharing Serverless 101: first overview In this article we are going to take a look at the serverless world in order to understand what it is and what are the main advantages/disadvantages, beyond the \[…\] 14 Feb 2020](/blog/serverless-101-first-overview/)

[Back to all articles](/blog/) [More in Knowledge sharing →](/blog/?category=knowledge-sharing)
