MongoDB.live, free & fully virtual. June 9th - 10th. Register Now MongoDB.live, free & fully virtual. June 9th - 10th. Register Now

macOS Getting Started Guide

After years and years of waiting for some type of working guide to use MongoDB (cloud, not local) on macOS, there still isn’t a complete one.

Our application is both mobile and desktop so our users need to be able to connect to their cloud hosted data from any of their devices.

This is probably the wrong place for a (feature) request but how about a modern, working, guide to installing and using mongoDB (atlas, stitch etc) on macOS with a GUI? Along with that, how about a modern CocoaPods install that actually works and a guide to go with it?

I know this is probably asking a lot… but… how about a macOS sample project?

Keep in mind that while there is a Getting Stated Guide, it leverages home-brew and swift package manager (ugh) and the end result is a stripped down macOS project with no GUI.

See CocoaPods Support as well.

Jay

2 Likes

Hi Jay,

Thanks for the feedback! We’re currently working on integrating MongoDB Stitch with Realm which will evolve into the MongoDB Realm platform (see the MongoDB Realm Roadmap for more details). MongoDB Realm will include bi-directional sync with MongoDB Atlas with SDKs for mobile, desktop, and cloud applications.

We’re aware that developer examples and resources need to be improved and our team is working on a major refresh based on community feedback and modern tooling/workflow. We’ll have sample projects, tutorials, guides, and other resources.

Our application is both mobile and desktop so our users need to be able to connect to their cloud hosted data from any of their devices.

What languages and MongoDB SDKs are you currently using in your application? I’m guessing the MongoDB Swift driver (since that is the Getting Started guide you referenced) but I’ve noticed you are very active in the Realm community.

The MongoDB Swift driver, Stitch Swift SDK, and Realm Swift SDK are currently separate resources and it would definitely make sense to have a consolidated “Getting Started with MongoDB using Swift” guide.

macOS with a GUI?

Can you elaborate on the sort of GUI usage you are thinking of?

Thanks,
Stennie

2 Likes

Thank you for the very prompt response. Sorry for the length but I wanted to provide a clear understanding of what our experience is in hopes it would help others.

What languages and MongoDB SDKs are you currently using in your application?

macOS development in Swift. Swift driver is very important.

Can you elaborate on the sort of GUI usage you are thinking of?

I’ve worked with a few of your team members in the past and after about 45 emails and a lot of trial an error they were able to get a macOS app to build. However, that app was a stripped down command line app with no user interface - and even at that it had all kinds of compile errors and really didn’t work - but it did build.

So the mention of GUI;

It was very frustrating for us that once we were able to get the app to build, it was not really functional and wasn’t a base app to build on as development progressed because it has no graphical interface. e.g. If you fire up Xcode and build a new macOS project, right out of the gate you can run it and will see a blank window. While we could spend a LOT of time trying add the GUI components back into the command line app, it just seems backwards. Our suggestion is to start with a standard app (Xcode->New Project->macOS app) and then integrate mongo into it.

Also, the use of SPM in this case is well, a bad way to go (IMO). It may be the ‘future’ but for now, if a developer wants to create an app, Cocoapods is a pretty bulletproof, tried and true way to integrate your API into an app.

Maybe I am overstating things but try it yourself; walk through your guide and try to build a macOS app which includes MongoDB and provides a GUI.

but I’ve noticed you are very active in the Realm community.

I am and always try to give back to the developer community.

Part of the reason I am mentioning this (macOS getting started) is that we banked on Realm a few years back in the hopes it would become a mature multi-user(tenant), multi-device back end for our product. It has not really progressed that way and lacks basic, industry standard features such as record locking and user presence. In fact one of the realm engineers, in response to a Feature Request to have record/object locking was:

Apart from that, I don’t see the real-world benefit of having such a system in place

So we are looking to move away from Realm to another platform that is better suited and Mongo has many of the features we need. Maybe MongoDB Realm will too? The feature set path is unclear.

Jay

Hi there!

Thank you for reaching out to us.

I lead development of MongoSwift and I recall hearing that you were in contact with a couple people at the company about this in the past, which led to my opening the JIRA ticket you linked about CocoaPods.

To address a few of the points around that which have come up here:

The primary use case we’re focusing on for the driver at this point is server-side Swift development. SwiftPM is used pretty exclusively in that community, which is why we chose to focus our packaging efforts there.
Regarding homebrew usage when installing, that will go away in our next release, as we’ve now vendored the C driver into the Swift driver and it is built by SwiftPM along with the Swift code.

Using the driver directly in a GUI desktop application to talk to a remote server isn’t a use case we’ve had requests for outside of yours; a more common architecture is to have a backend server which sits between your application and the database. Can you elaborate a bit more on your need/desire to have all of the DB interaction occurring directly in the GUI app?

Definitely agree with the need for a unified guide to using Swift with our products that better explains which libraries/products support which use cases.

2 Likes

Thank you for the reply.

Using the driver directly in a GUI desktop application to talk to a remote server isn’t a use case we’ve had requests for outside of yours

You don’t have any developers using iPhones that want to have a cloud store of some kind? Or an inventory control app for multiple locations backed by cloud storage that can be access by a companies devices? Or a mobile app where the iPhone stores it’s data (like a multi-device To Do app) by leveraging one of the Mongo products where those To Do’s can also be accessed at the desktop level? (Stitch Atlas etc)?

A number of databases offer that kind of functionality, Firebase, Realm, Couchbase, Couchbase Mobile, Google Store, DynamoDB, and a number of others. In fact, Amazon has a simple, REST-based API which can be easily added to an Xcode app as well as a full cocoapods install. (they also have working tutorials and example apps).

It seemed like a good match for Mongo products as well… Perhaps not?

If not, maybe a clarification of who your target audience is would be in order because this description sounds exactly like what we are after.

‘MongoDB’ Exposes the full power of working with documents in MongoDB and the MongoDB query language, directly from your web and mobile application frontend code

If we’re writing the ‘front end code’ that means that Mongo is the back end where that data is stored. We should be able to access that data from Web or device (that would include iOS/macOS).

I am really trying to understand your products as what the documentation and descriptions say seem to differ from what it actually is? Maybe you can clarify for future readers?

Jay

To clarify, I only meant we haven’t had developers wanting to use MongoSwift specifically in those situations. That particular library is designed for developers who want to write a backend server in Swift, using e.g. the Vapor web framework.

For the use cases you’re describing with a serverless architecture and the need to e.g. sync data between local and remote storage, MongoDB Stitch, and soon MongoDB Realm, are a better fit.

Thank you. When I mentioned a ‘Swift’ driver, I was referring to being able to use any Mongo solution within Swift on macOS. The MongoSwift product was not really what I was referring to so my statement was unclear.

For the use cases you’re describing with a serverless architecture and the need to e.g. sync data between local and remote storage, MongoDB Stitch, and soon MongoDB Realm, are a better fit.

Agreed and we are now circling back around to the core issue and the original reason for my post.

MongoDB Stitch

Doesn’t work, and and I mentioned in the original post…

guide to installing and using mongoDB (atlas, stitch etc) on macOS with a GUI

…is what we’ve been after.

Jay

7 days with no reply or direction. This is starting to feel like the Realm forums. lol

Hi @Jay,

Can you clarify any further information you are expecting in this thread?

We’ve acknowledged and passed on your feedback, but creating any new resources will require planning, prioritisation, and development.

Your use case does fit into the MongoDB Realm roadmap as mentioned earlier in this thread, but that is still under active development and the beta will be available later this year.

Per the roadmap, Stitch will be rebranded as MongoDB Realm and the Realm and Stitch SDKs will be replaced with new, merged MongoDB Realm SDK packages. There will be significant effort invested in improving developer experience and creating resources for the new MongoDB Realm platform.

Thanks,
Stennie

Thanks for the response.

There was no expectation of creating new resources or really anything other than clarifying how to get started with MongoDB products. Thank you for passing along feedback.

Our goal, as I am sure many others have, was to gain some experience with your products such as Stitch. Stitch leverages Atlas so while working through Stitch it also exposes us to Atlas to some extent
which we felt would help us understand the platform in general and would help us evaluate it for an enterprise solution.

Jay