Is there a way to use SQLite in a PCL or is this still the best workaround http://stackoverflow.com/questions/13699544/using-sqlite-inside-portable-class-library
Try SQLite.Net.Async from NuGet.
SQlite should be PCL compatible already. Data in mobile should show how you can achieve a cross-platform implementation.
thanks @SKall, I will check it out
I'm using Sqlite.Net from Nuget here inside a PCL and all you have do to is to provide a platform specific connection. Verified on Android and iOS - I have not tested WP8.
WP8 works too.
We look at SQLite.Net in XAM160 - Data in Mobile, but we look specifically at SQLite.Net with PCL and dependency injection as well as platform extensions in XAM300 - Advanced Cross-Platform development.
If you want to explore last mentioned, have a look at the following Nuget packages:
SQLite.Net PCL & SQLite.Net.Async PCL
There are now Platform specific packages available to use in conjunction with these for each of the following platforms:
Win32 Platform, XamarinIOS Platform, XamarinAndroid Platform, WinRT Platform & WindowsPhone8 Platform
Hope this helps
If you get onboard with MVVMCross, then there is a great SQLite plugin which is cross platform. In the PCL you can write all your models and logic, and then simply call
ISQLiteConnection connection = Mvx.ResolveI<SQLiteConnection>();
to call methods in the platform specific implementation.
I can second what Tristan (whose face looks kinda familiar) says - the MvvmCross NuGet package works very nicely.
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies