iOS CouchbaseHttpClient MaxConnectionsPerServer

I am using CouchbaseNetClient 2.7.11 and have an issue in iOS. Your code is always setting a value for MaxConnectionsPerServer (see CouchbaseHttpClient line 70) which throws a NotImplementedException on iOS. You are only trapping PlatformNotSupportedExceptions which makes this basically useless on iOS. Any suggestions on how I can work around this?

@blimkemann, it looks like you’re attempting to integrate directly with Couchbase Server through a Xamarin app? What are you trying to accomplish within your app?

If it’s the case that you want to get access directly to Couchbase Server I recommend accessing that data through an API layer (e.g. .NET Core Web API project that uses the .NET SDK for Couchbase Server).

It’s unclear what your error is specifically, but it’s likely rooted in the Xamarin (custom) HttpClient implementation vs CouchbaseHttpClient. There are a variety of ways to investigate this issue, but before we go down that road it may be worth taking a step back to see what you’re trying to accomplish.

Also, if you’re needing to store data locally I’d take a look at the Couchbase Mobile offerings. Then you’d be able to utilize Couchbase Lite (an embedded NoSQL database), and you’d be able to integrate Sync Gateway as well.

Hi @blimkemann, thanks for posting, can you create a bug ticket so we can get a fix into a release cycle?



1 Like

Jeff, I created a bug report. In the meantime, is there any way to work around this?

1 Like

@blimkemann -

Thanks for the bug report. Note that IOS is not a supported platform for the .NET SDK (CouchbaseNetClient) as its intended to be an application server (Web applications) component. Couchbase Mobile is intended for Internet devices or as @robert.hedgpeth mentioned using an API layer which the mobile device would use to access the Couchbase server.


1 Like

@jmorris, I am using Couchbase Mobile. In my situation, there is some data that I need to query before any sort of synchronization is started which is why I turned to the .net SDK. So you’re basically saying the best (only) way to do this is to create my own API endpopint using the .net SDK and call that from my iOS app?

The probem you’ll run into is that the client won’t scale to 1000’s of users if every installation on a device tries to connect directly to the server; exposing an API endpoint over HTTP will solve this.