Skip to content

Commit fb5e46f

Browse files
committed
Merge branch 'develop'
2 parents be65838 + 06e0d6a commit fb5e46f

File tree

3 files changed

+59
-4
lines changed

3 files changed

+59
-4
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var package = Package(
1212

1313
dependencies: [
1414
.package(url: "https://github.com/Lighter-swift/Lighter.git",
15-
from: "1.0.8"),
15+
from: "1.0.24"),
1616
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
1717
],
1818

Package@swift-5.7.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var package = Package(
1212

1313
dependencies: [
1414
.package(url: "https://github.com/Lighter-swift/Lighter.git",
15-
from: "1.0.8"),
15+
from: "1.0.24"),
1616
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
1717
],
1818

README.md

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,62 @@
11
# Northwind-SQLite3.swift
22

3-
2022-08-04: A fork of Northwind-SQLite3 which packages Northwind as a Swift
4-
module.
3+
A fork of Northwind-SQLite3 which packages the Northwind
4+
database as a Swift module/package.
5+
6+
Swift package documentation:
7+
[NorthwindSQLite.swift](https://lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/).
8+
9+
**Note**:
10+
Due to an Xcode 14 bug the Northwind module cannot yet be directly added to an
11+
Xcode project as a package dependency.
12+
A ["Local Package"](https://developer.apple.com/documentation/xcode/organizing-your-code-with-local-packages)
13+
needs to be setup.
14+
It works fine in regular SPM contexts.
15+
16+
### Examples
17+
18+
- [NorthwindWebAPI](https://github.com/Lighter-swift/Examples/blob/develop/Sources/NorthwindWebAPI/) (A server side Swift example
19+
exposing the DB as a JSON API endpoint, and providing a few pretty HTML
20+
pages showing data contained.)
21+
- [NorthwindSwiftUI](https://github.com/Lighter-swift/Examples/blob/develop/Sources/NorthwindSwiftUI/) (A SwiftUI example that lets
22+
one browse the Northwind database. Uses the Lighter API in combination with
23+
its async/await supports.)
24+
25+
### Package.swift
26+
27+
Example of a "LocalHelper" `Package.swift` that imports Northwind
28+
for Xcode use:
29+
```swift
30+
// swift-tools-version: 5.7
31+
import PackageDescription
32+
33+
let package = Package(
34+
name: "LocalHelper",
35+
platforms: [ .macOS(.v10_15), .iOS(.v13) ], // <= required
36+
products: [
37+
.library(
38+
name: "LocalHelper",
39+
targets: ["LocalHelper"]),
40+
],
41+
dependencies: [
42+
.package(url: "https://github.com/Lighter-swift/NorthwindSQLite.swift.git",
43+
branch: "develop")
44+
],
45+
targets: [
46+
.target(
47+
name: "LocalHelper",
48+
dependencies: [
49+
.product(name: "Northwind", package: "NorthwindSQLite.swift")
50+
])
51+
]
52+
)
53+
```
54+
55+
To just re-export Northwind, use this in the LocalHelper.swift:
56+
```swift
57+
@_exported import Northwind
58+
```
59+
560

661
<hr />
762

0 commit comments

Comments
 (0)