๐๏ธ Add an App id
App id
๐๏ธ SyncContentView
Create SyncContentView
๐๏ธ Running the App
Launch in Simulator
๐๏ธ Flexible configuration
Configuring Flexible Configuration
๐๏ธ Adding the Flexible Sync Configuration
Las thing we need to do is to pass this information to a new view, OpenSyncedRealmView, that will open the connection with our App and go through all the states needed while logging in our app.
๐๏ธ OpenSyncedRealmView
This wiew will check how our connection to MongoDB Atlas progress and will inform us if there's any error. Once is connected with a Synced Realm (in case .open(let realm)) it shows our old friend MainView. As we're adding to the environment this new, synced Realm our app will keep working as before, storing everything locally AND syncing to our MongoDB Database.
๐๏ธ Adding ownerId
We need to add our user id to the data we're about to sync to our App in the cloud. This way we'll be able to download it later if we need it.
๐๏ธ Finishing Sync
We have a problem