-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gPRC swift protobuf easy installation + easy file generataions #1318
Changes from 2 commits
6d7bfc1
7a91688
6879295
fda519d
20b1719
7b70e43
90906bd
34cf0db
73a2c49
6903d78
23201c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -17,6 +17,17 @@ all four gRPC API styles (Unary, Server Streaming, Client Streaming, and | |||||
Bidirectional Streaming) and connections can be made either over secure (TLS) or | ||||||
insecure channels. | ||||||
|
||||||
|
||||||
## Homebrew (Easy Installation) | ||||||
1. Installing Swift-Protobuf : | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||||||
```bash | ||||||
$ brew install swift-protobuf | ||||||
``` | ||||||
2. Installing GRPC-Swift : | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||||||
```bash | ||||||
$ brew install grpc-swift | ||||||
``` | ||||||
|
||||||
## Versions | ||||||
|
||||||
gRPC Swift has recently been rewritten on top of [SwiftNIO][swift-nio] as | ||||||
|
@@ -133,6 +144,23 @@ the following line to your `Podfile`: | |||||
|
||||||
The plugins are available in the `Pods/gRPC-Swift-Plugins/` folder afterwards. | ||||||
|
||||||
|
||||||
### Easy Files Generation: | ||||||
|
||||||
When you have *.proto files in "Data/gRPC_Schema" in Xcode directory | ||||||
You can add Build Phase Script for automatic generation for swift fils *.pb.swift and *.grpc.swift files on the same directory "Data/gRPC_Schema" | ||||||
|
||||||
```bash | ||||||
cd "${SRCROOT}/${TARGET_NAME}/Data/gRPC_Schema" | ||||||
currentPath = "${SRCROOT}/${TARGET_NAME}/Data/gRPC_Schema" | ||||||
for i in $(ls | egrep '\.proto$'); | ||||||
do echo "$i"; | ||||||
protoc "$i" \ | ||||||
--swift_out=Visibility=Public:. \ | ||||||
--grpc-swift_out=Visibility=Public,Client=true,Server=false:.; | ||||||
|
||||||
done; | ||||||
``` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we should include this section: build phase scripts aren't an unknown feature and the script itself is fairly simple. It's also highly likely to be different for different folks (different paths to .proto files, different plugin options and so on). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok Great |
||||||
## Examples | ||||||
|
||||||
gRPC Swift has a number of tutorials and examples available. They are split | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is just another way of getting the plugins for protoc, could you move this into the "Getting the protoc plugins" section? I don't think it needs its own subsection either; it just needs a note to say that the plugins are available from homebrew and can be installed with
brew install grpc-swift
(swift-protobuf is installed as a dependency of grpc-swift)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok Sure
I will move it there "Getting the protoc plugins" section
Thanks