This guide is currently specific to the Dart/Flutter SDK. We may expand it to cover other SDKs in the future.
powersync-sqlite-core binary in your project’s root directory.
Setup
- Download the PowerSync SQLite binary
- Go to powersync-sqlite-core Releases
- Download the binary for your OS
- Rename the binary
- Remove the architecture suffix from the filename
- Examples:
powersync_x64.dll→powersync.dll(Windows)libpowersync_aarch64.dylib→libpowersync.dylib(macOS)libpowersync_x64.so→libpowersync.so(Linux)
- Place the binary
- Move the renamed binary to your project’s root directory
Example Test
This example shows basic unit testing with PowerSync in Flutter. For more information, see the Flutter unit testing documentation.If you have trouble with loading the extension, confirm the following
Ensure that your SQLite3 binary install on your system has extension loading enabled. You can confirm this by doing the following- Run
sqlite3in your command-line interface. - In the sqlite3 prompt run
PRAGMA compile_options; - Check the output for the option
ENABLE_LOAD_EXTENSION. - If you see
ENABLE_LOAD_EXTENSION, it means extension loading is enabled.
- Run
sqlite3in your command-line interface. - Run
.load /path/to/file/libpowersync.dylib(macOS) or.load /path/to/file/libpowersync.so(Linux) or.load /path/to/file/powersync.dll(Windows). - If this runs without error, then extension loading is enabled. If it fails with an error message about extension loading being disabled, then it’s not enabled in your SQLite installation.