Couchbase home page linkCouchbase developer portal link
  • Free TrialCouchbase free trial link
  • Downloads
  • docs
    • Java
    • Node JS
    • .Net
    • Scala
    • C/C++
    • PHP
    • Python
    • Ruby
    • Go
    • Kotlin
    • Mobile
  • playground
  • learn
  • tutorials
  • videos
  • forums
  • community

Couchbase Mobile

Couchbase Mobile securely syncs data from any cloud to the edge, enabling you to store, query, search, and analyze data in the cloud, at the edge, or on the device regardless of internet connectivity and speed, guaranteeing that applications are always fast and always on.

The latest release strengthens our support for edge computing by expanding our edge device platform support for C, Kotlin, and SQL++ in addition to secure Sync Gateway admin over the web.

See What's New
mobile diagram
swift logo
Learn More
android logo
Learn More
.net logo
Learn More

Learning Couchbase Mobile

Learn how you can quickly add the Couchbase Lite SDK to your mobile app and enable features like query, indexes, and data sync.

View Learning Paths

What does developing with Couchbase Mobile look like?

  • iOS / Swift

  • .NET / C#

  • Android / Kotlin

  • C

// Create or open a database
  let database: Database
  do {
     database = try Database(name: "mydb")
  } catch {
     fatalError("Error opening database")
  }
  
  // Create a new document (i.e. a record) in the database.
  let mutableDoc = MutableDocument()
     .setFloat(2.0, forKey: "version")
     .setString("SDK", forKey: "type")
  
  // Save it to the database.
  do {
     try database.saveDocument(mutableDoc)
  } catch {
     fatalError("Error saving document")
  }
  
  // Update a document.
  if let mutableDoc = database
                      .document(withID: mutableDoc.id)
                      ?.toMutable() {
     mutableDoc.setString("Swift", forKey: "language")
     do {
         try database.saveDocument(mutableDoc)
         let document = database.document(withID: mutableDoc.id)!
     } catch {
         fatalError("Error updating document")
     }
  }
  
  // Create a query to fetch documents of type SDK.
  let query = QueryBuilder
     .select(SelectResult.all())
     .from(DataSource.database(database))
    .where(Expression.property("type").equalTo(Expression.string("SDK")))
  
  // Run the query.
  do {
     let result = try query.execute()
     print("Number of rows :: \(result.allResults().count)")
  } catch {
     fatalError("Error running the query")
  }
  
  // Create replicators to push and pull changes to and from the cloud.
  let targetEndpoint = 
    URLEndpoint(url: URL(string: "ws://localhost:4984/getting-started-db")!)
  var replConfig = ReplicatorConfiguration(database: database, target: targetEndpoint)
  replConfig.replicatorType = .pushAndPull
  
  // Add authentication.
  replConfig.authenticator = BasicAuthenticator(username: "john", password: "pass")
  
  // Create replicator 
  // (make sure to add an instance or static variable named replicator)
  let replicator = Replicator(config: replConfig)
  
  // Optionally,Listen to replicator change events.
  replicator.addChangeListener { (change) in
  if let error = change.status.error as NSError? {
         print("Error code :: \(error.code)")
       }
  }
  
  // Start replication.
  replicator.start()
   
Couchbase Lite Docs

Products

Couchbase Mobile is developer-friendly and can run anywhere – in the cloud, at the edge, and directly on mobile and edge devices – with automatic synchronization to ensure low latency, data integrity, and high availability for applications. It's a complete NoSQL database solution for all data storage, access, sync, and security from the cloud to the edge to the device.

Couchbase Lite

Couchbase Lite, our embedded database, manages and stores data locally on the device. It has full CRUD and SQL++ query functionality, and supports all major platforms including iOS, OS X, tvOS, Android, Linux, Windows, Xamarin, Kotlin, Ionic, and more.

Learn More

Sync Gateway

Couchbase Mobile includes synchronization between Couchbase Lite and Couchbase Server, and peer-to-peer synchronization between Couchbase Lite instances. Synchronization is orchestrated by Sync Gateway, our secure gateway.

Learn More

Couchbase Server

Couchbase Server, our database server, manages and stores data in the cloud. It scales easily to billions of records and terabytes of data, supports millions of concurrent users, and provides 24x365 uptime.

Learn More
Download Now

Platforms & Languages

Couchbase Mobile allows you to build amazing products and solutions using the platforms and languages you love.

iOS/iPadOS/MacOS

Learn how Couchbase Mobile can help you build robust applications in Swift or Objective-C with offline capabilities that can sync data from the cloud or your data center.

Learn More

Android

Learn how Couchbase Mobile can help you build robust Android applications in Kotlin or Java with offline capabilities that can sync data from the cloud or your data center

Learn More

.NET

Learn how Couchbase Mobile can help you build robust .NET applications in C# with offline capabilities that can sync data from the cloud or your data center.

Learn More

Videos

Couchbase videos from all of our Couchbase events.

Loading...
More Videos

Tutorials

Learn to build and operate apps using Couchbase.

Quickstart in Couchbase Lite with iOS, Swift, and UIKit

Build an iOS App in Swift with UIKit and Couchbase Lite

ios
swift
30 Mins
Quickstart in Couchbase Lite with Android and Java

Build an Android App in Java with Couchbase Lite

android
java
30 Mins
Quickstart in Couchbase Lite with C#, .NET, and Xamarin Forms

Build an App in dotnet with C#, Xamarin Forms, and Couchbase Lite

csharp
dotnet
xamarin-forms
30 Mins
Quickstart in Couchbase Lite Query with iOS, Swift, and UIKit

Build an iOS App in Swift with UIKit and Couchbase Lite using Query

ios
swift
30 Mins
Quickstart in Couchbase Lite Query with Android and Java

Build an Android App in Java and Couchbase Lite using Query

android
java
query
30 Mins
Quickstart in Couchbase Lite Query with C#, .NET, and Xamarin Forms

Build an App in C# with Xamarin and Couchbase Lite using Query

csharp
xamarin
30 Mins
More Tutorials

Other Resources

Couchbase Mobile is developer-friendly and can run anywhere – in the cloud, at the edge, and directly on mobile and edge devices – with automatic synchronization to ensure low latency, data integrity, and high availability for applications. It's a complete NoSQL database solution for all data storage, access, sync, and security from the cloud to the edge to the device.

Customer Case Studies

Enabling customer success with the world’s most powerful NoSQL database.

Learn More

Blog Articles

Blog posts about Couchbase Mobile, embedded databases, IoT, and Edge Computing.

Learn More

Documentation

Couchbase Mobile, Sync Gateway, and Couchbase Server SDK, API, and infrastructure documentation.

Learn More
Was this page helpful?
Couchbase home page link
  • Documentation
  • Downloads
  • Forums
  • Blog
  • Resources
  • Support Login
  • Training
  • Careers
  • Events
  • SDKs
  • Social Media Link for Stack OverflowStack Overflow
  • Social Media Link for GitHubGithub
  • Social Media Link for TwitterTwitter
  • Social Media Link for LinkedInLinkedIn

© 2021 Couchbase, Inc. Couchbase, Couchbase Lite and the Couchbase logo are registered trademarks of Couchbase, Inc.

Terms of UsePrivacy PolicyCookie PolicySupport PolicyMarketing Preference Center