Skip to content

Commit

Permalink
[ADD] Adding Easy File Generations Using Build Phase Script
Browse files Browse the repository at this point in the history
  • Loading branch information
El-Moatasem committed Nov 24, 2021
1 parent 6d7bfc1 commit 7a91688
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,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;
```
## Examples

gRPC Swift has a number of tutorials and examples available. They are split
Expand Down

0 comments on commit 7a91688

Please sign in to comment.