Trying to build Couchbase.Lite.iOS

I’m not sure if this is the proper place, or if I should post on the Github site…

I have been working with the code base since Xamarin Evolve. I have the Android code building on Win7/8 VS 2013 and in Xamarin Studio. I will try the android build on my macbook soon, but expect no problems.

The Couchbase.Lite.iOS project, however, does not want to build on Windows or Mac. I have an issue resolving the (correct?) SQLitePCL.raw and/or .ugly assemblies? Not sure which ones are needed.

I am getting the following error: “namespace Ugly does not exist in the namespace SQLitePCL” on Win or Mac and I think I have tried all versions I could find:

v0.4.0-alpha
v0.5.0
v0.6.1
v0.6.2

Can anyone help me out? I would really like to use this for a project I have, once I can verify the iOS build and example code.

Ok, so the short version is this:

The Couchbase.Lite.iOS.csproj and CouchbaseSample.iOS.csproj files have invalid entries in targets. I manually edited the xml source and fixed it.

The original (lines 65-66 and 163-164 respectively):

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.MonoTouch.CSharp.targets" />

Remove the first entry, and now the project(s) can target monotouch .NET framework in VS 2013 on Windows (7/8). The first line only allows MS .NET frameworks to be targeted, which SQLitePCL.ugly was not built against, so it cannot load. (I also found the single line of code that is the issue in SQLitePCl.ugly… but I digress) . There’s no reason I can think of to have MS.NET targets in an iOS project.

The good news is I now have a Couchbase.Lite.Portable assembly (PCL) that can be used to build business logic PCL’s! A.K.A. Model and View Controllers in the MVVC paradigm. I’ll put in a pull request on Github asap.

Hey @jasells,

Both locations would be fine to post your question.
Definitely outline the issue here in the future:

See your pull request and our team will review.

Much appreciated, Thanks!