SQLite.Net-PCL icon indicating copy to clipboard operation
SQLite.Net-PCL copied to clipboard

AsyncConnection Package Update Issue

Open Apidcloud opened this issue 8 years ago • 5 comments

Good evening!

In version 3.0.5 I was creating an Async Connection as follows: var connectionString = new SQLiteConnectionString(DatabaseFilePath, false); var connectionWithLock = new SQLiteConnectionWithLock(new SQLitePlatformAndroid(), connectionString); return new SQLiteAsyncConnection(() => connectionWithLock);

After updating to 3.1.1 that's no longer possible since I don't have access to SQLite.Net.Platforms namespace anymore. How am I supposed to create a connection in Xamarin Android? Examples folder seems to be outdated.

Sincerely, Luís Fernandes

Apidcloud avatar Aug 20 '16 23:08 Apidcloud

The namespace for Android is SQLite.Net.Platform.XamarinAndroid

I have a very small demo app for iOS and Android here if that helps you https://github.com/michaeldimoudis/xam-forms-sqlitenet-async

michaeldimoudis avatar Aug 21 '16 00:08 michaeldimoudis

That's the thing. With the updated packages, 'Platform' is gone. After updating, I got the following packages: SQLite.Net.Async-PCL and SQLite.Net.Core-PCL.

Apidcloud avatar Aug 21 '16 01:08 Apidcloud

You're probably missing the SQLite.Net-PCL nuget package

michaeldimoudis avatar Aug 21 '16 01:08 michaeldimoudis

Yeah I believe that's the issue. But, I clicked 'Update' on the nuget package, and it replaced both. Async-PCL only has Net.Core-PCL has a dependency though. Should I have the 3 of them?

Apidcloud avatar Aug 21 '16 01:08 Apidcloud

Same question. The SQLite.Net.Async-PCL should have brought in the SQLite.Net-PCL package.

ghost avatar Feb 18 '17 11:02 ghost