一 grpc 的简介(可参考谷歌http://www.grpc.io/)
1.配置可参考http://www.grpc.io/docs/quickstart/objective-c.html
配置要求:
cocoaPods: Version 1.0 or Higher 查看版本 pod --Version
Xcode
: version 7.2 or higher :installed:sh [sudo] xcode-select --instal
Install with Homebrewsh brew install autoconf automake libtool pkg-config
2.配置好这些内容就去下载官网demo
下载:
$git clone https://github.com/grpc/grpc.git
Install gRPC plugins and libraries:
$cd grpc
$git submodule update--init
$make
$[sudo]make install
Install protoc compiler:
$brew tap grpc/grpc
$brew install google-protobuf
Run the server:
$cd examples/cpp/helloworld
$make
$./greeter_server&
Run the client:
$cd../../objective-c/helloworld
$pod install
Run the client app:
$ openHelloWorld.xcworkspace
3.以上是官网的demo,以下是自己的操作
(1)创建Xcode你的工程。创建.podspec 和 Podfile
$ pod spec create iOS_Demo
这样创建