Greetings Everyone;
We just started using Backendless as a means for pub/sub which isn’t through RabbitMQ or Apache ActiveMQ and so far we have liked this, it has suited our needs on Android, Windows, Mac using Unity as our primary front-end means.
Using .NET 4.x as our scripting backend we tried running this on iOS however we get the following error. I suspect this has to do with Unity’s handling of C# → bytecode
BACKENDLESS LOG:try to subscribe RTSubscription{id=‘xxxxxxxxxxx-xxxx-xxxxx-xxxxxxxxxx’, callback=BackendlessAPI.RT.RTCallback
1[System.Object], subscriptionName=PUB_SUB_CONNECT, options=System.Collections.Generic.Dictionary
2[System.String,System.Object]}
BACKENDLESS LOG:Lookup failed Error code: Internal client exception, Message: Default constructor not found for type Weborb.V3Types.ErrMessage
I see a perfectly fine default constructor in the SDK code?
I was wondering if this is something known that I might be able to work around? Or would the suggestion be that I build the iOS-SDK on XCode and import the DLL’s that way for referencing?
Solved: Since this isn’t Stack Overflow, I will actually put how I solved this here. What was happening was what I suspected. IL2CPP was stripping out what it thought was unreachable code.
In order to get this working, create a “link.xml” file and put it somewhere in the Unity “Assets/” directory. Fill the contents with this
<linker>
<!--Preserve an entire assembly-->
<assembly fullname="Backendless" preserve="all"/>
<assembly fullname="EngineIoClientDotNet" preserve="all"/>
<assembly fullname="SocketIoClientDotNet" preserve="all"/>
</linker>
The .NET 4.5 library works on iOS ( at least for us )