Adapted to Bazel/Blaze's import/include convention

pull/19733/head
Tony Lu 5 years ago
parent 0beb353f0a
commit 4a4b37ef1c
  1. 70
      src/objective-c/examples/InterceptorSample/InterceptorSample.xcodeproj/project.pbxproj
  2. 4
      src/objective-c/examples/InterceptorSample/InterceptorSample/ViewController.m
  3. 17
      src/objective-c/examples/RemoteTestClient/RemoteTest.podspec
  4. 2
      src/objective-c/examples/RemoteTestClient/test.proto

@ -7,7 +7,6 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
1C4854A76EEB56F8096DBDEF /* libPods-InterceptorSample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CB7A7A5B91FC976FCF4637AE /* libPods-InterceptorSample.a */; };
5EE960FB2266768A0044A74F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EE960FA2266768A0044A74F /* AppDelegate.m */; }; 5EE960FB2266768A0044A74F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EE960FA2266768A0044A74F /* AppDelegate.m */; };
5EE960FE2266768A0044A74F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EE960FD2266768A0044A74F /* ViewController.m */; }; 5EE960FE2266768A0044A74F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EE960FD2266768A0044A74F /* ViewController.m */; };
5EE961012266768A0044A74F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5EE960FF2266768A0044A74F /* Main.storyboard */; }; 5EE961012266768A0044A74F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5EE960FF2266768A0044A74F /* Main.storyboard */; };
@ -15,10 +14,11 @@
5EE961062266768C0044A74F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5EE961042266768C0044A74F /* LaunchScreen.storyboard */; }; 5EE961062266768C0044A74F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5EE961042266768C0044A74F /* LaunchScreen.storyboard */; };
5EE961092266768C0044A74F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EE961082266768C0044A74F /* main.m */; }; 5EE961092266768C0044A74F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EE961082266768C0044A74F /* main.m */; };
5EE9611222668CF20044A74F /* CacheInterceptor.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EE9611122668CF20044A74F /* CacheInterceptor.m */; }; 5EE9611222668CF20044A74F /* CacheInterceptor.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EE9611122668CF20044A74F /* CacheInterceptor.m */; };
B39AA5EDA7B541C915C1D823 /* libPods-InterceptorSample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EE3A6DB9460D83EFDECDEF27 /* libPods-InterceptorSample.a */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
09457A264AAE5323BF50B1F8 /* Pods-InterceptorSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InterceptorSample.debug.xcconfig"; path = "Target Support Files/Pods-InterceptorSample/Pods-InterceptorSample.debug.xcconfig"; sourceTree = "<group>"; }; 53E7AEA20F8F0F23BFC5E85A /* Pods-InterceptorSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InterceptorSample.release.xcconfig"; path = "Target Support Files/Pods-InterceptorSample/Pods-InterceptorSample.release.xcconfig"; sourceTree = "<group>"; };
5EE960F62266768A0044A74F /* InterceptorSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InterceptorSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 5EE960F62266768A0044A74F /* InterceptorSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InterceptorSample.app; sourceTree = BUILT_PRODUCTS_DIR; };
5EE960FA2266768A0044A74F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; 5EE960FA2266768A0044A74F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
5EE960FC2266768A0044A74F /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; }; 5EE960FC2266768A0044A74F /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
@ -31,8 +31,8 @@
5EE9610F2266774C0044A74F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; 5EE9610F2266774C0044A74F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
5EE9611022668CE20044A74F /* CacheInterceptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CacheInterceptor.h; sourceTree = "<group>"; }; 5EE9611022668CE20044A74F /* CacheInterceptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CacheInterceptor.h; sourceTree = "<group>"; };
5EE9611122668CF20044A74F /* CacheInterceptor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CacheInterceptor.m; sourceTree = "<group>"; }; 5EE9611122668CF20044A74F /* CacheInterceptor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CacheInterceptor.m; sourceTree = "<group>"; };
A0789280A4035D0F22F96BE6 /* Pods-InterceptorSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InterceptorSample.release.xcconfig"; path = "Target Support Files/Pods-InterceptorSample/Pods-InterceptorSample.release.xcconfig"; sourceTree = "<group>"; }; 61819C78C7CC39640B0AF90B /* Pods-InterceptorSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InterceptorSample.debug.xcconfig"; path = "Target Support Files/Pods-InterceptorSample/Pods-InterceptorSample.debug.xcconfig"; sourceTree = "<group>"; };
CB7A7A5B91FC976FCF4637AE /* libPods-InterceptorSample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InterceptorSample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; EE3A6DB9460D83EFDECDEF27 /* libPods-InterceptorSample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InterceptorSample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -40,20 +40,28 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
1C4854A76EEB56F8096DBDEF /* libPods-InterceptorSample.a in Frameworks */, B39AA5EDA7B541C915C1D823 /* libPods-InterceptorSample.a in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */ /* Begin PBXGroup section */
5DBBA8A4C272D71DA0B942A2 /* Frameworks */ = {
isa = PBXGroup;
children = (
EE3A6DB9460D83EFDECDEF27 /* libPods-InterceptorSample.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
5EE960ED2266768A0044A74F = { 5EE960ED2266768A0044A74F = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
5EE960F82266768A0044A74F /* InterceptorSample */, 5EE960F82266768A0044A74F /* InterceptorSample */,
5EE960F72266768A0044A74F /* Products */, 5EE960F72266768A0044A74F /* Products */,
9D49DB75F3BEDAFDE7028B51 /* Pods */, 9D49DB75F3BEDAFDE7028B51 /* Pods */,
BD7184728351C7DDAFBA5FA2 /* Frameworks */, 5DBBA8A4C272D71DA0B942A2 /* Frameworks */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
}; };
@ -86,20 +94,12 @@
9D49DB75F3BEDAFDE7028B51 /* Pods */ = { 9D49DB75F3BEDAFDE7028B51 /* Pods */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
09457A264AAE5323BF50B1F8 /* Pods-InterceptorSample.debug.xcconfig */, 61819C78C7CC39640B0AF90B /* Pods-InterceptorSample.debug.xcconfig */,
A0789280A4035D0F22F96BE6 /* Pods-InterceptorSample.release.xcconfig */, 53E7AEA20F8F0F23BFC5E85A /* Pods-InterceptorSample.release.xcconfig */,
); );
path = Pods; path = Pods;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
BD7184728351C7DDAFBA5FA2 /* Frameworks */ = {
isa = PBXGroup;
children = (
CB7A7A5B91FC976FCF4637AE /* libPods-InterceptorSample.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXNativeTarget section */ /* Begin PBXNativeTarget section */
@ -107,11 +107,11 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 5EE9610C2266768C0044A74F /* Build configuration list for PBXNativeTarget "InterceptorSample" */; buildConfigurationList = 5EE9610C2266768C0044A74F /* Build configuration list for PBXNativeTarget "InterceptorSample" */;
buildPhases = ( buildPhases = (
7531607F028A04DAAF5E97B5 /* [CP] Check Pods Manifest.lock */, 6313E891EAC080560B6D470D /* [CP] Check Pods Manifest.lock */,
5EE960F22266768A0044A74F /* Sources */, 5EE960F22266768A0044A74F /* Sources */,
5EE960F32266768A0044A74F /* Frameworks */, 5EE960F32266768A0044A74F /* Frameworks */,
5EE960F42266768A0044A74F /* Resources */, 5EE960F42266768A0044A74F /* Resources */,
17700C95BAEBB27F7A3D1B01 /* [CP] Copy Pods Resources */, A3ABCCE79BCEB8687DE0D995 /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@ -168,43 +168,43 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
17700C95BAEBB27F7A3D1B01 /* [CP] Copy Pods Resources */ = { 6313E891EAC080560B6D470D /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputFileListPaths = ( inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-InterceptorSample/Pods-InterceptorSample-resources-${CONFIGURATION}-input-files.xcfilelist",
); );
name = "[CP] Copy Pods Resources"; inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = ( outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-InterceptorSample/Pods-InterceptorSample-resources-${CONFIGURATION}-output-files.xcfilelist", );
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-InterceptorSample-checkManifestLockResult.txt",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-InterceptorSample/Pods-InterceptorSample-resources.sh\"\n"; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
7531607F028A04DAAF5E97B5 /* [CP] Check Pods Manifest.lock */ = { A3ABCCE79BCEB8687DE0D995 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputFileListPaths = ( inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-InterceptorSample/Pods-InterceptorSample-resources-${CONFIGURATION}-input-files.xcfilelist",
); );
inputPaths = ( name = "[CP] Copy Pods Resources";
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = ( outputFileListPaths = (
); "${PODS_ROOT}/Target Support Files/Pods-InterceptorSample/Pods-InterceptorSample-resources-${CONFIGURATION}-output-files.xcfilelist",
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-InterceptorSample-checkManifestLockResult.txt",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-InterceptorSample/Pods-InterceptorSample-resources.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
@ -357,7 +357,7 @@
}; };
5EE9610D2266768C0044A74F /* Debug */ = { 5EE9610D2266768C0044A74F /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 09457A264AAE5323BF50B1F8 /* Pods-InterceptorSample.debug.xcconfig */; baseConfigurationReference = 61819C78C7CC39640B0AF90B /* Pods-InterceptorSample.debug.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
@ -374,7 +374,7 @@
}; };
5EE9610E2266768C0044A74F /* Release */ = { 5EE9610E2266768C0044A74F /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = A0789280A4035D0F22F96BE6 /* Pods-InterceptorSample.release.xcconfig */; baseConfigurationReference = 53E7AEA20F8F0F23BFC5E85A /* Pods-InterceptorSample.release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;

@ -19,8 +19,8 @@
#import "ViewController.h" #import "ViewController.h"
#import <GRPCClient/GRPCCall.h> #import <GRPCClient/GRPCCall.h>
#import <RemoteTest/Messages.pbobjc.h> #import "src/objective-c/examples/RemoteTestClient/Messages.pbobjc.h"
#import <RemoteTest/Test.pbrpc.h> #import "src/objective-c/examples/RemoteTestClient/Test.pbrpc.h"
#import "CacheInterceptor.h" #import "CacheInterceptor.h"

@ -14,31 +14,34 @@ Pod::Spec.new do |s|
s.dependency "!ProtoCompiler-gRPCPlugin" s.dependency "!ProtoCompiler-gRPCPlugin"
repo_root = '../../../..' repo_root = '../../../..'
bin_dir = "#{repo_root}/bins/$CONFIG" bin_dir = "bins/$CONFIG"
protoc = "#{bin_dir}/protobuf/protoc" protoc = "#{bin_dir}/protobuf/protoc"
well_known_types_dir = "#{repo_root}/third_party/protobuf/src" well_known_types_dir = "third_party/protobuf/src"
plugin = "#{bin_dir}/grpc_objective_c_plugin" plugin = "#{bin_dir}/grpc_objective_c_plugin"
out_dir = "src/objective-c/examples/RemoteTestClient"
s.prepare_command = <<-CMD s.prepare_command = <<-CMD
pushd #{repo_root}
#{protoc} \ #{protoc} \
--plugin=protoc-gen-grpc=#{plugin} \ --plugin=protoc-gen-grpc=#{plugin} \
--objc_out=. \ --objc_out=#{out_dir} \
--grpc_out=. \ --grpc_out=#{out_dir} \
-I . \ -I . \
-I #{well_known_types_dir} \ -I #{well_known_types_dir} \
*.proto #{out_dir}/*.proto
popd
CMD CMD
s.subspec 'Messages' do |ms| s.subspec 'Messages' do |ms|
ms.source_files = '*.pbobjc.{h,m}' ms.source_files = '**/*.pbobjc.{h,m}'
ms.header_mappings_dir = '.' ms.header_mappings_dir = '.'
ms.requires_arc = false ms.requires_arc = false
ms.dependency 'Protobuf' ms.dependency 'Protobuf'
end end
s.subspec 'Services' do |ss| s.subspec 'Services' do |ss|
ss.source_files = '*.pbrpc.{h,m}' ss.source_files = '**/*.pbrpc.{h,m}'
ss.header_mappings_dir = '.' ss.header_mappings_dir = '.'
ss.requires_arc = true ss.requires_arc = true
ss.dependency 'gRPC-ProtoRPC' ss.dependency 'gRPC-ProtoRPC'

@ -17,7 +17,7 @@
syntax = "proto3"; syntax = "proto3";
import "google/protobuf/empty.proto"; import "google/protobuf/empty.proto";
import "messages.proto"; import "src/objective-c/examples/RemoteTestClient/messages.proto";
package grpc.testing; package grpc.testing;

Loading…
Cancel
Save