-
Notifications
You must be signed in to change notification settings - Fork 31
Description
[Flutter iOS] SqliteException(21): Could not load extension on TestFlight builds (works locally)
We are experiencing a blocking issue when preparing our Flutter app for release with PowerSync.
- Platform: Flutter iOS (TestFlight / App Store builds only)
- PowerSync: using
powersync
together withdrift
- Environment: Xcode 26, Swift Package Manager enabled
- Previous setup: CocoaPods (everything worked correctly)
Description
When running the Flutter app locally on device (debug/profile/release) or in simulator, everything works correctly.
However, when distributing to TestFlight, the app immediately crashes with:
Uncaught error: SqliteException(21): Could not load extension
#0 FfiSqlite3.ensureExtensionLoaded
#1 PowerSyncOpenFactory.enableExtension
#2 PowerSyncOpenFactory.open
...
This issue started after migrating the project from CocoaPods to Swift Package Manager and upgrading to Xcode 26.
No new dependencies were added since the migration.
We are also using Drift in the project, which itself uses SQLite. From the PowerSync troubleshooting docs, it seems the problem might be related to multiple SQLite versions being linked into the same iOS target.
We also tried building with the latest version of powersync_flutter_libs
from the main
branch:
powersync_flutter_libs:
git:
url: https://github.com/powersync-ja/powersync.dart
ref: main
path: packages/powersync_flutter_libs
(updated yesterday), but the issue persists.
Additionally, in our Podfile we are not using the static linkage option described in your docs.
We have:
use_frameworks!
and not:
use_frameworks! :linkage => :static
Questions
- Do you know why this issue happens only on TestFlight/App Store builds, while local builds (debug, profile, release) work fine?
- What is the recommended way to resolve or work around the
Could not load extension
error on iOS when using PowerSync?
We are currently blocked from releasing our Flutter app because of this issue. Any help would be highly appreciated 🙏