If you have an existing app built with the Stitch SDK, you should migrate your app to use the new Realm SDK. While much of the logic and flow of information hasn't changed, there are a few important changes in the way your app connects to the realm backend.
Nuevas características:
The Realm Java SDK supports Android applications written in Kotlin.
The Realm Java SDK now includes Realm Database, which includes local object storage and Sync.
Cambios
What's Changed? | Solución |
|---|---|
Las conexiones de la aplicación backend a las que anteriormente se accedía a través de Cliente de StitchAppAhora se accede a través de la aplicación. | Migrar todas las ocurrencias de |
Los usuarios de la aplicación que antes accedían a través de StitchUser ahora se acceden a través de Usuario. | Migrate all occurrences of |
In the Stitch SDK, network requests like callFunction() were asynchronous by default. In the Realm Java SDK, you can choose synchronous or asynchronous requests with the "Async" suffix, e.g. callFunction() and callFunctionAsync(). | Migrate all asynchronous Stitch SDK requests to their asynchronous Realm SDK equivalents. |
Async SDK requests no longer use the built-in Android Task class to return success status and values via | Rewrite all asynchronous Stitch SDK requests to use |
The login API has changed from stitchAppClient.getAuth().loginWithCredential() to app.loginAsync() or the synchronous equivalent app.login(). | Rewrite all authentication logic to use the new login API. |
El SDK de Stitch utilizó stitchAppClient.getAuth().logout() para gestionar el cierre de sesión del usuario. Para cerrar la sesión de un usuario en el SDK de Realm, llama al método logOut() del objeto | Rewrite all logout logic to use the user's |
Instead of calling functions using the app client directly, like stitchAppClient.callFunction(), you can only call functions through a Functions Manager, which you can access through your backend realm app connection: app.getFunctions(user).callFunctionAsync(). | Call functions using a Functions Manager instead of an app client. |
The MongoDB Data Access API, which contains objects like MongoClient, MongoDatabase, and MongoCollection has changed packages from | Refactor all imports of the MongoDB Data Access API to use |
The BSON package, which contains BSON data types and the | Refactor all imports of the BSON package to use |
Convert SDK service API usage in your application to Realm functions using the corresponding npm packages. For more information, see Add External Dependencies. |