From version < 25.1 >
edited by Sylvain Berfini
on 2020/01/30 14:19
To version < 26.1
edited by Sylvain Berfini
on 2020/03/05 13:05
<
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -4,21 +4,17 @@
4 4  
5 5  We provide a C# wrapper for LibLinphone that can be used in a Xamarin project.
6 6  
7 +
7 7  = Generating the C# wrapper =
8 8  
9 -The C# wrapper is automatically generated from the documentation in the code (like the Python/C++ wrappers) which is created when Linphone is compiled.
10 +To generate the C# wrapper, you have to compile [[linphone-sdk>>https://gitlab.linphone.org/BC/public/linphone-sdk]] (follow README options) and add the following parameter to the cmake options:
10 10  
11 -So to generate the C# wrapper, you must first compile Linphone successfuly. Once you did it, go into the wrappers/csharp/ directory of the linphone repository, and execute the following command:
12 -
13 13  {{code}}
14 -python genwrapper.py $LINPHONE_PATH/coreapi/help/doc/xml/
13 +-DENABLE_CSHARP_WRAPPER=ON
15 15  {{/code}}
16 16  
17 -The output of is one file named LinphoneWrapper.cs that contains everything. Depending on your project structure, you must copy it to the right place (you can use genwrapper's -o argument to create the file directly at the right place):
16 += =
18 18  
19 -* If you use a Native Portable project (using Portable Class Library, PCL), LinphoneWrapper.cs can't go in it because DllImport ins't supported. This means you have to copy LinphoneWrapper.cs in each one of your target Projects (for example LinphoneXamarin.Droid, LinphoneXamarin.iOS, etc...) ;
20 -* If you use a Native Shared project, LinphoneWrapper.cs can go in the shared project as long as each target project references the shared one.
21 -
22 22  = What about Xamarin ? =
23 23  
24 24  The C# wrapper has been implemented to enable the development of a Xamarin app based on LibLinphone.