Skip to content

A toolkit for SQLite databases, with a focus on application development

Notifications You must be signed in to change notification settings

THISISDINOSAUR/GRDB-Swift-7.5.1.swift

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GRDB + SQLCipher

What is this?

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.

Version

  • This Package: 2.3.0
  • GRDB: 6.23.0
  • SQLCipher: 4.5.5

Contributions

We do not accept contributions to this repository at this time. However, feel free to open an issue in order to start a discussion.

We are hiring!

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!

Updating from Upstream

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.

Versioning

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

Compiling SQLCipher manually

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 not make.
  • Copy sqlite3.c and sqlite3.h to Sources/SQLCipher/sqlite3.c and Sources/SQLCipher/include/sqlite3.h.

About

A toolkit for SQLite databases, with a focus on application development

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 93.5%
  • Swift 6.5%