3

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:

  1. Downloaded the latest Thrift: 0.10.0

  2. Created brand new Xcode project (I'm using Xcode 9.0.1)

  3. 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()
}
  1. 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:

enter image description here

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?

JensG
  • 13,148
  • 4
  • 45
  • 55
Sayaki
  • 769
  • 14
  • 36

0 Answers0