Browse Source

Fix Echo example and improve instructions

Added header search path to the Echo example to allow it to build. Also
added instructions to run the script in the third party directory to
clone the swift-protobuf repo locally, which is required by the Echo
example but not mentioned. Also update the toplevel readme to make the
required make command explicit, and fix the name `swift-proto` to
`swift-protobuf`
Andy Chou 8 years ago
parent
commit
317482f1f0
4 changed files with 25 additions and 9 deletions
  1. 2 0
      .gitignore
  2. 2 0
      Examples/Echo/Xcode/Echo.xcodeproj/project.pbxproj
  3. 7 0
      Examples/README.md
  4. 14 9
      README.md

+ 2 - 0
.gitignore

@@ -1,3 +1,5 @@
 .DS_Store
 project.xcworkspace
 xcuserdata
+.build
+third_party/**

+ 2 - 0
Examples/Echo/Xcode/Echo.xcodeproj/project.pbxproj

@@ -457,6 +457,7 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = ../../../Sources/CgRPC/include;
 				MACOSX_DEPLOYMENT_TARGET = 10.11;
 				MTL_ENABLE_DEBUG_INFO = YES;
 				ONLY_ACTIVE_ARCH = YES;
@@ -501,6 +502,7 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = ../../../Sources/CgRPC/include;
 				MACOSX_DEPLOYMENT_TARGET = 10.11;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				SDKROOT = macosx;

+ 7 - 0
Examples/README.md

@@ -1,6 +1,13 @@
 
 # Examples
 
+To build the Xcode examples, make sure required third party libraries
+(specifically `swift-protobuf`) are retrieved by running the script in the
+`third_party` toplevel directory:
+
+    $ cd third_party
+    $ sh RUNME.sh
+
 ## Swift gRPC generated code examples
 
 [Echo](Echo)

+ 14 - 9
README.md

@@ -27,7 +27,7 @@ Swift Package Manager builds may also be made on Linux
 systems. Please see [DOCKER.md](DOCKER.md) and 
 [LINUX.md](LINUX.md) for details.
 
-## gRPC dependencies are vendored  
+## gRPC dependencies are vendored
 
 Swift gRPC now includes vendored copies of the gRPC core 
 library and **BoringSSL**, an OpenSSL fork that is used by
@@ -36,13 +36,18 @@ Manager builds.
 
 ## Building with Xcode
 
-The top-level Makefile uses the Swift Package Manager to generate
-an Xcode project for the SwiftGRPC package. Due to present limitations
-in Package Manager configuration, the libz dependency is not included 
-in the generated Xcode project. If you get build errors about missing
-symbols such as `_deflate`, `_deflateEnd`, etc., you can fix them by
-adding `libz.tbd` to the **Link Binary With Libraries** build step of 
-the **CgRPC** target.
+The top-level Makefile uses the Swift Package Manager to
+generate an Xcode project for the SwiftGRPC package:
+
+    $ make
+
+Then open `SwiftGRPC.xcodeproj` in Xcode. Due to present
+limitations in Package Manager configuration, the libz
+dependency is not included in the generated Xcode project. If
+you get build errors about missing symbols such as
+`_deflate`, `_deflateEnd`, etc., you can fix them by adding
+`libz.tbd` to the **Link Binary With Libraries** build step
+of the **CgRPC** target.
 
 ## Having build problems?
 
@@ -51,7 +56,7 @@ testing with the following versions:
 
 - Xcode 8.2 
 - Swift 3.0.2 
-- swift-proto 0.9.24 
+- swift-protobuf 0.9.24 
 
 ## License