Search code examples
databasesqlitexamarin.iosxamarin.androidcouchbase-lite

Xamarin cross platform database


I'm developing a cross platform app in Xamarin.iOS and Xamarin.Android. I want to write a dal or repository layer once, and then make a reference to it from Android and iOS yo layers. Is this possible? Thanks.


Solution

  • This kind of thing is not possible for 1.x, as the API is not compatible with any PCL or .NET Standard profile (however, you can use shared projects to achieve something similar). However, version 2.0 of the library is compiled as .NET Standard 1.4 and so you can create one assembly that can be referenced by any platform that also implements at least .NET Standard 1.4 (including Xamarin iOS and Android).