Reputation: 1408
I’ve got an iOS (swift) app that’s using a local realm. I’m trying to update it to use a synced realm so eventually I can make my app multi-user and share data. But I am new to MongoDB and Synced Realms.
I’ve successfully installed/build/run the “TaskTracker” starter “Synced” app on atlas and an iOS client.
Now I’m trying to make a Synced Realm for my app. I figure I would create a Synced Realm and put it in Development mode from scratch. That way I can convert my existing data into Synced data bit by bit and I don’t have to worry about the server side schema yet. I’m hoping that the schema will be defined for me and I can use it once I’m ready to move to a production level deployment.
So, I followed the “Get Started with Sync” document (https://docs.mongodb.com/realm/sync/get-started/). I’ve created my Atlas Cluster (Cluster0), and a Realm app in the web UI. The document says:
In this step in the web UI, it seems that there are 3 steps:
For Step 1, I can select “Cluster0 - (Service: mongodb-atlas)”
However in Step 2 is where I get stuck: There is a dropdown that says “Enter a partition key field name…”, but when I select the drop down, it says “No options” and I cannot select anytthing. Therefore I can’t go to the third step or turn dev mode on.
The “Get Started with Sync” document doesn’t say anything about pre-populating the realm with data or schema (I thought that’s why I’m choosing Development Mode, so I can define my data on the fly until I figure out what the schema should be).
I even went back and created a database in the atlas cluster, but even after creating the database and a collection, the "Choose a Partition Key" dropdown still says "No actions".
I’m super stuck here. It’s likely because I don’t understand something. Can someone help me see the light?
Upvotes: 3
Views: 610
Reputation: 1408
OK, so I didn't realize this, but you can type into the dropdown box. So even though the drop down options say "No options", I can type in a partition key name "_partition" (or whatever). This is from a MongoDB person:
... On that screen, instead of using the dropdown, you can type in whatever field name you intend to use for the partition value. We generally use "_partition".
Upvotes: 2