You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Connect to MongoDB and Create a Collection](#connect-to-mongodb-and-create-a-collection)
17
15
-[Create and Insert a Document](#create-and-insert-a-document)
@@ -35,13 +33,11 @@ Bug reports in JIRA for all driver projects (i.e. NODE, PYTHON, CSHARP, JAVA) an
35
33
Core Server (i.e. SERVER) project are **public**.
36
34
37
35
## Installation
38
-
`MongoSwift` works with Swift 4.2+.
36
+
`MongoSwift` works with Swift 5.0+ on MacOS and Linux.
39
37
40
-
### macOS and Linux
38
+
Installation is supported via [Swift Package Manager](https://swift.org/package-manager/).
41
39
42
-
Installation on macOS and Linux is supported via [Swift Package Manager](https://swift.org/package-manager/).
43
-
44
-
#### Step 1: Install the MongoDB C Driver
40
+
### Step 1: Install the MongoDB C Driver
45
41
The driver wraps the MongoDB C driver, and using it requires having the C driver's two components, `libbson` and `libmongoc`, installed on your system. **The minimum required version of the C Driver is 1.15.1**.
46
42
47
43
*On a Mac*, you can install both components at once using [Homebrew](https://brew.sh/):
@@ -51,13 +47,13 @@ The driver wraps the MongoDB C driver, and using it requires having the C driver
51
47
52
48
See example installation from source on Ubuntu in [Docker](https://github.com/mongodb/mongo-swift-driver/tree/master/Examples/Docker).
53
49
54
-
####Step 2: Install MongoSwift
50
+
### Step 2: Install MongoSwift
55
51
*Please follow the instructions in the previous section on installing the MongoDB C Driver before proceeding.*
56
52
57
53
Add MongoSwift to your dependencies in `Package.swift`:
58
54
59
55
```swift
60
-
// swift-tools-version:4.2
56
+
// swift-tools-version:5.0
61
57
importPackageDescription
62
58
63
59
letpackage=Package(
@@ -73,27 +69,6 @@ let package = Package(
73
69
74
70
Then run `swift build` to download, compile, and link all your dependencies.
75
71
76
-
## iOS, tvOS, and watchOS
77
-
Installation is supported via [CocoaPods](https://cocoapods.org/).
78
-
79
-
The pod includes as a dependency an embedded version of the MongoDB C Driver, meant for use on these OSes.
80
-
81
-
**Note**: the embedded driver currently does not support SSL. See [#141](https://github.com/mongodb/mongo-swift-driver/issues/141) and [CDRIVER-2850](https://jira.mongodb.org/browse/CDRIVER-2850) for more information.
82
-
83
-
Add `MongoSwift` to your Podfile as follows:
84
-
85
-
86
-
```ruby
87
-
platform :ios, '11.0'
88
-
use_frameworks!
89
-
90
-
target 'MyApp'do
91
-
pod 'MongoSwift', '~> VERSION.STRING.HERE'
92
-
end
93
-
```
94
-
95
-
Then run `pod install` to install your project's dependencies.
96
-
97
72
## Example Usage
98
73
99
74
Note: You should call `cleanupMongoSwift()` exactly once at the end of your application to release all memory and other resources allocated by `libmongoc`.
@@ -164,8 +139,8 @@ Note that `Document` conforms to `Collection`, so useful methods from
164
139
all available. However, runtime guarantees are not yet met for many of these
165
140
methods.
166
141
167
-
### Usage With Kituraand Vapor
168
-
The `Examples/` directory contains sample projects that use the driver with [Kitura](https://github.com/mongodb/mongo-swift-driver/tree/master/Examples/Kitura) and [Vapor](https://github.com/mongodb/mongo-swift-driver/tree/master/Examples/Vapor).
142
+
### Usage With Kitura, Vapor, and Perfect
143
+
The `Examples/` directory contains sample projects that use the driver with [Kitura](https://github.com/mongodb/mongo-swift-driver/tree/master/Examples/Kitura), [Vapor](https://github.com/mongodb/mongo-swift-driver/tree/master/Examples/Vapor), and [Perfect](https://github.com/mongodb/mongo-swift-driver/tree/master/Examples/Perfect).
0 commit comments