-
Hello, We are trying to use SQLite in an application using .NetFramework on iOS devices. We are not using Xamarin. We have been trying many different approaches. Either the dll are not compiling, or the application has runtime error because it tries to use the wrong SQLite provider and fails to load SQLite. We are using Microsoft.Data.SQLite to create the connection to our database but maybe this is not the right approach ? We understand that the Batteries_v2 should use the "sqlite3" provider in order to use the sytem-provided SQlite of iOS. But we are failing to find the right dll of Batteries_v2 to do that. We are now wondering if we are in a dead end because we are not using Xamarin. Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Hello, Thank you all for your replies. We finally managed to make it work on Ipad. This way we don't need to import e_sqlite3.dll in our project, it's targeting the native SQLite libs of iOS @bricelam We added this in our link.xml but I'm not even sure if its necessary. Thanks again, |
Beta Was this translation helpful? Give feedback.
Hello,
Thank you all for your replies.
We finally managed to make it work on Ipad.
Using the dll inside the bundle "SQLitePCLRaw.bundle_sqlite3" did the trick. I missed this bundle in the nuget explorer of VisualStudio... it was always proposing bundle green or e_sqlite3 but not sqlite3.
This way we don't need to import e_sqlite3.dll in our project, it's targeting the native SQLite libs of iOS
We also still use Microsoft.Data.SQLite to open the connection to the database. It does all the initialization of the batteries and provider on its own. So it's all good.
@bricelam We added this in our link.xml but I'm not even sure if its necessary.
assembly fullname="SQLitePCLRaw.batteries_v2" pre…