Using the thrift framework in Ios/mac

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.