问题
I see there's a Couchbase.Lite-PCL in nuget which has been published recently. Is this capable of running in the PCL? Anyone knows how to make it work? I couldn't find any documentation on this.
回答1:
It is not an official NuGet package, so your milage may vary.
It does have the dll's in a portable folder, and the dll's are added fine to a PCL and the project seems to build.
Try it it, it might work fine, but don't expect any direct support from the couchbase people.
Alternatively you could implement an Interface in your PCL, which you implement per platform with the methods you need from the official couchbase nuget. Then inject that platform specific implementation at runtime through the IoC container Xamarin.Forms provide.
来源:https://stackoverflow.com/questions/40447669/how-to-use-couchbase-lite-pcl-in-a-xamarin-forms-project