-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLCipher compile flags consistency #171
Comments
I agree we should use the default of 1 instead of 2 for SQLCipher builds as well, done. As you've mentioned, issue 2 is a bit more troublesome. We can't add compile-time options to a podspec from another podspec (it can be done from the root The compatibility argument between Linux/Windows vs. Android/macOS/iOS is compelling, but I think there should also be compatibility between With the native assets feature currently being developed for the Dart and Flutter SDK, we will likely have a cross-platform solution in the future that works for both Dart and Flutter and allows us to write compile scripts independent of the native build system used in the end. Since that puts the responsibility of linking the right library on iOS and macOS away from us, I think that would be a good opportunity to migrate away from all native build scripts once it is stable. The current situation is not ideal, but I wonder if we should just document it and leave it as is until we have full control over the build. |
@simolus3 Thanks for the information! Is this the feature you are referring to? dart-lang/sdk#50565 |
Exactly. It seems this like this will also support user-defines, so we will likely be able to let application developers decide whether they need DQS or not. |
@simolus3 A simple reminder just in case 😄 |
Thanks for the reminder, I've just published 0.5.7. |
Hello!
I was looking into using the linux library for an existing Android/iOS app that uses
sqlcipher_flutter_libs
.I've found that the flags used on Linux and Windows have some differences between iOS and Android that can break an existing app implementation.
Here are the flags used on the dependencies maintained by the SQLCipher team (Android, iOS and macOS)
https://github.com/sqlcipher/sqlcipher/blob/master/SQLCipher.podspec.json
Differences found
sqlite3_flutter_libs
and like on the team maintained flags. Related SqliteException(5): database is locked drift#2032 (comment)sqlite3_flutter_libs
andsqlcipher_flutter_libs
(linux and windows) use the flagDQS=0
which disables the usage of double quotes as string literal. The SQLCipher maintained libs don't set that flag, so existing apps that have used the Android and iOS dependency may use double quotes in many different queries. Using the Linux or Windows dependency now breaks those queries.1 is an easy fix, like it was done for `sqlite3_flutter_libs' v0.5.10
For 2 I can see two solutions.
Remove the DQS flag on Windows and Linux to match the Android, iOS and macOS flags from the SQLCipher team.
Compile SQLCipher for Android, iOS and macOS with the same set of flags from
sqlite3_flutter_libs
so that drift with all platforms and engines have the same behavior.Android SQLCipher appears to be agnostic to the flags used. https://github.com/sqlcipher/android-database-sqlcipher#building
I'm not sure about distribution on gradle though.
As for iOS and macOS they use the following podfile https://github.com/sqlcipher/sqlcipher/blob/master/SQLCipher.podspec.json
But I'm not sure if it's possible to override the complete set of flags to use the ones we want.
This solution would be breaking, but at least we could have same behavior across the board.
The text was updated successfully, but these errors were encountered: