Skip to content

Commit 46e687b

Browse files
committed
Initial SQLCipher.swift package commit.
0 parents  commit 46e687b

91 files changed

Lines changed: 142498 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.DS_Store
2+
.swiftpm

LICENSE.md

Lines changed: 461 additions & 0 deletions
Large diffs are not rendered by default.

Package.swift

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// swift-tools-version: 6.0
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "SQLCipher",
8+
platforms: [
9+
.macOS(.v10_14), .iOS(.v13), .macCatalyst(.v13), .watchOS(.v8), .tvOS(.v15), .visionOS(.v1)
10+
],
11+
products: [
12+
.library(
13+
name: "SQLCipher",
14+
targets: ["SQLCipher"]),
15+
],
16+
targets: [
17+
.binaryTarget(name: "SQLCipher", path: "./Sources/SQLCipher/SQLCipher.xcframework"),
18+
.testTarget(
19+
name: "SQLCipherTests",
20+
dependencies: ["SQLCipher"],
21+
cSettings: [
22+
.define("SQLITE_HAS_CODEC", to: nil)
23+
]
24+
)
25+
]
26+
)

README.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# SQLCipher.swift
2+
3+
SQLCipher.swift is based on [SQLCipher Core](https://github.com/sqlcipher/sqlcipher) and is the official Swift Package for SQLCipher maintained by [Zetetic, LLC](https://www.zetetic.net).
4+
5+
SQLCipher is a standalone fork of the [SQLite](https://www.sqlite.org/) database library that adds 256 bit AES encryption of database files and other security features like:
6+
7+
- on-the-fly encryption
8+
- tamper detection
9+
- memory sanitization
10+
- strong key derivation
11+
12+
## Installation
13+
14+
**Xcode**
15+
16+
1. In Xcode go to File > Add Packages...
17+
2. Enter the repository URL: `https://github.com/sqlcipher/sqlcipher-spm`
18+
3. Choose your desired version or branch.
19+
20+
**Package Dependency**
21+
22+
1. Add the following to your `Package.swift` file:
23+
24+
```
25+
dependencies: [
26+
.package(url: "https://github.com/sqlcipher/SQLCipher.swift.git", from: "4.10.0")
27+
]
28+
```
29+
2. Build your project:
30+
31+
```
32+
$ swift build
33+
```
34+
35+
### Import SQLCipher
36+
37+
For Swift based projects, import the SQLCipher module using `import SQLCipher`
38+
39+
For Objective-C based projets, import the SQLCipher module using `#import <SQLCipher/SQLCipher.h>`
40+
41+
### Builds Settings
42+
43+
To enable SQLCipher encryption in your consuming project, you must set the `SQLITE_HAS_CODEC` Build Setting flag.
44+
45+
For Swift based projects, go to your project's Build Settings and search for Preprocessor Macros, enter `SQLITE_HAS_CODEC=1` for both Debug and Release Preprocessor Macros.
46+
47+
For Objective-C based projects, go to your project's Build Settings and search for Other C Flags, enter `-DSQITE_HAS_CODEC` for both Debug and Release Other C Flags.
48+
49+
## License
50+
51+
SQLCipher.swift is distributed under a BSD-style license, requiring attribution and reproduction of the license in applications and documentation. See the [the LICENSE file](https://github.com/sqlcipher/SQLCipher.swift/LICENSE.md) for more information.
52+
53+
## Support
54+
55+
The primary source for complete documentation (design, API, platforms, usage) is the SQLCipher website:
56+
57+
[https://www.zetetic.net/sqlcipher/sqlcipher-apple-community/#option-2-swift-package-manager-integration](https://www.zetetic.net/sqlcipher/sqlcipher-apple-community/#option-2-swift-package-manager-integration)
58+
59+
[https://www.zetetic.net/sqlcipher/documentation](https://www.zetetic.net/sqlcipher/documentation)
60+
61+
The primary avenue for support and discussions is the SQLCipher discuss site:
62+
63+
[https://discuss.zetetic.net/c/sqlcipher](https://discuss.zetetic.net/c/sqlcipher)
64+
65+
Issues or support questions on using SQLCipher should be entered into the GitHub Issue tracker:
66+
67+
[https://github.com/sqlcipher/SQLCipher.swift/issues](https://github.com/sqlcipher/SQLCipher.swift/issues)
68+
69+
Please DO NOT post issues, support questions, or other problems to blog posts about SQLCipher as we do not monitor them frequently.
70+
71+
If you are using SQLCipher in your own software please let us know at [support@zetetic.net](mailto:support@zetetic.net?Subject=Using%20SQLCipher%20Community)!
72+
73+
SQLCipher commercial libraries are [available for purchase](https://www.zetetic.net/sqlcipher/buy/) which have some signficant advantages:
74+
75+
* Easier to setup, saving many steps in project configuration
76+
* Value Level Encryption
77+
* Encrypted Virtual Tables
78+
* Performance Counters & Statistics
79+
* Private Priority Support from SQLCipher developers
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AvailableLibraries</key>
6+
<array>
7+
<dict>
8+
<key>BinaryPath</key>
9+
<string>SQLCipher.framework/SQLCipher</string>
10+
<key>LibraryIdentifier</key>
11+
<string>ios-arm64_x86_64-simulator</string>
12+
<key>LibraryPath</key>
13+
<string>SQLCipher.framework</string>
14+
<key>SupportedArchitectures</key>
15+
<array>
16+
<string>arm64</string>
17+
<string>x86_64</string>
18+
</array>
19+
<key>SupportedPlatform</key>
20+
<string>ios</string>
21+
<key>SupportedPlatformVariant</key>
22+
<string>simulator</string>
23+
</dict>
24+
<dict>
25+
<key>BinaryPath</key>
26+
<string>SQLCipher.framework/Versions/A/SQLCipher</string>
27+
<key>LibraryIdentifier</key>
28+
<string>macos-arm64_x86_64</string>
29+
<key>LibraryPath</key>
30+
<string>SQLCipher.framework</string>
31+
<key>SupportedArchitectures</key>
32+
<array>
33+
<string>arm64</string>
34+
<string>x86_64</string>
35+
</array>
36+
<key>SupportedPlatform</key>
37+
<string>macos</string>
38+
</dict>
39+
<dict>
40+
<key>BinaryPath</key>
41+
<string>SQLCipher.framework/SQLCipher</string>
42+
<key>LibraryIdentifier</key>
43+
<string>watchos-arm64</string>
44+
<key>LibraryPath</key>
45+
<string>SQLCipher.framework</string>
46+
<key>SupportedArchitectures</key>
47+
<array>
48+
<string>arm64</string>
49+
</array>
50+
<key>SupportedPlatform</key>
51+
<string>watchos</string>
52+
</dict>
53+
<dict>
54+
<key>BinaryPath</key>
55+
<string>SQLCipher.framework/SQLCipher</string>
56+
<key>LibraryIdentifier</key>
57+
<string>ios-arm64</string>
58+
<key>LibraryPath</key>
59+
<string>SQLCipher.framework</string>
60+
<key>SupportedArchitectures</key>
61+
<array>
62+
<string>arm64</string>
63+
</array>
64+
<key>SupportedPlatform</key>
65+
<string>ios</string>
66+
</dict>
67+
<dict>
68+
<key>BinaryPath</key>
69+
<string>SQLCipher.framework/SQLCipher</string>
70+
<key>LibraryIdentifier</key>
71+
<string>tvos-arm64_x86_64-simulator</string>
72+
<key>LibraryPath</key>
73+
<string>SQLCipher.framework</string>
74+
<key>SupportedArchitectures</key>
75+
<array>
76+
<string>arm64</string>
77+
<string>x86_64</string>
78+
</array>
79+
<key>SupportedPlatform</key>
80+
<string>tvos</string>
81+
<key>SupportedPlatformVariant</key>
82+
<string>simulator</string>
83+
</dict>
84+
<dict>
85+
<key>BinaryPath</key>
86+
<string>SQLCipher.framework/Versions/A/SQLCipher</string>
87+
<key>LibraryIdentifier</key>
88+
<string>ios-x86_64-maccatalyst</string>
89+
<key>LibraryPath</key>
90+
<string>SQLCipher.framework</string>
91+
<key>SupportedArchitectures</key>
92+
<array>
93+
<string>x86_64</string>
94+
</array>
95+
<key>SupportedPlatform</key>
96+
<string>ios</string>
97+
<key>SupportedPlatformVariant</key>
98+
<string>maccatalyst</string>
99+
</dict>
100+
<dict>
101+
<key>BinaryPath</key>
102+
<string>SQLCipher.framework/SQLCipher</string>
103+
<key>LibraryIdentifier</key>
104+
<string>xros-arm64</string>
105+
<key>LibraryPath</key>
106+
<string>SQLCipher.framework</string>
107+
<key>SupportedArchitectures</key>
108+
<array>
109+
<string>arm64</string>
110+
</array>
111+
<key>SupportedPlatform</key>
112+
<string>xros</string>
113+
</dict>
114+
<dict>
115+
<key>BinaryPath</key>
116+
<string>SQLCipher.framework/SQLCipher</string>
117+
<key>LibraryIdentifier</key>
118+
<string>xros-arm64_x86_64-simulator</string>
119+
<key>LibraryPath</key>
120+
<string>SQLCipher.framework</string>
121+
<key>SupportedArchitectures</key>
122+
<array>
123+
<string>arm64</string>
124+
<string>x86_64</string>
125+
</array>
126+
<key>SupportedPlatform</key>
127+
<string>xros</string>
128+
<key>SupportedPlatformVariant</key>
129+
<string>simulator</string>
130+
</dict>
131+
<dict>
132+
<key>BinaryPath</key>
133+
<string>SQLCipher.framework/SQLCipher</string>
134+
<key>LibraryIdentifier</key>
135+
<string>watchos-arm64_x86_64-simulator</string>
136+
<key>LibraryPath</key>
137+
<string>SQLCipher.framework</string>
138+
<key>SupportedArchitectures</key>
139+
<array>
140+
<string>arm64</string>
141+
<string>x86_64</string>
142+
</array>
143+
<key>SupportedPlatform</key>
144+
<string>watchos</string>
145+
<key>SupportedPlatformVariant</key>
146+
<string>simulator</string>
147+
</dict>
148+
<dict>
149+
<key>BinaryPath</key>
150+
<string>SQLCipher.framework/SQLCipher</string>
151+
<key>LibraryIdentifier</key>
152+
<string>tvos-arm64</string>
153+
<key>LibraryPath</key>
154+
<string>SQLCipher.framework</string>
155+
<key>SupportedArchitectures</key>
156+
<array>
157+
<string>arm64</string>
158+
</array>
159+
<key>SupportedPlatform</key>
160+
<string>tvos</string>
161+
</dict>
162+
</array>
163+
<key>CFBundlePackageType</key>
164+
<string>XFWK</string>
165+
<key>XCFrameworkFormatVersion</key>
166+
<string>1.0</string>
167+
</dict>
168+
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)