Hi,
When importing a swift interface file in Xcode, generated from a RODL, I am getting a lot of build errors of the following kinds:
- Cannot convert value of type ‘NSData!’ to expected argument type ‘Data?’
- Cannot convert value of type ‘NSDate!’ to expected argument type ‘Date?’
- Cannot assign value of type ‘Date?’ to type ‘NSDate!’
- …
The errors are all about the DateTime
or Binary
field defined in the RODL.
There is also another issue when using the HttpAPI:
- Nil is not compatible with expected argument of type ‘Any’
For example in this piece of code:
public func LoginPatient(_ patient: P_WebshopPatient!, _ pharmId: String!) -> String! {
var __result: String!
let __localMessage: ROMessage! = (self.__message.copy() as! ROMessage)
__localMessage.setupAttributes(DictionaryFromNameValueList(false, "httpapipath", "/login", "httpapimethod", "POST", "httpapiresult", "200", "httpapitags", "Login", nil))
...
But I wont’t be using this in the iOS project so this is not really an issue for me at the moment.
Is there a known workaround for this? The automated ‘Fix-it’ proposed by Xcode does fix some issues, but is having difficulties with fixing all of them.
Kind regards,