Skip to content

Conversation

simolus3
Copy link
Contributor

Following the Kotlin SDK work in powersync-ja/powersync-kotlin#277, this adds some tests to verify that we can link and use SQLCipher.

An issue is that we currently have to use SQLCipher. My preferred solution would be to have two targets (say PowerSync and PowerSyncEncryption) where one offers encryption support and one doesn't. Unfortunately, easier said than done:

  1. Because the Kotlin SDK no longer links libsqlite3, the "normal" PowerSync target would have to link it in Swift.
  2. So PowerSyncEncryption, which links SQLCipher, can't depend on the normal target with all the sources.

I've considered introducing a shared target, but SwiftPM doesn't allow overlapping sources. Having a Common target here that doesn't link SQLite might work, but that would change public imports.

I think package traits may be a decent way to fix this, but they would require a higher minimum Swift version. So this is left in an experimental stage for now, we can revisit this after the Kotlin changes have been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant