Coder Social home page Coder Social logo

client_rebase's Introduction

Kotlin Multiplatform Sync demo App using a shared business logic:

The demo demonstrates Device Sync running between an Android, iOS, macOS and JVM app.

Steps to build:

1 - Create an Atlas Account and Deploy a Free Cluster

2 - Create an Atlas App Services App

  • Follow the Create an App with the App Services UI guide.
    • When creating the App, choose the Real-time Sync template.
  • Once created, in the App Services console click on your newly created App.
  • Keep Dev Mode enabled.
  • Navigate to Device Sync through the left navigation menu.
  • Under Sync Type, select Flexible Sync (or follow the Enable Flexible Sync guide).
  • Under Define Permissions, add:
{
  "rules": {},
  "defaultRoles": [
    {
      "name": "owner-read-write",
      "applyWhen": {},
      "read": {
        "_id": "%%user.id"
      },
      "write": {
        "_id": "%%user.id"
      }
    }
  ]
}
object Constants {
    val MONGODB_REALM_APP_ID = "[REPLACE ME]"
    val MONGODB_REALM_APP_USER = "[REPLACE ME]"
    val MONGODB_REALM_APP_PASSWORD = "[REPLACE ME]"
}

3 - Build and run for Android

./gradlew :androidApp:installDebug

4 - Build and run for iOS

./gradlew shared:podInstall
cd iosApp
pod install
open iosApp.xcworkspace

5 - Build and run for macOS

./gradlew shared:podInstall
cd macosApp
pod install
open macosApp.xcworkspace

6 - Build and run for JVM

./gradlew :jvmApp:run

client_rebase's People

Contributors

abiever avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.