Anyone able to get Sync working? Mine is failing ...
# realm
i
Anyone able to get Sync working? Mine is failing on SSL certificate on IOS. I filed a bug but wondering if others are having the same issue. https://github.com/realm/realm-kotlin/issues/645
n
Hey @iamsteveholmes I've added a demo sample using Sync with the latest release. Can you please try it and see if you can reproduce your issue https://github.com/realm/realm-kotlin-samples/tree/nh/sync_demo/MultiplatformDemoWithSync
i
Doing it now, thanks! šŸ™
@Nabil I seem to have it working although I was really not prepared for the amount of work I had to do to get the ā€œappā€ working on the server side. I seemed to have to manually create a database and schema although it’s entirely possible I got something wrong initially. I’m also confused why it wouldn’t be creating documents or adding data on the atlas side of things. Is there a simpler way to go about it? Maybe some way to generate or change the schema from the client side?
n
I think by default the developer mode is on on Atlas which will allow you to create the schema automatically, i.e once the client app (Andorid/iOS etc) connects to the backend. It will examine the model you have to infer the MongoDB schema from it. After this you can lock the schema (turn off the dev mode) to enable only future additive changes to it. With regards to data, did you check the log from the Atlas console? you should be able to see if there was any sync session established between the client and the server.
i
Yes there are definitely sync session established and messages passed when I interact. Initially I was getting a lot of errors. Maybe I did something wrong because the schema didn’t appear to be created appropriately. Shouldn’t I be able to see the data somewhere?
n
If you navigate to Atlas tab then click on Browse Collection then you can see the synced data
i
For what it’s worth, my own failures appear to happen when I try to sign in anonymously. When my app is in a more stable state I’ll try to update it and add a user.
šŸ‘ 1
I tried that but it’s showing 0 documents in the collection šŸ˜•
n
@Ian Ward can have a look if you share with him your URL (example https://cloud.mongodb.com/v2/6172843b880efb17a0a8db5f)
i
OK that changed:
šŸŽ‰ 1
šŸ™Œ 1
Much appreciated! Let me get my own app to a more stable state. I was in the middle of updating a bunch of dependencies (MVIKotlin, Essentry, Decompose). So all my tests are failing and I need to do some rework.