I’ve generated the intf and ServerAccess files from a RODL and added reference to RemObjectsSDK.framework (Debug-iphonesimulator). However, upon building, I get lots of errors, e.g.
Value of type ‘DataProviderService_Proxy’ has no member '___message’
Value of type ‘DataProviderService_Proxy’ has no member ‘___clientChannel’
where DataProviderService is the service name.
I’ve tried using Swift 3.2 and 4.0 and I’m using Xcode 9.2.
Any ideas? Is there a compatibility issue? Do you have a basic hello world project I could try and build?
are you mixing beta and release, somehow? we recently changed from 2 to 3 underscores, it that’s only in he beta, and the beta library should match the generated code…
I’ve tried to use the latest beta (library and importer) and there are still conflict between the intf generated and the library.
The importer generates using 2 underscores and is therefore labelled deprecated, there is still inconsistancy with the underscores proceeding the localMessage and there is still the Date issue.
Hmm, the importer in the latest beta generates two underscores still? that should have been changed. i’ll review. The NSDate issue is not something i’m aware of, i’ll need to have a look at that tomorrow… Does it reproduce with any RODL that uses the DateTime type?
Found a couple places where this was missed, should be fixed for the next beta. (I assume for now you’re good with a manual search/replace as workaround, until we have a fixed build?
Ah, got it. this was fixed, but unfortunately the fix isn;'t active ion ROServiceImporter (fixed for the next beta). as a workaround, you can use the rodl2code command line tool; it uses the same codeine, but there the fix is active.
Thank you. I now have a usuable Intf file - well it builds at least.
Not sure what I doing wrong, and here’s where simple Swift client tutorials would be useful (I have failed to find any) but I’m ending up with an exception:
BinMessage: Invalid string length read from stream.
when calling a method that has inout parameters. Not sure whether this is due to some other code gen issue or whether I cam doing anything wrong.
var userId: Int32 = 0
var errorMessage: String! = ""
let request = service.dataProviderService.beginLogin("serial", "username", "password")
let result = service.dataProviderService.endLogin(request, &userId, &errorMessage)
Any suggestions or do you have any swift client examples to share?
can you post the codegen for the method in question, and how it is defined? it does sound like some mismatch - either codegen bug or client and server not using the exact same definition of the method (say because it changed). what platform is the server?
I’ve attached the RODL and Intf files. Server is .NET (only version 8.x) - this could well be the problem but over the years version compatibility has normally been quite good.
and see if that fixes the problem? I’ll investigate WHY this is missing, and if its a general Cocoa codeine problem or specific to the Swift one, tomorrow.
ErrorMessage is Out, not InOut, so this is correct (Apple Swift just does;t support true out-only params, thats why the method is declared as inout. so that’s fine. endLogin looks good too:
do you get the BinMessage: Invalid string length read from stream. on the server (ie reading the incoming message — which would propagate back to the client, but prefixed with “An exception occurred on the server:”) or on the client (ie reading the response message)?
Do you use CodeFirst or a RODL, server side? if the latter, can you send me the _Invk file for this service, as well, so I can compare that?
ok, so that seems to be reading the message that fails. If you set a breakpoint on the line ErrorMessage = ___localMessage.readUtf8String(withName: "ErrorMessage"), did the userID get read correctly hand have the right value?
The invoker code looks good and matches what I’d expect:
iOS client is all I have at the moment and all it consists of is a button calling code as posted previously. Tricky, to supply a server (.NET) as it’s already in production with Android/Windows Mobile clients.
Do you have a simple test server/client I can try and go back to basics with?