I’ve created a simply cross-platform static library by C# element on VS.NET 2015 RC version, the library build successfully and return three different types of static library(.a, .jar and .dll) on corresponding project folders.
I tried to import the .a & .h library into my Xcode Swift 1.2 project ,.jar into my Android studio project and .dll into my VS.Net 2015 project.
It is working fine on VS.Net 2015 project, but I got an error on Xcode and Android Studio projects due to the DateTime datatype cannot be reconciled, I think the problem is Java is using “Date” and Xcode is using “NSDate” as the data type
Below is my testing function using c# element VS 2015 RC version
Below is the open souroce for Sugar on GitHub, I guess the problem may be related to the following code doesn’t handle the mapping datetime for different platform. please help, thanks.
DateTime = public {$IF COOPER}record{$ELSEIF ECHOES}record mapped to System.DateTime{$ELSEIF NOUGAT}class{$ENDIF}
I got the following error message on Xcode when including the static library, the static library is generated by RemObjects C# under VS.NET 2015.
"error: unknown type name ‘DateTime’
Or you may find the library from my testing project under the following path:
…/DateTimeTesting\bin\Debug\iOS\libDateTimeTesting.a
…/DateTimeTesting\bin\Debug\iOS\DateTimeTesting.h
Could you please give me more info on that error. I tried to reproduce it for Android Studio and couldn’t. With referenced .jar I’m able to call the returnDateTime method and the project compiles fine. Though I added reference to sugar to be able to assign the result of method to any var.
Did you added the reference to sugar also (sugar.jar for Android).