installation of 1.thriftHttps://github.com/apache/thrift
The official installation is really too much trouble, I use the brew installation becomes very simple http://stackoverflow.com/questions/23455499/cant-install-thrift-on-mac-os-10-9-2 first sudo brew update again sudo brew install thrift after installation is complete, directly in
And the system will also add a link below the Usr/local/bin (because I have copied our own generated thrift command to the Usr/local/bin, so there will be a warning that I already have a link, ask me whether to overwrite, overwrite with the commandBrew link--overwrite Thrift)
Using this command, directly overwrite, generate a soft connection, to thrift
You can use Thrift-help to see the command first.
2. The most basic use of http://blog.csdn.net/blue_jjw/article/details/9147165Create a thrift file such as//idl.thriftstruct Message {1:string text, 2:string date}
Service Bulletinboard {void Add (1:message msg), list<message> get ()}
Then use the command thrift--gen Cocoa Idl.thrift to generate in the current directory
3. Use in the project, first of all the project must be added thrift framework AH (that is, from the official GitHub https://github.com/apache/thrift download the source code, and then find Lib/cocoa, copy it to your project, you can )
Using the thrift framework in Ios/mac