|
1 | 1 | # SQLite.swift Documentation |
2 | 2 |
|
3 | 3 | - [Installation](#installation) |
| 4 | + - [Swift Package Manager](#swift-package-manager) |
4 | 5 | - [Carthage](#carthage) |
5 | 6 | - [CocoaPods](#cocoapods) |
6 | | - - [Swift Package Manager](#swift-package-manager) |
7 | 7 | - [Manual](#manual) |
8 | 8 | - [Getting Started](#getting-started) |
9 | 9 | - [Connecting to a Database](#connecting-to-a-database) |
|
71 | 71 | > _Note:_ SQLite.swift requires Swift 5 (and |
72 | 72 | > [Xcode 10.2](https://developer.apple.com/xcode/downloads/)) or greater. |
73 | 73 |
|
| 74 | +### Swift Package Manager |
| 75 | + |
| 76 | +The [Swift Package Manager][] is a tool for managing the distribution of |
| 77 | +Swift code. It’s integrated with the Swift build system to automate the |
| 78 | +process of downloading, compiling, and linking dependencies. |
| 79 | + |
| 80 | +It is the recommended approach for using SQLite.swift in OSX CLI |
| 81 | +applications. |
| 82 | + |
| 83 | + 1. Add the following to your `Package.swift` file: |
| 84 | + |
| 85 | + ```swift |
| 86 | + dependencies: [ |
| 87 | + .package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.12.0") |
| 88 | + ] |
| 89 | + ``` |
| 90 | + |
| 91 | + 2. Build your project: |
| 92 | + |
| 93 | + ```sh |
| 94 | + $ swift build |
| 95 | + ``` |
| 96 | + |
| 97 | +[Swift Package Manager]: https://swift.org/package-manager |
74 | 98 |
|
75 | 99 | ### Carthage |
76 | 100 |
|
@@ -169,31 +193,6 @@ try db.rekey("another secret") |
169 | 193 | [sqlite3pod]: https://github.com/clemensg/sqlite3pod |
170 | 194 | [SQLCipher]: https://www.zetetic.net/sqlcipher/ |
171 | 195 |
|
172 | | -### Swift Package Manager |
173 | | - |
174 | | -The [Swift Package Manager][] is a tool for managing the distribution of |
175 | | -Swift code. It’s integrated with the Swift build system to automate the |
176 | | -process of downloading, compiling, and linking dependencies. |
177 | | - |
178 | | -It is the recommended approach for using SQLite.swift in OSX CLI |
179 | | -applications. |
180 | | - |
181 | | - 1. Add the following to your `Package.swift` file: |
182 | | - |
183 | | - ```swift |
184 | | - dependencies: [ |
185 | | - .package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.12.0") |
186 | | - ] |
187 | | - ``` |
188 | | - |
189 | | - 2. Build your project: |
190 | | - |
191 | | - ```sh |
192 | | - $ swift build |
193 | | - ``` |
194 | | - |
195 | | -[Swift Package Manager]: https://swift.org/package-manager |
196 | | - |
197 | 196 | ### Manual |
198 | 197 |
|
199 | 198 | To install SQLite.swift as an Xcode sub-project: |
|
0 commit comments