I potentially want to use the encrypted version of sqlite (link). Essentially to use sqlite encryption enhancements (SEE) you need to build a version of the sqlite3.dll.
I am using MVVMCross. Is it possible to use the MVVMCross plugins with this version of the ddl, rather than the default version installed on iOS and android. If so how do you do it?
Thanks in advance
The existing MvvmCross plugin doesn't reference the encrypted dll. With that you can't switch them out easily right now i think.
You could just copy the code into your project and use the encrypted version of SQLite. Another option would be to make a fix to be able to switch SQLite version that the plugin uses, make a pull request so MvvmCross can release an update for the current plugin.
Related
I'm using a new project that's using sql-lite-pcl and it doesn't appear to be loading the required dependency packages (recursively). I know this because "it just doesn't work (tm)"
I've been able to get the project to work by adding the following on the Xamarin Forms project and the iOS project
SQLite-net-pcl
SQLitePCLRaw.bundle_green
SQLitePCLRaw.core
SQLitePCLRaw.lib.e_sqlite3.ios
SQLitePCLRaw.provider.dynamic_cdecl
SQLitePCLRaw.provider.internal.ios_unified. (iOS only)
SQLitePCLRaw.provider.ios_inified (iOS only)
For most of the items above I needed to install a 1x version, whereas the 2.0 version of SQLite reported a variety of errors from the SQLite-net-pcl library. (there is an open GIT issue on the project page for 2.0 support)
Question
How do I verify (in runtime?) that I'm using the native iOS provider?
Does it matter if I switch between the iOS provider and the code- based one? In either data binary reading and writing, locks, app suspension/closing handles, performance or any other reason?
What are the correct libraries to load if simply adding sql-lite-pcl into a Visual Studio for Mac doesn't recursively load all dependencies, and the correct version of them?
There is a very good tutorial how to use SQLite for Xamarin Forms. You can find it here.
It's working fine both for Android and iOS version
I try to use the SQLite in the VS2017 in a universal windows platform project. I follow the guidance to download the SQLite extension for VS2015 although my local machine environment is VS2017, maybe this is the root cause? Then I add the reference with SQLIte. After that I installed the SQLitePCL with nuget.
After the SQLite installed, I wanted to try to run a demo to see if it can work right. But I found I can't using the namespace (using SQLite.Net.Attributes;) which it necessary for my demo.
I did some search about the SQLite and VS2017, But didn't found too much about such circumstances. So I want to know if anyone ever met such problem and How can your fix that?
Or it just unavailable to using SQLite in VS2017? If yes, can I complier a newest version about this?
Thanks everyone who can give me some reply or suggestion about this issue.
But I found I can't using the namespace (using SQLite.Net.Attributes;)
It seems like SQLite.Net.Attributes is belong to the Nuget package SQLite.Net-PCL, not SQLitePCL, the one you are using. SQLitePCL does't contain SQLite.Net.Attributes. You may obtain the package that is not you attempt to use.
There're many Nuget packages for SQLite, some of them are older with long time no updating. For UWP app, I'd recommend you to follow this tutorial to use a SQLite database in a UWP app.
I can get MvvmCross working with a Windows 8.0 Store App.
I can get SQLite working with a different Windows 8.0 Store App.
I cannot figure out how to get MvvmCross + SQLite working on a Store app.
I always get this Exception:
Failed to construct and initialize ViewModel for type Flux.Core.ViewModels.TestViewModel from locator MvxDefaultViewModelLocator - check MvxTrace for more information
I've spent the entire day searching with google, hoping to solve this myself. The KittenDb example is about as close as I've come, but there's no Store app example in there. (I got the Kitten example working no problem on Android.)
Is there any working example out there?
Thanks!
SQLite for Windows Store is a C++ component and comes in separate ARM, x86 and x64 binaries.
To install it, you need to add a Visual Studio extension - instructions in http://blogs.msdn.com/b/robertgreen/archive/2012/11/13/using-sqlite-in-windows-store-apps.aspx - and then reference that extension from your UI project.
To then link the correct platform version of the Cirrious.MvvmCross.Plugins.Sqlite.WindowsStore.dll assembly to your UI project, you further need to adapt your .csproj file with a <Choose> block a bit like the one in https://nuget.codeplex.com/discussions/446656
There is an open issue within MvvmCross to make SQLite easier to use from nuget (see https://github.com/MvvmCross/MvvmCross/issues/307) but I don't know if anyone is actively working on addressing this issue currently - currently users seem to be just putting up with challenges of different processor architectures and following the manual steps to adapt their projects.
I'm using latest QT from 4.8.x branch (not 5.x)
Is it possible to build QtSql4.dll to have sqlite built-in instead of using stand alone sqlite plugin in plugins? I'm trying to see inside QT makefiles but don't see if it's possible or not.
I always though it was possible, but wasn't sure how.
QT's configure has two types of options for sql drivers:
-qt-sql-<driver> ... Enable a SQL <driver> in the Qt Library.
-plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to at run
time.
To have sqlite to be compiled into QtSql4.dll -qt-sql-sqlite option has to be used with configure.
I am implementing the excellent mvvmcross library in a multiplatform enterprise application. The monodroid sqlite plugin is working - I now need to implement monotouch functionality though.
I was interested if anyone had developed an accompanying sqlite plugin for the ios/monotouch platform and describing the complexity involved and path taken, stumbling blocks etc.
Cheers
This should be quite straight-forward to...
Using MonoDevelop on the Mac, create a new MonoTouch library project - Cirrious.MvvmCross.Plugins.Sqlite.Touchin the folder /MvvmCross/Cirrious/Plugins/Sqlite/
Set the build paths for debug and release to ../../../../bin/Touch/debug and ../../../../bin/Touch/release
Add references to: Cirrious.MvvmCross (core PCL), Cirrious.MvvmCross.Touch (core MonoTouch methods), Cirrious.MvvmCross.Plugins.Sqlite (core SQLite functions)
Add the 'boilerplate' plugin file - which just registers the connection factory in DI - see below
Add the connection factory class - see below
Add a link to the sqlite-net file in the Droid plugin - SQLiteNet.cs
Build
When you use this plugin in a MonoTouch UI project, you will need to register the plugin instance in your setup.cs file - just as you do all Touch plugins - this is because we can't use Assembly.Load() at runtime
You may also need to do something special to use the plugin at runtime too - not sure - not used SQLite-net in MonoTouch yet - the Sqlite samples should help - https://github.com/praeclarum/sqlite-net/tree/master/examples/StocksTouch
My attempt at this is:
https://github.com/slodge/MvvmCross/tree/vnext/Cirrious/Plugins/Sqlite/Cirrious.MvvmCross.Plugins.Sqlite.Touch
But I've not tested this.
Would love to read about it if it works... and to see a pull to fix it if it doesn't.
Have you seen this blog post? http://slodge.blogspot.nl/2012/10/a-sqlite-example-vnext-portable.html
"Note that I've only done the Droid implementation of this plugin so far, but I think all of the rest - WP7, MonoTouch, and WinRT (and beyond) should be straight-forward - and that the same SQLiteNet.cs file (#if's and all) will be link-shared between those plugins."
Have you tried using the same SQLite plugin for the monotouch project?