I have gone through the intro monoDB University course as well as the course on schemas. I’ve gone through the tracker tutorial and it works. I also have checked out the MongoDB twitch offerings. I am able to setup a backend that connects to my iOS app and create or sign-in a user.
I have a working local realm in an existing swift-based iOS app, and I would like users to be able to remain offline totally if they wish. If they decide to go online, I’d like MongoDB as the backend and for data to sync.
There are a few fundamental things I need to know:
(1) When I start using sync, I can no longer see my local realm using realm studio or realm browser. It wants an encryption key to allow access to the local file. I understand this has something to do with different histories between local and remote (though I haven’t successfully synced anything…see below), but it would be very useful if I could see my local realm for understanding what my CRUD operations are doing locally vs. on Atlas. Is there any way to view my local file?
(2) I don’t understand how my local realm interacts with the Atlas cluster and realmsync. For example, do I need to perform separate writes to update both the cluster and my local realm? Or, does sync take care of both the local and the remote? Do I need to have the Atlas schemas set up for all the objects in my app if I don’t need to write those? If I want to only write a subset of my realm objects to MongoDB but want the full set saved locally, how do I do that?
(3) Is there a list of error codes and what they mean somewhere? If so, I can’t find it. The lack of that resource makes it very difficult for me to learn what I’m doing wrong. For example, I’m getting the following error: Sync: Connection[1]: Session[1]: Received: ERROR(error_code=225, message_size=180, try_again=0).
Thank you.