Join us at MongoDB.local London on 7 May to unlock new possibilities for your data. Use WEB50 to save 50%.
Register now >
Docs Menu

Atlas Device SDK for C++

Use Atlas Device SDK for C++ to write applications that access data stored locally on devices and sync data with Atlas.

Learning Paths
Ícono de funciones

Inicio rápido

Ejemplos de código con explicación mínima sobre cómo trabajar con el C++ SDK y guardar en la base de datos del dispositivo y sincronizar con otros dispositivos.

Consulta Ejemplos de código

Atlas Device SDK Mobile Icon

Working Example App

Aprende de una aplicación cliente GUI de terminal que utiliza el SDK de C++.

Explore an Example App

Icono de tutorial

Tutorial guiado

Sigue un tutorial guiado para aprender a adaptar la aplicación de ejemplo y así crear tu propia aplicación funcional.

Seguir el tutorial

Qué puedes hacer

Use the SDK's open-source database - Realm - as an object store on the device. Use Device Sync to keep data in sync with your MongoDB Atlas cluster and other clients.

1

Usa Swift Package Manager o Cmake para instalar el SDK de C++ en tu proyecto.

Include the header in the translation unit where you want to use it to get started.

2

Use C++ to idiomatically define an object type.

3

The SDK's database - Realm - stores objects in files on your device. Configure and open a database to get started reading and writing data.

4

Create, read, update, and delete objects from the database. Filter data using the SDK's query engine.

5

Los objetos activos significan que sus datos siempre están actualizados. Puedes registrar un controlador de notificaciones para observar los cambios y realizar alguna lógica, como actualizar el Interfaz de Usuario.

Ilustración móvil del SDK del dispositivo Atlas
1

Configure Device Sync in an App Services App. Define data access rules. Use Development Mode to infer your schema from your C++ data model.

Luego, conéctate al backend desde tu cliente.

2

Use one of our authentication providers to authenticate a user. App Services provides access to popular authentication providers, such as Apple, Google, or Facebook. Use our built-in email/password provider to manage users without a third-party, or use custom JWT authentication to integrate with other authentication providers. Anonymous authentication provides access without requiring a login or persisting user data.

3

Configurar y abrir una base de datos sincronizada. Suscribirse a una consulta para determinar qué datos puede leer y escribir la base de datos sincronizada.

4

The APIs to read and write data are the same whether you're using a synced or non-synced database. Data that you read and write to the device is automatically kept in sync with your Atlas cluster and other clients. Apps keep working offline and deterministically sync changes whenever a network connection is available.

Ilustración de Device Sync

You can call serverless Functions from your client application that run in an App Services backend.

Autentica a los usuarios con proveedores de autenticación integrados y de terceros. Usa el usuario autenticado para acceder a App Services.

App Services Illustration
Documentación esencial
Ícono de funciones

Inicio rápido

Minimal-explanation code examples of how to work with the SDK.

Consulta Ejemplos de código

Icono de SDK

C++ API Reference

Explora la documentación de referencia generada por Doxygen para las API de C++.

C++ SDK Reference