You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to open a DB connection I get System.DllNotFoundException. It seems like there is no native libraries for iOS (and probably for Android too):
2024-10-23 09:09:26.123078+0200 DuckDbMauiIssue[39958:8162189] System.TypeInitializationException: The type initializer for 'DuckDB.NET.Data.DuckDBConnectionStringBuilder' threw an exception. ---> System.DllNotFoundException: duckdb at DuckDB.NET.Data.DuckDBConnectionStringBuilder..cctor() 2024-10-23 09:09:26.123281+0200 DuckDbMauiIssue[39958:8162189] --- End of inner exception stack trace --- at DuckDB.NET.Data.DuckDBConnection.get_ParsedConnection() at DuckDB.NET.Data.DuckDBConnection.Open() at System.Data.Common.DbConnection.OpenAsync(CancellationToken cancellationToken) 2024-10-23 09:09:26.123495+0200 DuckDbMauiIssue[39958:8162189] --- End of stack trace from previous location --- at DuckDbMauiIssue.MainPage.OnCounterClicked(Object sender, EventArgs e) in /Users/.../Projects/temp/DuckDbMauiIssue/MainPage.xaml.cs:line 17
I included the library but the same exception is thrown.
I also added loading two deli's in the Main: One is libxamarin-dotnet-debug.dylib, the other is libduckdb.dylib. The code checks if a file exists (both) and if the library can be loaded (fails for ducked).
So if I understood correctly, File.Exists returns true for both of them, but loading fails for DuckDB? I'm not sure whether the library in libduckdb-osx-universal.zip is the one you should be including on iOS, can you ask on the official discord?
There is also duckdb-swift but I'm not sure if that project compiles its own native library or not.
Activity
Giorgi commentedon Oct 23, 2024
Can you try including libduckdb.dylib from libduckdb-osx-universal.zip to see if that works?
DamianAtIQVIA commentedon Oct 23, 2024
I included the library but the same exception is thrown.
I also added loading two deli's in the Main: One is libxamarin-dotnet-debug.dylib, the other is libduckdb.dylib. The code checks if a file exists (both) and if the library can be loaded (fails for ducked).
See the latest commit (9d711b387a2314ca12bb06a37c76a6a3b2fca8ab) in https://github.com/DamianAtIQVIA/DuckDbMauiIssue
Giorgi commentedon Oct 23, 2024
So if I understood correctly,
File.Existsreturns true for both of them, but loading fails for DuckDB? I'm not sure whether the library in libduckdb-osx-universal.zip is the one you should be including on iOS, can you ask on the official discord?There is also duckdb-swift but I'm not sure if that project compiles its own native library or not.