Sample project for client/server in Swift with Protocol Buffers
See also this sample app using URLSession
for api call
APIClient uses APIKit with swift-protobuf
Web framework, Kitura provides HTTP server with swift-protobuf
Swift 3.0.1
Xcode 8.2.1
protoc 3.1
swift-protobuf 0.9.26
Kitura 1.3
APIKit 3.1.0
Follow this instruction
Generate Swift output then
$ cd protos
$ protoc --swift_out=. *.proto
$ cd Server
$ swift build
$ ./.build/debug/Server
Generate xcode project if needed
$ swift package generate-xcodeproj
$ cd Client
$ carthage update
Open and Run Client.xcodeproj
Markdown
$ cd protos
$ protoc --doc_out=markdown,docs.md:. protos/*.proto
Install protoc-gen-doc
in case you don't have it
$ brew install qt5
$ brew link --force qt5
$ git clone https://github.com/estan/protoc-gen-doc.git
$ cd protoc-gen-doc
$ PROTOBUF_PREFIX=/usr/local/Cellar/protobuf/3.1.0 qmake
$ make && make install
https://developer.ibm.com/swift/2016/09/30/protocol-buffers-with-kitura/ https://github.com/KyoheiG3/ProtobufExample