Why use different programming languages on different platforms?

Hi

I was wondering if it is possible to use the C API on all mobile platforms.
Unfortunately I couldn’t find a definite answer to that question.

From my point of view, it should be possible to use the same C/C++ code on Android/IOS/Windows/…
That way I would only have to maintain one code base for my apps. By using Qt for the UI, this would also be true for the front-end code.

Is the C library on all mobile platforms officially supported?
Has anyone tried to create an app with a single C/C++ code base?

Thanks for your time!

There is no C API. (Maybe you’re thinking of the Couchbase Server C SDK? That’s a different thing entirely.)

I was thinking of libcouchbase. (to use it for mobile applications)

Nope, that’s for Couchbase Server. Totally different protocol, very different API. Sorry!

Oh, OK.
Thanks for the clarification!

So the only way to be platform-independent is by using the REST API, right?

If you use the .NET (C#) CBL implementation with the Xamarin runtime, your code can run on Android and iOS, as well as Windows and (I believe) Mac OS X. And you’d probably want to also use the Xamarin Forms framework, otherwise you’d have to write different GUI code for each platform.