Skip to content

Commit 8f9c7ff

Browse files
authored
Merge pull request #35 from acchou/master
Fix Echo example and improve instructions
2 parents ee457d8 + 317482f commit 8f9c7ff

File tree

4 files changed

+25
-9
lines changed

4 files changed

+25
-9
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.DS_Store
22
project.xcworkspace
33
xcuserdata
4+
.build
5+
third_party/**

Examples/Echo/Xcode/Echo.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@
457457
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
458458
GCC_WARN_UNUSED_FUNCTION = YES;
459459
GCC_WARN_UNUSED_VARIABLE = YES;
460+
HEADER_SEARCH_PATHS = ../../../Sources/CgRPC/include;
460461
MACOSX_DEPLOYMENT_TARGET = 10.11;
461462
MTL_ENABLE_DEBUG_INFO = YES;
462463
ONLY_ACTIVE_ARCH = YES;
@@ -501,6 +502,7 @@
501502
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
502503
GCC_WARN_UNUSED_FUNCTION = YES;
503504
GCC_WARN_UNUSED_VARIABLE = YES;
505+
HEADER_SEARCH_PATHS = ../../../Sources/CgRPC/include;
504506
MACOSX_DEPLOYMENT_TARGET = 10.11;
505507
MTL_ENABLE_DEBUG_INFO = NO;
506508
SDKROOT = macosx;

Examples/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11

22
# Examples
33

4+
To build the Xcode examples, make sure required third party libraries
5+
(specifically `swift-protobuf`) are retrieved by running the script in the
6+
`third_party` toplevel directory:
7+
8+
$ cd third_party
9+
$ sh RUNME.sh
10+
411
## Swift gRPC generated code examples
512

613
[Echo](Echo)

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Swift Package Manager builds may also be made on Linux
2727
systems. Please see [DOCKER.md](DOCKER.md) and
2828
[LINUX.md](LINUX.md) for details.
2929

30-
## gRPC dependencies are vendored
30+
## gRPC dependencies are vendored
3131

3232
Swift gRPC now includes vendored copies of the gRPC core
3333
library and **BoringSSL**, an OpenSSL fork that is used by
@@ -36,13 +36,18 @@ Manager builds.
3636

3737
## Building with Xcode
3838

39-
The top-level Makefile uses the Swift Package Manager to generate
40-
an Xcode project for the SwiftGRPC package. Due to present limitations
41-
in Package Manager configuration, the libz dependency is not included
42-
in the generated Xcode project. If you get build errors about missing
43-
symbols such as `_deflate`, `_deflateEnd`, etc., you can fix them by
44-
adding `libz.tbd` to the **Link Binary With Libraries** build step of
45-
the **CgRPC** target.
39+
The top-level Makefile uses the Swift Package Manager to
40+
generate an Xcode project for the SwiftGRPC package:
41+
42+
$ make
43+
44+
Then open `SwiftGRPC.xcodeproj` in Xcode. Due to present
45+
limitations in Package Manager configuration, the libz
46+
dependency is not included in the generated Xcode project. If
47+
you get build errors about missing symbols such as
48+
`_deflate`, `_deflateEnd`, etc., you can fix them by adding
49+
`libz.tbd` to the **Link Binary With Libraries** build step
50+
of the **CgRPC** target.
4651

4752
## Having build problems?
4853

@@ -51,7 +56,7 @@ testing with the following versions:
5156

5257
- Xcode 8.2
5358
- Swift 3.0.2
54-
- swift-proto 0.9.24
59+
- swift-protobuf 0.9.24
5560

5661
## License
5762

0 commit comments

Comments
 (0)