I would like to use Apache Thrift in my project. I tried to follow: https://wiki.apache.org/thrift/ThriftUsageObjectiveC but I faced surprisingly big amount of problems.
What I did is:
Downloaded the latest Thrift: 0.10.0
Created brand new Xcode project (I'm using Xcode 9.0.1)
I generated obj-c classes from example Thrift:
//idl.thrift
struct Message {
1: string text,
2: string date
}
service BulletinBoard {
void add(1: Message msg),
list<Message> get()
}
- I added Thrift src to project
Everything should works at this point but unfortunately I get swift compiler error. It looks like the latest Thrift does not support new swift. I tried to convert Thrift sources to the latest Swift, but without success. I keep getting following error:
I tried to fix it like it is presented here: Xcode 8 Beta - Convert to Current Swift Syntax Failed: Could not find test host but also without luck.
Have you any idea why conversion fails?