GRDB v7.10.0, Android, Linux, Windows, and SQLCipher+SwiftPM

Hello Swift community!

GRDB 7.10.0 is out! This release ships the hard work of @marcprux, @tjadejong and Micah Moore for supporting Android, Linux, Windows, and SQLCipher with SPM (for encrypted databases).

The situation of GRDB+SQLCipher with SPM is much better, but still not all sunshine and roses. You must fork GRDB, and modify Package.swift. Instructions are in the file itself, in comments that contain "GRDB+SQLCipher".

Maybe an "official" fork will ship eventually–this is still under discussion. In all cases, SQLCipher will need a GRDB fork for several years to come, which means that all derived repositories (GRDBQuery, GRDBSnapshotTesting, SQLiteData, etc) will need to be forked as well.

What are we currently lacking in order to avoid forks?

We need Xcode to support package traits. Only package traits can reliably link GRDB with SQLite, or SQLCipher, but not both.

We also need SPM to stop downloading unused dependencies, because I do not want that your projects download SQLCipher, or declare a dependency on SQLCipher, when you do not use it. And when GRDB adds more traits for more SQLite and SQLCipher variants, I do not want that those are downloaded, too.

20 Likes