MongoDB Swift Driver¶
This is the official MongoDB Swift Driver.
Connect to MongoDB Atlas¶
To connect to a database running locally on its default port, change the
connection string to
To connect to a database running locally, change the connection string
mongod instance must be running to successfully connect to your
database. For information on how to start your
see the Manage mongod Processes Server Manual Entry.
Swift Driver Version
The Swift driver is not compatible with MongoDB server versions older than 3.6.
(*) Not all features in MongoDB 4.4 are available in this version of the driver including OCSP and MONGODB-AWS. These features will be included in future versions of the driver.
The MongoDB Swift driver requires Swift 5.1 or later.
For more information on how to read the compatibility tables, see our guide on MongoDB Compatibility Tables.