Build cross plaftorm library using C# and can support native iOS and Android development

Hassan Jamila 1 Reputation point
2021-11-16T08:33:04.1+00:00

Hello
Please I want to ask if it is possible to use C# to build a library, that can be used under all platforms such as Swift, Java, Node, ...
I searched a lot but founded that only Kotlin can support that
But the issue is that my company don't have any Kotlin developers and they want only to use one language which is C#

So is there any way to do that please ?

Developer technologies | C#
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2021-11-16T18:08:04.997+00:00

    it is possible, but much more work than Kotlin which ships with the interface tools. Kotlin runs on the java vm, which is old enough, that most platforms have bindings for it.

    You will need to pick an C# interface toolkit for each environment you want to support.

    for Swift most of the work has been for C# to call swift. mono had some binding libraries.
    for java google for the binding library of your choice. you will be using java to native and native to c#
    for node use edge.js: https://github.com/tjanczuk/edge

    note: unless you know C/C++ pretty well, its probably easier to learn Kotlin, but the story will probably get better for C# in the future.

    0 comments No comments

  2. Petrus 【KIM】 546 Reputation points
    2021-11-24T08:51:54.487+00:00
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.