Thank you for reaching out. This behavior is expected due to recent platform changes in.net for iOS .
Root Cause
System.Data.SQLite is not supported on iOS under .NET 7/8/9 because:
- iOS uses AOT (Ahead-of-time) compilation and
- System.Data.SQLite depends on native dynamic loading (dlopen) which iOS explicitly blocks for security.
As a result, the SQLite native library cannot load, producing the runtime error:
e_sqlite3
Even when adding multiple SQLitePCLRaw bundles, the underlying unmanaged dependency required by System.Data.SQLite still cannot load on iOS.
This is why the same code worked in Xamarin (which used MonoJIT) but fails after migration to .NET 9 MAUI.
Recommended solution
To use SQLite reliably on iOS, Android, Windows and MacCatalyst, Microsoft recommends switching to: SQLite-net (sqlite-net-pcl)
Or EF Core SQLite
These packages embed SQLite using SQLitePCLRaw.bundle_green which is fully compatible with iOS AOT.
Recommended package setup:
<PackageReference include="sqlite-net-pcl" Version="1.9.172" />
<PackageReference Include="SQLitePCLRaw.bundle_green" Version="2.1.11" />
Remove all the following (they cause conflicts):
- System.Data.SQLite
- SQLitePCLRaw.bundle_e_sqlite3
- SQLitePCLRaw.provider.dynamic_*
- Any other SQLite native providers
Reference:
Please let us know if you require any further assistance we’re happy to help. If you found this information useful, kindly mark this as "Accept Answer".