# Generated Swift interface will not build

**URL:** https://talk.remobjects.com/t/generated-swift-interface-will-not-build/13893
**Category:** Remoting SDK
**Tags:** rosdk, swift, rodl
**Created:** [August 8, 2017, 9:47am UTC](https://talk.remobjects.com/t/generated-swift-interface-will-not-build/13893 "2017-08-08T09:47:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![marcantheunis](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@marcantheunis](https://talk.remobjects.com/u/marcantheunis)
#### Post date: [August 8, 2017, 9:47am UTC](https://talk.remobjects.com/t/generated-swift-interface-will-not-build/13893/1 "2017-08-08T09:47:31Z")

</div>

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,

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [August 8, 2017, 11:42am UTC](https://talk.remobjects.com/t/generated-swift-interface-will-not-build/13893/2 "2017-08-08T11:42:54Z")

</div>

Curious. those _should_ be compatible. Can you send me the RODL and the client sample project?

---

<div class="post-metadata">

### Author: ![marcantheunis](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@marcantheunis](https://talk.remobjects.com/u/marcantheunis)
#### Post date: [August 8, 2017, 11:55am UTC](https://talk.remobjects.com/t/generated-swift-interface-will-not-build/13893/3 "2017-08-08T11:55:21Z")

</div>

I’ll send you the project/RODL via dm.

Thanks
