lundi 2 mars 2015

Write core logic targeting Windows and iOS


We are trying to write some core business logic so that we can use the same code on both Windows and iOS.


The core business logic is not complicated but it would require a reasonable number of functions and passing data in both directions in structures.


Our initial thoughts were to use C as C can quite easily be used with Objective C on iOS.


On Windows we have been able to compile C code but the difficulty is in accessing this C code in C#. Every C function or structure has to be imported using DllImport and structures have to be marshalled each way.


We could possibly use C++ but this appears to have the same issues of unsafe code being used with C#.


Is there another way or would persisting with C and C# be the best approach.


Note: We are probably not interested in using a cross platform development system like Xamarin and would prefer a low level standards based solution.




Aucun commentaire:

Enregistrer un commentaire