From 63256a7c5efe774270311b3088331f3865975b3e Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Tue, 6 Oct 2015 15:26:41 -0700 Subject: [PATCH 01/14] Fix #2275 (Make sure PHP example can be run with Apache) Normal constants, like most other things, are cleaned up during RSHUTDOWN. We need to explicitly mark them as persistent using CONST_PERSISTENT --- src/php/ext/grpc/php_grpc.c | 111 +++++++++++++++++++++++------------- 1 file changed, 70 insertions(+), 41 deletions(-) diff --git a/src/php/ext/grpc/php_grpc.c b/src/php/ext/grpc/php_grpc.c index 0f730ea7567..4ad78ea0a31 100644 --- a/src/php/ext/grpc/php_grpc.c +++ b/src/php/ext/grpc/php_grpc.c @@ -109,91 +109,120 @@ PHP_MINIT_FUNCTION(grpc) { */ /* Register call error constants */ grpc_init(); - REGISTER_LONG_CONSTANT("Grpc\\CALL_OK", GRPC_CALL_OK, CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR", GRPC_CALL_ERROR, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\CALL_OK", GRPC_CALL_OK, + CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR", GRPC_CALL_ERROR, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_NOT_ON_SERVER", - GRPC_CALL_ERROR_NOT_ON_SERVER, CONST_CS); + GRPC_CALL_ERROR_NOT_ON_SERVER, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_NOT_ON_CLIENT", - GRPC_CALL_ERROR_NOT_ON_CLIENT, CONST_CS); + GRPC_CALL_ERROR_NOT_ON_CLIENT, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_ALREADY_INVOKED", - GRPC_CALL_ERROR_ALREADY_INVOKED, CONST_CS); + GRPC_CALL_ERROR_ALREADY_INVOKED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_NOT_INVOKED", - GRPC_CALL_ERROR_NOT_INVOKED, CONST_CS); + GRPC_CALL_ERROR_NOT_INVOKED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_ALREADY_FINISHED", - GRPC_CALL_ERROR_ALREADY_FINISHED, CONST_CS); + GRPC_CALL_ERROR_ALREADY_FINISHED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_TOO_MANY_OPERATIONS", - GRPC_CALL_ERROR_TOO_MANY_OPERATIONS, CONST_CS); + GRPC_CALL_ERROR_TOO_MANY_OPERATIONS, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_INVALID_FLAGS", - GRPC_CALL_ERROR_INVALID_FLAGS, CONST_CS); + GRPC_CALL_ERROR_INVALID_FLAGS, + CONST_CS | CONST_PERSISTENT); /* Register flag constants */ REGISTER_LONG_CONSTANT("Grpc\\WRITE_BUFFER_HINT", GRPC_WRITE_BUFFER_HINT, - CONST_CS); + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\WRITE_NO_COMPRESS", GRPC_WRITE_NO_COMPRESS, - CONST_CS); + CONST_CS | CONST_PERSISTENT); /* Register status constants */ - REGISTER_LONG_CONSTANT("Grpc\\STATUS_OK", GRPC_STATUS_OK, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_OK", GRPC_STATUS_OK, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_CANCELLED", GRPC_STATUS_CANCELLED, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNKNOWN", GRPC_STATUS_UNKNOWN, CONST_CS); + CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNKNOWN", GRPC_STATUS_UNKNOWN, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_INVALID_ARGUMENT", - GRPC_STATUS_INVALID_ARGUMENT, CONST_CS); + GRPC_STATUS_INVALID_ARGUMENT, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_DEADLINE_EXCEEDED", - GRPC_STATUS_DEADLINE_EXCEEDED, CONST_CS); + GRPC_STATUS_DEADLINE_EXCEEDED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_NOT_FOUND", GRPC_STATUS_NOT_FOUND, - CONST_CS); + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_ALREADY_EXISTS", - GRPC_STATUS_ALREADY_EXISTS, CONST_CS); + GRPC_STATUS_ALREADY_EXISTS, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_PERMISSION_DENIED", - GRPC_STATUS_PERMISSION_DENIED, CONST_CS); + GRPC_STATUS_PERMISSION_DENIED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNAUTHENTICATED", - GRPC_STATUS_UNAUTHENTICATED, CONST_CS); + GRPC_STATUS_UNAUTHENTICATED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_RESOURCE_EXHAUSTED", - GRPC_STATUS_RESOURCE_EXHAUSTED, CONST_CS); + GRPC_STATUS_RESOURCE_EXHAUSTED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_FAILED_PRECONDITION", - GRPC_STATUS_FAILED_PRECONDITION, CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_ABORTED", GRPC_STATUS_ABORTED, CONST_CS); + GRPC_STATUS_FAILED_PRECONDITION, + CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_ABORTED", GRPC_STATUS_ABORTED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_OUT_OF_RANGE", GRPC_STATUS_OUT_OF_RANGE, - CONST_CS); + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNIMPLEMENTED", - GRPC_STATUS_UNIMPLEMENTED, CONST_CS); + GRPC_STATUS_UNIMPLEMENTED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_INTERNAL", GRPC_STATUS_INTERNAL, - CONST_CS); + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNAVAILABLE", GRPC_STATUS_UNAVAILABLE, - CONST_CS); + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_DATA_LOSS", GRPC_STATUS_DATA_LOSS, - CONST_CS); + CONST_CS | CONST_PERSISTENT); /* Register op type constants */ REGISTER_LONG_CONSTANT("Grpc\\OP_SEND_INITIAL_METADATA", - GRPC_OP_SEND_INITIAL_METADATA, CONST_CS); + GRPC_OP_SEND_INITIAL_METADATA, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\OP_SEND_MESSAGE", - GRPC_OP_SEND_MESSAGE, CONST_CS); + GRPC_OP_SEND_MESSAGE, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\OP_SEND_CLOSE_FROM_CLIENT", - GRPC_OP_SEND_CLOSE_FROM_CLIENT, CONST_CS); + GRPC_OP_SEND_CLOSE_FROM_CLIENT, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\OP_SEND_STATUS_FROM_SERVER", - GRPC_OP_SEND_STATUS_FROM_SERVER, CONST_CS); + GRPC_OP_SEND_STATUS_FROM_SERVER, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\OP_RECV_INITIAL_METADATA", - GRPC_OP_RECV_INITIAL_METADATA, CONST_CS); + GRPC_OP_RECV_INITIAL_METADATA, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\OP_RECV_MESSAGE", - GRPC_OP_RECV_MESSAGE, CONST_CS); + GRPC_OP_RECV_MESSAGE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\OP_RECV_STATUS_ON_CLIENT", - GRPC_OP_RECV_STATUS_ON_CLIENT, CONST_CS); + GRPC_OP_RECV_STATUS_ON_CLIENT, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\OP_RECV_CLOSE_ON_SERVER", - GRPC_OP_RECV_CLOSE_ON_SERVER, CONST_CS); + GRPC_OP_RECV_CLOSE_ON_SERVER, + CONST_CS | CONST_PERSISTENT); /* Register connectivity state constants */ REGISTER_LONG_CONSTANT("Grpc\\CHANNEL_IDLE", - GRPC_CHANNEL_IDLE, CONST_CS); + GRPC_CHANNEL_IDLE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CHANNEL_CONNECTING", - GRPC_CHANNEL_CONNECTING, CONST_CS); + GRPC_CHANNEL_CONNECTING, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CHANNEL_READY", - GRPC_CHANNEL_READY, CONST_CS); + GRPC_CHANNEL_READY, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CHANNEL_TRANSIENT_FAILURE", - GRPC_CHANNEL_TRANSIENT_FAILURE, CONST_CS); + GRPC_CHANNEL_TRANSIENT_FAILURE, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CHANNEL_FATAL_FAILURE", - GRPC_CHANNEL_FATAL_FAILURE, CONST_CS); + GRPC_CHANNEL_FATAL_FAILURE, + CONST_CS | CONST_PERSISTENT); grpc_init_call(TSRMLS_C); grpc_init_channel(TSRMLS_C); From abf36b1539080cd6aac6cab876481211c2ab3afd Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 8 Oct 2015 10:05:32 -0700 Subject: [PATCH 02/14] backport part of #3543 shebang fix to release-0_11 branch --- tools/jenkins/run_jenkins.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/jenkins/run_jenkins.sh b/tools/jenkins/run_jenkins.sh index 0f15835ea88..01c25cbe15d 100755 --- a/tools/jenkins/run_jenkins.sh +++ b/tools/jenkins/run_jenkins.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # Copyright 2015, Google Inc. # All rights reserved. # @@ -31,8 +31,6 @@ # This script is invoked by Jenkins and triggers a test run based on # env variable settings. # -# Bootstrap into bash -[ -z $1 ] && exec bash $0 bootstrapped # Setting up rvm environment BEFORE we set -ex. [[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh # To prevent cygwin bash complaining about empty lines ending with \r From ea1372ce7c4d9a8169c1d04a9bda985b57f32703 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 7 Oct 2015 13:42:10 -0700 Subject: [PATCH 03/14] php: update package.xml to prepare for 0.6.1 release --- src/php/ext/grpc/package.xml | 30 ++++++++++++++++++++---------- src/php/ext/grpc/php_grpc.c | 17 +++++++++++------ 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/src/php/ext/grpc/package.xml b/src/php/ext/grpc/package.xml index f41902f041e..921cfc6ae68 100644 --- a/src/php/ext/grpc/package.xml +++ b/src/php/ext/grpc/package.xml @@ -10,10 +10,10 @@ grpc-packages@google.com yes - 2015-09-24 - + 2015-10-07 + - 0.6.0 + 0.6.1 0.6.0 @@ -22,12 +22,7 @@ BSD -- support per message compression disable -- expose per-call host override option -- expose connectivity API -- expose channel target and call peer -- add user-agent -- update to wrap gRPC C core library beta version 0.11.0 +- fixed undefined constant fatal error when run with apache/nginx #2275 @@ -44,7 +39,7 @@ - + @@ -118,5 +113,20 @@ Update to wrap gRPC C Core version 0.10.0 - update to wrap gRPC C core library beta version 0.11.0 + + + 0.6.1 + 0.6.0 + + + beta + beta + + 2015-10-07 + BSD + +- fixed undefined constant fatal error when run with apache/nginx #2275 + + diff --git a/src/php/ext/grpc/php_grpc.c b/src/php/ext/grpc/php_grpc.c index 4ad78ea0a31..fcd94a63062 100644 --- a/src/php/ext/grpc/php_grpc.c +++ b/src/php/ext/grpc/php_grpc.c @@ -150,7 +150,7 @@ PHP_MINIT_FUNCTION(grpc) { CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_INVALID_ARGUMENT", GRPC_STATUS_INVALID_ARGUMENT, - CONST_CS | CONST_PERSISTENT); + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_DEADLINE_EXCEEDED", GRPC_STATUS_DEADLINE_EXCEEDED, CONST_CS | CONST_PERSISTENT); @@ -173,7 +173,8 @@ PHP_MINIT_FUNCTION(grpc) { CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_ABORTED", GRPC_STATUS_ABORTED, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_OUT_OF_RANGE", GRPC_STATUS_OUT_OF_RANGE, + REGISTER_LONG_CONSTANT("Grpc\\STATUS_OUT_OF_RANGE", + GRPC_STATUS_OUT_OF_RANGE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNIMPLEMENTED", GRPC_STATUS_UNIMPLEMENTED, @@ -202,7 +203,8 @@ PHP_MINIT_FUNCTION(grpc) { GRPC_OP_RECV_INITIAL_METADATA, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\OP_RECV_MESSAGE", - GRPC_OP_RECV_MESSAGE, CONST_CS | CONST_PERSISTENT); + GRPC_OP_RECV_MESSAGE, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\OP_RECV_STATUS_ON_CLIENT", GRPC_OP_RECV_STATUS_ON_CLIENT, CONST_CS | CONST_PERSISTENT); @@ -212,11 +214,14 @@ PHP_MINIT_FUNCTION(grpc) { /* Register connectivity state constants */ REGISTER_LONG_CONSTANT("Grpc\\CHANNEL_IDLE", - GRPC_CHANNEL_IDLE, CONST_CS | CONST_PERSISTENT); + GRPC_CHANNEL_IDLE, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CHANNEL_CONNECTING", - GRPC_CHANNEL_CONNECTING, CONST_CS | CONST_PERSISTENT); + GRPC_CHANNEL_CONNECTING, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CHANNEL_READY", - GRPC_CHANNEL_READY, CONST_CS | CONST_PERSISTENT); + GRPC_CHANNEL_READY, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CHANNEL_TRANSIENT_FAILURE", GRPC_CHANNEL_TRANSIENT_FAILURE, CONST_CS | CONST_PERSISTENT); From 687bef6cb0df50ce58274cb0f7f94540fe8e024e Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 8 Oct 2015 08:09:55 -0700 Subject: [PATCH 04/14] remove a few more linuxbrew references --- examples/php/README.md | 3 +-- src/objective-c/README.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/php/README.md b/examples/php/README.md index a4ee8e698b9..8fb060863a3 100644 --- a/examples/php/README.md +++ b/examples/php/README.md @@ -8,7 +8,7 @@ This requires PHP 5.5 or greater. INSTALL ------- - - On Mac OS X, install [homebrew][]. On Linux, install [linuxbrew][]. Run the following command to install gRPC. + - On Mac OS X, install [homebrew][]. Run the following command to install gRPC. ```sh $ curl -fsSL https://goo.gl/getgrpc | bash -s php @@ -59,7 +59,6 @@ TUTORIAL You can find a more detailed tutorial in [gRPC Basics: PHP][] [homebrew]:http://brew.sh -[linuxbrew]:https://github.com/Homebrew/linuxbrew#installation [gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install [Node]:https://github.com/grpc/grpc/tree/master/examples/node [gRPC Basics: PHP]:http://www.grpc.io/docs/tutorials/basic/php.html diff --git a/src/objective-c/README.md b/src/objective-c/README.md index 6c27657def0..1851657a000 100644 --- a/src/objective-c/README.md +++ b/src/objective-c/README.md @@ -17,7 +17,7 @@ services. ## Install protoc with the gRPC plugin -On Mac OS X, install [homebrew][]. On Linux, install [linuxbrew][]. +On Mac OS X, install [homebrew][]. Run the following command to install _protoc_ and the gRPC _protoc_ plugin: ```sh @@ -168,7 +168,6 @@ Objective-C Protobuf runtime library. [Protocol Buffers]:https://developers.google.com/protocol-buffers/ [homebrew]:http://brew.sh -[linuxbrew]:https://github.com/Homebrew/linuxbrew [gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install [example Podfile]:https://github.com/grpc/grpc/blob/master/src/objective-c/examples/Sample/Podfile [sample app]: https://github.com/grpc/grpc/tree/master/src/objective-c/examples/Sample From 5354d5536caea5a41f18f3705fa93ef2d8df327e Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Sun, 11 Oct 2015 13:37:13 -0700 Subject: [PATCH 05/14] Pod install in the example project --- .../HelloWorld.xcodeproj/project.pbxproj | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/examples/objective-c/helloworld/HelloWorld.xcodeproj/project.pbxproj b/examples/objective-c/helloworld/HelloWorld.xcodeproj/project.pbxproj index 702ad3ff8b2..cd5d249cdcc 100644 --- a/examples/objective-c/helloworld/HelloWorld.xcodeproj/project.pbxproj +++ b/examples/objective-c/helloworld/HelloWorld.xcodeproj/project.pbxproj @@ -110,6 +110,7 @@ 5E36905D1B2A23800040F884 /* Frameworks */, 5E36905E1B2A23800040F884 /* Resources */, 4C7D815378D98AB3BFC1A7D5 /* Copy Pods Resources */, + BB76529986A8BFAF19A385B1 /* Embed Pods Frameworks */, ); buildRules = ( ); @@ -195,6 +196,21 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; + BB76529986A8BFAF19A385B1 /* Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ From 9544ce73c356fd3a7c93eff237cabac691e2af0b Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Sun, 11 Oct 2015 13:51:17 -0700 Subject: [PATCH 06/14] pod install project --- .../helloworld/HelloWorld.xcodeproj/project.pbxproj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/objective-c/helloworld/HelloWorld.xcodeproj/project.pbxproj b/examples/objective-c/helloworld/HelloWorld.xcodeproj/project.pbxproj index cd5d249cdcc..250f009996f 100644 --- a/examples/objective-c/helloworld/HelloWorld.xcodeproj/project.pbxproj +++ b/examples/objective-c/helloworld/HelloWorld.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 3EF35C14BDC2B65E21837F02 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 43AB08B32839A6700EA00DD4 /* libPods.a */; }; 5E3690661B2A23800040F884 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3690651B2A23800040F884 /* main.m */; }; 5E3690691B2A23800040F884 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3690681B2A23800040F884 /* AppDelegate.m */; }; 5E36906C1B2A23800040F884 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E36906B1B2A23800040F884 /* ViewController.m */; }; @@ -17,6 +18,7 @@ /* Begin PBXFileReference section */ 0C432EF610DB15C0F47A66BB /* Pods-HelloWorld.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld.release.xcconfig"; path = "Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld.release.xcconfig"; sourceTree = ""; }; + 43AB08B32839A6700EA00DD4 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 5E3690601B2A23800040F884 /* HelloWorld.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorld.app; sourceTree = BUILT_PRODUCTS_DIR; }; 5E3690641B2A23800040F884 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5E3690651B2A23800040F884 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -35,6 +37,7 @@ buildActionMask = 2147483647; files = ( EF61CF6AE2536A31D47F0E63 /* libPods-HelloWorld.a in Frameworks */, + 3EF35C14BDC2B65E21837F02 /* libPods.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -85,6 +88,7 @@ isa = PBXGroup; children = ( 6B4E1F55F8A2EC95A0E7EE88 /* libPods-HelloWorld.a */, + 43AB08B32839A6700EA00DD4 /* libPods.a */, ); name = Frameworks; sourceTree = ""; @@ -208,7 +212,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ From dfe91b547162f1cbedf13a780d9aaff439ac7137 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Sun, 11 Oct 2015 13:51:07 -0700 Subject: [PATCH 07/14] Fix example pod files --- examples/objective-c/helloworld/HelloWorld.podspec | 10 +++++----- examples/objective-c/helloworld/Podfile | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/objective-c/helloworld/HelloWorld.podspec b/examples/objective-c/helloworld/HelloWorld.podspec index ae009a688c6..600898f976e 100644 --- a/examples/objective-c/helloworld/HelloWorld.podspec +++ b/examples/objective-c/helloworld/HelloWorld.podspec @@ -3,13 +3,13 @@ Pod::Spec.new do |s| s.version = "0.0.1" s.license = "New BSD" - s.ios.deployment_target = "6.0" - s.osx.deployment_target = "10.8" + s.ios.deployment_target = "7.1" + s.osx.deployment_target = "10.9" # Base directory where the .proto files are. src = "../../protos" - # Directory where the generated files will be place. + # Directory where the generated files will be placed. dir = "Pods/" + s.name # Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients. @@ -22,14 +22,14 @@ Pod::Spec.new do |s| ms.source_files = "#{dir}/*.pbobjc.{h,m}", "#{dir}/**/*.pbobjc.{h,m}" ms.header_mappings_dir = dir ms.requires_arc = false - ms.dependency "Protobuf", "~> 3.0.0-alpha-3" + ms.dependency "Protobuf", "~> 3.0.0-alpha-4" end s.subspec "Services" do |ss| ss.source_files = "#{dir}/*.pbrpc.{h,m}", "#{dir}/**/*.pbrpc.{h,m}" ss.header_mappings_dir = dir ss.requires_arc = true - ss.dependency "gRPC", "~> 0.6" + ss.dependency "gRPC", "~> 0.11" ss.dependency "#{s.name}/Messages" end end diff --git a/examples/objective-c/helloworld/Podfile b/examples/objective-c/helloworld/Podfile index 2934ebc2c8a..16af075a9fa 100644 --- a/examples/objective-c/helloworld/Podfile +++ b/examples/objective-c/helloworld/Podfile @@ -1,6 +1,9 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' +pod 'Protobuf', :path => "../../../third_party/protobuf" +pod 'gRPC', :path => "../../.." + target 'HelloWorld' do # Depend on the generated HelloWorld library. pod 'HelloWorld', :path => '.' From 2fe0dcd06bdb6d76a3ff2a0b0f9b6d5e2e6a0a05 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Sun, 11 Oct 2015 13:53:49 -0700 Subject: [PATCH 08/14] Fix example to Beta version --- examples/objective-c/helloworld/main.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/objective-c/helloworld/main.m b/examples/objective-c/helloworld/main.m index 458580be302..a62f8362a22 100644 --- a/examples/objective-c/helloworld/main.m +++ b/examples/objective-c/helloworld/main.m @@ -34,18 +34,24 @@ #import #import "AppDelegate.h" +#import #import -static NSString * const kHostAddress = @"http://localhost:50051"; +static NSString * const kHostAddress = @"localhost:50051"; int main(int argc, char * argv[]) { @autoreleasepool { + [GRPCCall useInsecureConnectionsForHost:kHostAddress]; + HLWGreeter *client = [[HLWGreeter alloc] initWithHost:kHostAddress]; + HLWHelloRequest *request = [HLWHelloRequest message]; request.name = @"Objective-C"; + [client sayHelloWithRequest:request handler:^(HLWHelloReply *response, NSError *error) { NSLog(@"%@", response.message); }]; + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } } From 740a1cc7c34e4e750cfd6b9dfaca30a6f90c8123 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Sun, 11 Oct 2015 13:37:40 -0700 Subject: [PATCH 09/14] Git ignore XCode derived files across the repo --- .gitignore | 19 +++++++++++++++++++ src/objective-c/.gitignore | 19 ------------------- 2 files changed, 19 insertions(+), 19 deletions(-) delete mode 100644 src/objective-c/.gitignore diff --git a/.gitignore b/.gitignore index 45f8fdaa46f..6006619fcbc 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,22 @@ report.xml # port server log portlog.txt + +# Xcode +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +*.DS_Store diff --git a/src/objective-c/.gitignore b/src/objective-c/.gitignore deleted file mode 100644 index 15110668007..00000000000 --- a/src/objective-c/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate -*.DS_Store \ No newline at end of file From 9b81d9945e80b33815f68499c9809ab934b2a687 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Mon, 12 Oct 2015 19:31:25 -0700 Subject: [PATCH 10/14] =?UTF-8?q?Undo=20Cocoapods=E2=80=99=20bug=20workaro?= =?UTF-8?q?und?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gRPC.podspec | 37 ++++--------------- templates/gRPC.podspec.template | 63 ++++++++++----------------------- 2 files changed, 25 insertions(+), 75 deletions(-) diff --git a/gRPC.podspec b/gRPC.podspec index 69c370e2c0c..a9d544d9263 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -36,7 +36,7 @@ Pod::Spec.new do |s| s.name = 'gRPC' - version = '0.11.1' + version = '0.11.2' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'http://www.grpc.io' @@ -46,6 +46,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/grpc/grpc.git', :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}" } + s.ios.deployment_target = '7.1' s.osx.deployment_target = '10.9' s.requires_arc = true @@ -66,7 +67,7 @@ Pod::Spec.new do |s| 'src/core/support/file.h', 'src/core/support/murmur_hash.h', 'src/core/support/stack_lockfree.h', - 'src/core/support/grpc_string.h', + 'src/core/support/string.h', 'src/core/support/string_win32.h', 'src/core/support/thd_internal.h', 'src/core/support/time_precise.h', @@ -91,7 +92,7 @@ Pod::Spec.new do |s| 'grpc/support/sync_posix.h', 'grpc/support/sync_win32.h', 'grpc/support/thd.h', - 'grpc/support/grpc_time.h', + 'grpc/support/time.h', 'grpc/support/tls.h', 'grpc/support/tls_gcc.h', 'grpc/support/tls_msvc.h', @@ -535,34 +536,10 @@ Pod::Spec.new do |s| # ss.compiler_flags = '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w' end - # This is a workaround for Cocoapods Issue #1437. - # It renames time.h and string.h to grpc_time.h and grpc_string.h. - # It needs to be here (top-level) instead of in the C-Core subspec because Cocoapods doesn't run + # Move contents of include/ up a level to avoid manually specifying include paths. + # This needs to be here (top-level) instead of in the C-Core subspec because Cocoapods doesn't run # prepare_command's of subspecs. - # - # TODO(jcanizales): Try out others' solutions at Issue #1437. - s.prepare_command = <<-CMD - # Move contents of include up a level to avoid manually specifying include paths - cp -r "include/grpc" "." - - DIR_TIME="grpc/support" - BAD_TIME="$DIR_TIME/time.h" - GOOD_TIME="$DIR_TIME/grpc_time.h" - grep -rl "$BAD_TIME" grpc src/core src/objective-c/GRPCClient | xargs sed -i '' -e s@$BAD_TIME@$GOOD_TIME@g - if [ -f "$BAD_TIME" ]; - then - mv -f "$BAD_TIME" "$GOOD_TIME" - fi - - DIR_STRING="src/core/support" - BAD_STRING="$DIR_STRING/string.h" - GOOD_STRING="$DIR_STRING/grpc_string.h" - grep -rl "$BAD_STRING" grpc src/core src/objective-c/GRPCClient | xargs sed -i '' -e s@$BAD_STRING@$GOOD_STRING@g - if [ -f "$BAD_STRING" ]; - then - mv -f "$BAD_STRING" "$GOOD_STRING" - fi - CMD + s.prepare_command = 'cp -r "include/grpc" "."' # Objective-C wrapper around the core gRPC library. s.subspec 'GRPCClient' do |ss| diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index d1b55adabf9..c0887783e2c 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -5,7 +5,7 @@ # Please look at the templates directory instead. # This file can be regenerated from the template by running # tools/buildgen/generate_projects.sh - + # Copyright 2015, Google Inc. # All rights reserved. # @@ -34,13 +34,10 @@ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + <%! - bad_header_names = ('time.h', 'string.h') def fix_header_name(name): split_name = name.split('/') - if split_name[-1] in bad_header_names: - split_name[-1] = 'grpc_' + split_name[-1] if split_name[0] == 'include': split_name = split_name[1:] return '/'.join(split_name) @@ -63,7 +60,7 @@ %> Pod::Spec.new do |s| s.name = 'gRPC' - version = '0.11.1' + version = '0.11.2' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'http://www.grpc.io' @@ -79,7 +76,7 @@ s.requires_arc = true objc_dir = 'src/objective-c' - + # Reactive Extensions library for iOS. s.subspec 'RxLibrary' do |ss| src_dir = "#{objc_dir}/RxLibrary" @@ -87,71 +84,47 @@ ss.private_header_files = "#{src_dir}/private/*.h" ss.header_mappings_dir = "#{objc_dir}" end - + # Core cross-platform gRPC library, written in C. s.subspec 'C-Core' do |ss| ss.source_files = ${(',\n' + 22*' ').join('\'%s\'' % f for f in grpc_files(libs))} - + ss.private_header_files = ${(',\n' + 30*' ').join('\'%s\'' % f for f in grpc_private_headers(libs))} - + ss.header_mappings_dir = '.' - + ss.requires_arc = false ss.libraries = 'z' ss.dependency 'OpenSSL', '~> 1.0.200' - + # ss.compiler_flags = '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w' end - - # This is a workaround for Cocoapods Issue #1437. - # It renames time.h and string.h to grpc_time.h and grpc_string.h. - # It needs to be here (top-level) instead of in the C-Core subspec because Cocoapods doesn't run + + # Move contents of include/ up a level to avoid manually specifying include paths. + # This needs to be here (top-level) instead of in the C-Core subspec because Cocoapods doesn't run # prepare_command's of subspecs. - # - # TODO(jcanizales): Try out others' solutions at Issue #1437. - s.prepare_command = <<-CMD - # Move contents of include up a level to avoid manually specifying include paths - cp -r "include/grpc" "." - - DIR_TIME="grpc/support" - BAD_TIME="$DIR_TIME/time.h" - GOOD_TIME="$DIR_TIME/grpc_time.h" - grep -rl "$BAD_TIME" grpc src/core src/objective-c/GRPCClient | xargs sed -i '' -e s@$BAD_TIME@$GOOD_TIME@g - if [ -f "$BAD_TIME" ]; - then - mv -f "$BAD_TIME" "$GOOD_TIME" - fi - - DIR_STRING="src/core/support" - BAD_STRING="$DIR_STRING/string.h" - GOOD_STRING="$DIR_STRING/grpc_string.h" - grep -rl "$BAD_STRING" grpc src/core src/objective-c/GRPCClient | xargs sed -i '' -e s@$BAD_STRING@$GOOD_STRING@g - if [ -f "$BAD_STRING" ]; - then - mv -f "$BAD_STRING" "$GOOD_STRING" - fi - CMD - + s.prepare_command = 'cp -r "include/grpc" "."' + # Objective-C wrapper around the core gRPC library. s.subspec 'GRPCClient' do |ss| src_dir = "#{objc_dir}/GRPCClient" ss.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}" ss.private_header_files = "#{src_dir}/private/*.h" ss.header_mappings_dir = "#{objc_dir}" - + ss.dependency 'gRPC/C-Core' ss.dependency 'gRPC/RxLibrary' - + # Certificates, to be able to establish TLS connections: ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] } end - + # RPC library for ProtocolBuffers, based on gRPC s.subspec 'ProtoRPC' do |ss| src_dir = "#{objc_dir}/ProtoRPC" ss.source_files = "#{src_dir}/*.{h,m}" ss.header_mappings_dir = "#{objc_dir}" - + ss.dependency 'gRPC/GRPCClient' ss.dependency 'gRPC/RxLibrary' ss.dependency 'Protobuf', '~> 3.0.0-alpha-4' From dc460d28c086a1a2d14036d76f3a94b74131b4bd Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Tue, 13 Oct 2015 13:04:54 -0700 Subject: [PATCH 11/14] Undo moving include/ one dir up, to ease testing workflow. --- gRPC.podspec | 75 ++++++++++++++++----------------- templates/gRPC.podspec.template | 21 +++------ 2 files changed, 42 insertions(+), 54 deletions(-) diff --git a/gRPC.podspec b/gRPC.podspec index a9d544d9263..c056d717c86 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -71,33 +71,33 @@ Pod::Spec.new do |s| 'src/core/support/string_win32.h', 'src/core/support/thd_internal.h', 'src/core/support/time_precise.h', - 'grpc/support/alloc.h', - 'grpc/support/atm.h', - 'grpc/support/atm_gcc_atomic.h', - 'grpc/support/atm_gcc_sync.h', - 'grpc/support/atm_win32.h', - 'grpc/support/cmdline.h', - 'grpc/support/cpu.h', - 'grpc/support/histogram.h', - 'grpc/support/host_port.h', - 'grpc/support/log.h', - 'grpc/support/log_win32.h', - 'grpc/support/port_platform.h', - 'grpc/support/slice.h', - 'grpc/support/slice_buffer.h', - 'grpc/support/string_util.h', - 'grpc/support/subprocess.h', - 'grpc/support/sync.h', - 'grpc/support/sync_generic.h', - 'grpc/support/sync_posix.h', - 'grpc/support/sync_win32.h', - 'grpc/support/thd.h', - 'grpc/support/time.h', - 'grpc/support/tls.h', - 'grpc/support/tls_gcc.h', - 'grpc/support/tls_msvc.h', - 'grpc/support/tls_pthread.h', - 'grpc/support/useful.h', + 'include/grpc/support/alloc.h', + 'include/grpc/support/atm.h', + 'include/grpc/support/atm_gcc_atomic.h', + 'include/grpc/support/atm_gcc_sync.h', + 'include/grpc/support/atm_win32.h', + 'include/grpc/support/cmdline.h', + 'include/grpc/support/cpu.h', + 'include/grpc/support/histogram.h', + 'include/grpc/support/host_port.h', + 'include/grpc/support/log.h', + 'include/grpc/support/log_win32.h', + 'include/grpc/support/port_platform.h', + 'include/grpc/support/slice.h', + 'include/grpc/support/slice_buffer.h', + 'include/grpc/support/string_util.h', + 'include/grpc/support/subprocess.h', + 'include/grpc/support/sync.h', + 'include/grpc/support/sync_generic.h', + 'include/grpc/support/sync_posix.h', + 'include/grpc/support/sync_win32.h', + 'include/grpc/support/thd.h', + 'include/grpc/support/time.h', + 'include/grpc/support/tls.h', + 'include/grpc/support/tls_gcc.h', + 'include/grpc/support/tls_msvc.h', + 'include/grpc/support/tls_pthread.h', + 'include/grpc/support/useful.h', 'src/core/support/alloc.c', 'src/core/support/cmdline.c', 'src/core/support/cpu_iphone.c', @@ -252,13 +252,13 @@ Pod::Spec.new do |s| 'src/core/census/aggregation.h', 'src/core/census/context.h', 'src/core/census/rpc_metric_id.h', - 'grpc/grpc_security.h', - 'grpc/byte_buffer.h', - 'grpc/byte_buffer_reader.h', - 'grpc/compression.h', - 'grpc/grpc.h', - 'grpc/status.h', - 'grpc/census.h', + 'include/grpc/grpc_security.h', + 'include/grpc/byte_buffer.h', + 'include/grpc/byte_buffer_reader.h', + 'include/grpc/compression.h', + 'include/grpc/grpc.h', + 'include/grpc/status.h', + 'include/grpc/census.h', 'src/core/httpcli/httpcli_security_connector.c', 'src/core/security/base64.c', 'src/core/security/client_auth_filter.c', @@ -528,6 +528,8 @@ Pod::Spec.new do |s| 'src/core/census/rpc_metric_id.h' ss.header_mappings_dir = '.' + ss.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC" ' + + '"$(PODS_ROOT)/Headers/Private/gRPC/include"' } ss.requires_arc = false ss.libraries = 'z' @@ -536,11 +538,6 @@ Pod::Spec.new do |s| # ss.compiler_flags = '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w' end - # Move contents of include/ up a level to avoid manually specifying include paths. - # This needs to be here (top-level) instead of in the C-Core subspec because Cocoapods doesn't run - # prepare_command's of subspecs. - s.prepare_command = 'cp -r "include/grpc" "."' - # Objective-C wrapper around the core gRPC library. s.subspec 'GRPCClient' do |ss| src_dir = "#{objc_dir}/GRPCClient" diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index c0887783e2c..e396c411a68 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -36,26 +36,20 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. <%! - def fix_header_name(name): - split_name = name.split('/') - if split_name[0] == 'include': - split_name = split_name[1:] - return '/'.join(split_name) - def grpc_files(libs): out = [] for lib in libs: if lib.name in ("grpc", "gpr"): - out.extend(fix_header_name(h) for h in lib.get('headers', [])) - out.extend(fix_header_name(h) for h in lib.get('public_headers', [])) - out.extend(lib.get('src', [])) + out += lib.get('headers', []) + out += lib.get('public_headers', []) + out += lib.get('src', []) return out; def grpc_private_headers(libs): out = [] for lib in libs: if lib.name in ("grpc", "gpr"): - out.extend(lib.get('headers', [])) + out += lib.get('headers', []) return out %> Pod::Spec.new do |s| @@ -92,6 +86,8 @@ ss.private_header_files = ${(',\n' + 30*' ').join('\'%s\'' % f for f in grpc_private_headers(libs))} ss.header_mappings_dir = '.' + ss.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC" ' + + '"$(PODS_ROOT)/Headers/Private/gRPC/include"' } ss.requires_arc = false ss.libraries = 'z' @@ -100,11 +96,6 @@ # ss.compiler_flags = '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w' end - # Move contents of include/ up a level to avoid manually specifying include paths. - # This needs to be here (top-level) instead of in the C-Core subspec because Cocoapods doesn't run - # prepare_command's of subspecs. - s.prepare_command = 'cp -r "include/grpc" "."' - # Objective-C wrapper around the core gRPC library. s.subspec 'GRPCClient' do |ss| src_dir = "#{objc_dir}/GRPCClient" From 208716639db8452fc728ed71dee3581a42e99927 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Tue, 13 Oct 2015 18:12:57 -0700 Subject: [PATCH 12/14] Ignore Objective-C generated files --- .gitignore | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6006619fcbc..7fa2157fa76 100644 --- a/.gitignore +++ b/.gitignore @@ -40,7 +40,7 @@ report.xml # port server log portlog.txt -# Xcode +# XCode build/ *.pbxuser !default.pbxuser @@ -58,3 +58,12 @@ DerivedData *.ipa *.xcuserstate *.DS_Store + +# Objective-C generated files +*.pbobjc.* +*.pbrpc.* + +# Cocoapods artifacts +# Podfile.lock and the workspace file are tracked, to ease deleting them. That's +# needed to trigger "pod install" to rerun the preinstall commands. +Pods/ From 2e516e4b0c635f973f7075df2cc0c61ad19ad422 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Tue, 13 Oct 2015 18:36:00 -0700 Subject: [PATCH 13/14] Refer to https://github.com/CocoaPods/CocoaPods/issues/4386 regarding hack. --- gRPC.podspec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gRPC.podspec b/gRPC.podspec index c056d717c86..1ee2198125f 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -528,6 +528,8 @@ Pod::Spec.new do |s| 'src/core/census/rpc_metric_id.h' ss.header_mappings_dir = '.' + # This isn't officially supported in Cocoapods. We've asked for an alternative: + # https://github.com/CocoaPods/CocoaPods/issues/4386 ss.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC" ' + '"$(PODS_ROOT)/Headers/Private/gRPC/include"' } From 2bac1f98f935d1358b5b1c84960b22701c0cffa1 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Tue, 13 Oct 2015 19:09:25 -0700 Subject: [PATCH 14/14] The Podspec is a template. The Podspec is a template. The Podspec is a template. --- templates/gRPC.podspec.template | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index e396c411a68..3b96fe28857 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -86,6 +86,8 @@ ss.private_header_files = ${(',\n' + 30*' ').join('\'%s\'' % f for f in grpc_private_headers(libs))} ss.header_mappings_dir = '.' + # This isn't officially supported in Cocoapods. We've asked for an alternative: + # https://github.com/CocoaPods/CocoaPods/issues/4386 ss.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC" ' + '"$(PODS_ROOT)/Headers/Private/gRPC/include"' }