This is a fork of GRDB with added support for SQLCipher Community Edition, packaged into XCFramework so that it can be consumed as a Swift Package.
The default branch for this repository is main
(as opposed to upstream's master
) and it doesn't include GRDB (or SQLCipher) source code – only the Swift Package definition and release scripts/assets. XCFramework archives are attached directly in GitHub Releases.
- This Package: 2.4.2
- GRDB: 6.29.3
- SQLCipher: 4.6.1
We do not accept contributions to this repository at this time. However, feel free to open an issue in order to start a discussion.
DuckDuckGo is growing fast and we continue to expand our fully distributed team. We embrace diverse perspectives, and seek out passionate, self-motivated people, committed to our shared vision of raising the standard of trust online. If you are a senior software engineer capable in either iOS or Android, visit our careers page to find out more about our openings!
The update process is semi-automatic, i.e. it uses a shell script that guides you through, but the script requires user input and must be run locally.
Run prepare_release.sh
, which:
- Creates a temporary directory.
- Clones upstream GRDB.swift into a subdirectory.
- Clones SQLCipher into another subdirectory.
- Checks out the latest tags of upstream GRDB.swift and SQLCipher.
- Compares tags with versions included in the current release (based on the content of this README file).
- If versions didn't change, the script stops here.
- If there are updates, the script asks you to input the new version (see Versioning). The script then generates an updated README.md with udpated versions.
- Builds SQLCipher and moves sqlite3.c/h to GRDB.swift project.
- Patches GRDB to include SQLCipher sources.
- If patching fails, the script stops and asks you to patch the project yourself. Once done, it stores the patch for later use.
- Builds GRDB and runs unit tests.
- Builds frameworks for iOS, iOS Simulator and macOS and creates XCFramework.
- Updates Package.swift with the new version and new XCFramework checksum.
- Commits changes, tags the commit, pushes to origin and creates GitHub release.
Once the script is done:
- create PR for BSK referencing the new GRDB.swift version,
- create PRs for iOS and macOS apps referencing your BSK branch.
For versioning, follow Semantic Versioning Rules, but note you don't need to use the same version as GRDB. Examples:
-
Upstream GRDB 5.6.0, after merge -> 5.12.0
- This project 1.0.0 -> 1.1.0
-
Upstream GRDB 5.12.0, after merge -> 6.0.0
- This project 1.1.0 -> 2.0.0
In case prepare_release.sh
script fails, you need to compile SQLCipher amalgamation package
manually. See general instructions:
- Use
./configure --with-crypto-lib=none
. - Remember to use
make sqlite3.c
and notmake
. - Copy
sqlite3.c
andsqlite3.h
toSources/SQLCipher/sqlite3.c
andSources/SQLCipher/include/sqlite3.h
.