locked
How to use Couchbase Lite in Xamarin.Forms PCL project? RRS feed

All replies

  • User31385 posted

    I don't think this is officially supported yet. However I think if you clone the source code for the Couchbase Mobile product from GitHub I seem to recall someone submitting a pull request that supported usage in PCLs, so you may be able to get it that way. An alternative route could be to create your PCL-based solution, then add the Couchbase Mobile product to a Shared Project within that solution and reference it from the PCL.

    Sunday, April 19, 2015 10:46 PM
  • User104756 posted

    @DavidDancy Thanks for your reply.Please let me provide resources or examples if any

    Monday, April 20, 2015 3:49 AM
  • User26934 posted

    Mabu,

    You can use the Xamarin Forms DependencyService to call out from the PCL to code in your platform project to achieve this.

    Monday, April 20, 2015 4:39 AM
  • User104756 posted

    @AlecTucker.1318 ,

    i have to install Couchbase lite nuget package in all platform. right?

    Monday, April 20, 2015 5:03 AM
  • User31385 posted

    @Mabu I used the Xamarin Component Store to install Couchbase Lite. But I think you can achieve the same effect by using NuGet to install all the required packages.

    Monday, April 20, 2015 5:55 AM
  • User104756 posted

    @DavidDancy thanks. I will check.

    Monday, April 20, 2015 9:01 AM
  • User180271 posted

    couchbase.lite can only be used in 'don't link' Linker Behaviour. Does anyone know how to use this in 'Link framework sdks only' in Xamarin.froms? Thanks.

    Monday, December 14, 2015 10:23 AM
  • User179286 posted

    @Mabu Did you solve the problem of using CouchBase.lite in your PCL through DependencyService? Does this mean I have to write my own Wrapper aroung the Couchbase API?

    Tuesday, March 22, 2016 12:35 PM
  • User3254 posted

    @ThomasBurkhart - when I did this last year, I did need to write a wrapper class for the PCL. I chose not to actually do 1:1 wrapping, but created roughly 15 methods that provided the basic CRUD and sync functionality for CB - fairly specific to how I was using my application (unfortunately not a "generic" framework).

    Tuesday, March 22, 2016 12:45 PM
  • User179286 posted

    Ok, so I will do the same. You can always add more methods if needed.

    Tuesday, March 22, 2016 12:57 PM
  • User268788 posted

    I am not able to finding couchbase lite client for Xamarin forms (UWP and Window 8.1). Got couchbase lite client for Android and IOS. What would be the best way to implement couchbase lite in xamarin forms's PCL, So it can be share between all the platforms ( i.e Android , IOS, UWP and Windows 8).

    Tuesday, October 25, 2016 1:58 PM
  • User268788 posted

    @DavidDancy

    "I don't think this is officially supported yet. However I think if you clone the source code for the Couchbase Mobile product from GitHub I seem to recall someone submitting a pull request that supported usage in PCLs, so you may be able to get it that way. An alternative route could be to create your PCL-based solution, then add the Couchbase Mobile product to a Shared Project within that solution and reference it from the PCL. "

    anything on it ? is it possible to do so ?

    Tuesday, October 25, 2016 1:59 PM
  • User31385 posted

    @dinkualoha AFAIK there's no PCL-based version either available or in planning. However if you really want to know, you could raise an issue about it on the project at https://github.com/couchbase/couchbase-net-client.

    Tuesday, October 25, 2016 11:10 PM
  • User33247 posted

    I am playing around with it. What I did is turn my project into a netstandard 1.4 project and used the 2.0 beta. It compiles and seems to be working for basic stuff... Haven't done much testing though but it could be a start

    Saturday, June 3, 2017 8:33 PM
  • User381761 posted

    @ThomasBurkhart @DavidDancy @Mabu Any help on this? I need to include couchbase in PCL. How to achieve this? Any example.

    Tuesday, January 29, 2019 5:55 AM