SuperDuperTango
SuperDuperTango

Reputation: 1408

Can't create a MongoDB Realm Sync in Development Mode

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:

  1. Navigate to the Realm Sync Panel
  2. Decide whether to use Development Mode (I am).
  3. Configure Sync:

In this step in the web UI, it seems that there are 3 steps:

  1. Select a Cluster to Sync
  2. Choose a Partition Key
  3. Define a Database Name

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.

development mode sync setup screen with blocking problem.

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

Answers (1)

SuperDuperTango
SuperDuperTango

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

Related Questions