aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/objective_c_generator.cc63
-rw-r--r--src/compiler/objective_c_generator.h9
-rw-r--r--src/compiler/objective_c_generator_helpers.h12
-rw-r--r--src/compiler/objective_c_plugin.cc4
-rw-r--r--src/csharp/buildall.bat2
-rw-r--r--src/objective-c/examples/Sample/Podfile8
-rw-r--r--src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj185
-rw-r--r--src/objective-c/examples/Sample/Sample/AppDelegate.h3
-rw-r--r--src/objective-c/examples/Sample/Sample/AppDelegate.m8
-rw-r--r--src/objective-c/examples/Sample/Sample/Base.lproj/LaunchScreen.xib41
-rw-r--r--src/objective-c/examples/Sample/Sample/Base.lproj/Main.storyboard38
-rw-r--r--src/objective-c/examples/Sample/Sample/Info.plist2
-rw-r--r--src/objective-c/examples/Sample/Sample/ViewController.m3
-rw-r--r--src/objective-c/examples/Sample/SampleTests/Info.plist24
-rw-r--r--src/objective-c/generated_libraries/RemoteTestClient/Empty.pbobjc.h (renamed from src/objective-c/examples/Sample/RemoteTestClient/Empty.pbobjc.h)0
-rw-r--r--src/objective-c/generated_libraries/RemoteTestClient/Empty.pbobjc.m (renamed from src/objective-c/examples/Sample/RemoteTestClient/Empty.pbobjc.m)0
-rw-r--r--src/objective-c/generated_libraries/RemoteTestClient/Messages.pbobjc.h (renamed from src/objective-c/examples/Sample/RemoteTestClient/Messages.pbobjc.h)0
-rw-r--r--src/objective-c/generated_libraries/RemoteTestClient/Messages.pbobjc.m (renamed from src/objective-c/examples/Sample/RemoteTestClient/Messages.pbobjc.m)0
-rw-r--r--src/objective-c/generated_libraries/RemoteTestClient/RemoteTest.podspec (renamed from src/objective-c/examples/Sample/RemoteTestClient/RemoteTest.podspec)0
-rw-r--r--src/objective-c/generated_libraries/RemoteTestClient/Test.pbobjc.h (renamed from src/objective-c/examples/Sample/RemoteTestClient/Test.pbobjc.h)0
-rw-r--r--src/objective-c/generated_libraries/RemoteTestClient/Test.pbobjc.m (renamed from src/objective-c/examples/Sample/RemoteTestClient/Test.pbobjc.m)0
-rw-r--r--src/objective-c/generated_libraries/RemoteTestClient/Test.pbrpc.h (renamed from src/objective-c/examples/Sample/RemoteTestClient/Test.pbrpc.h)0
-rw-r--r--src/objective-c/generated_libraries/RemoteTestClient/Test.pbrpc.m (renamed from src/objective-c/examples/Sample/RemoteTestClient/Test.pbrpc.m)0
-rw-r--r--src/objective-c/generated_libraries/RemoteTestClient/empty.proto (renamed from src/objective-c/examples/Sample/RemoteTestClient/empty.proto)0
-rw-r--r--src/objective-c/generated_libraries/RemoteTestClient/messages.proto (renamed from src/objective-c/examples/Sample/RemoteTestClient/messages.proto)0
-rw-r--r--src/objective-c/generated_libraries/RemoteTestClient/test.proto (renamed from src/objective-c/examples/Sample/RemoteTestClient/test.proto)0
-rw-r--r--src/objective-c/generated_libraries/RouteGuideClient/RouteGuide.pbobjc.h (renamed from src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.h)0
-rw-r--r--src/objective-c/generated_libraries/RouteGuideClient/RouteGuide.pbobjc.m (renamed from src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.m)0
-rw-r--r--src/objective-c/generated_libraries/RouteGuideClient/RouteGuide.pbrpc.h (renamed from src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.h)0
-rw-r--r--src/objective-c/generated_libraries/RouteGuideClient/RouteGuide.pbrpc.m (renamed from src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.m)0
-rw-r--r--src/objective-c/generated_libraries/RouteGuideClient/Route_guide.podspec (renamed from src/objective-c/examples/Sample/RouteGuideClient/Route_guide.podspec)0
-rw-r--r--src/objective-c/generated_libraries/RouteGuideClient/route_guide.proto (renamed from src/objective-c/examples/Sample/RouteGuideClient/route_guide.proto)0
-rw-r--r--src/objective-c/tests/GRPCClientTests.m (renamed from src/objective-c/examples/Sample/SampleTests/RemoteTests.m)7
-rw-r--r--src/objective-c/tests/InteropTests.m (renamed from src/objective-c/examples/Sample/SampleTests/RemoteProtoTests.m)14
-rw-r--r--src/objective-c/tests/LocalClearTextTests.m (renamed from src/objective-c/examples/Sample/SampleTests/SampleTests.m)11
-rw-r--r--src/objective-c/tests/Podfile5
-rw-r--r--src/objective-c/tests/Tests.xcodeproj/project.pbxproj12
37 files changed, 122 insertions, 329 deletions
diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc
index 1bf0254f5b..b235911479 100644
--- a/src/compiler/objective_c_generator.cc
+++ b/src/compiler/objective_c_generator.cc
@@ -32,19 +32,20 @@
*/
#include <map>
+#include <sstream>
+#include "src/compiler/config.h"
#include "src/compiler/objective_c_generator.h"
#include "src/compiler/objective_c_generator_helpers.h"
-#include "src/compiler/config.h"
-
-#include <sstream>
+#include <google/protobuf/compiler/objectivec/objectivec_helpers.h>
+using ::google::protobuf::compiler::objectivec::ClassName;
using ::grpc::protobuf::io::Printer;
using ::grpc::protobuf::MethodDescriptor;
using ::grpc::protobuf::ServiceDescriptor;
-using ::std::map;
using ::grpc::string;
+using ::std::map;
namespace grpc_objective_c_generator {
namespace {
@@ -69,7 +70,7 @@ void PrintMethodSignature(Printer *printer,
if (method->client_streaming()) {
printer->Print("RequestsWriter:(id<GRXWriter>)request");
} else {
- printer->Print(vars, "Request:($prefix$$request_type$ *)request");
+ printer->Print(vars, "Request:($request_class$ *)request");
}
// TODO(jcanizales): Put this on a new line and align colons.
@@ -78,8 +79,7 @@ void PrintMethodSignature(Printer *printer,
if (method->server_streaming()) {
printer->Print("BOOL done, ");
}
- printer->Print(vars,
- "$prefix$$response_type$ *response, NSError *error))handler");
+ printer->Print(vars, "$response_class$ *response, NSError *error))handler");
}
void PrintSimpleSignature(Printer *printer,
@@ -99,12 +99,17 @@ void PrintAdvancedSignature(Printer *printer,
PrintMethodSignature(printer, method, vars);
}
+inline map<string, string> GetMethodVars(const MethodDescriptor *method) {
+ return {{ "method_name", method->name() },
+ { "request_type", method->input_type()->name() },
+ { "response_type", method->output_type()->name() },
+ { "request_class", ClassName(method->input_type()) },
+ { "response_class", ClassName(method->output_type()) }};
+}
+
void PrintMethodDeclarations(Printer *printer,
- const MethodDescriptor *method,
- map<string, string> vars) {
- vars["method_name"] = method->name();
- vars["request_type"] = method->input_type()->name();
- vars["response_type"] = method->output_type()->name();
+ const MethodDescriptor *method) {
+ map<string, string> vars = GetMethodVars(method);
PrintProtoRpcDeclarationAsPragma(printer, method, vars);
@@ -141,8 +146,7 @@ void PrintAdvancedImplementation(Printer *printer,
printer->Print("[GRXWriter writerWithValue:request]\n");
}
- printer->Print(vars,
- " responseClass:[$prefix$$response_type$ class]\n");
+ printer->Print(vars, " responseClass:[$response_class$ class]\n");
printer->Print(" responsesWriteable:[GRXWriteable ");
if (method->server_streaming()) {
@@ -155,11 +159,8 @@ void PrintAdvancedImplementation(Printer *printer,
}
void PrintMethodImplementations(Printer *printer,
- const MethodDescriptor *method,
- map<string, string> vars) {
- vars["method_name"] = method->name();
- vars["request_type"] = method->input_type()->name();
- vars["response_type"] = method->output_type()->name();
+ const MethodDescriptor *method) {
+ map<string, string> vars = GetMethodVars(method);
PrintProtoRpcDeclarationAsPragma(printer, method, vars);
@@ -174,7 +175,7 @@ void PrintMethodImplementations(Printer *printer,
} // namespace
-string GetHeader(const ServiceDescriptor *service, const string prefix) {
+string GetHeader(const ServiceDescriptor *service) {
string output;
{
// Scope the output stream so it closes and finalizes output to the string.
@@ -184,19 +185,19 @@ string GetHeader(const ServiceDescriptor *service, const string prefix) {
printer.Print("@protocol GRXWriteable;\n");
printer.Print("@protocol GRXWriter;\n\n");
- map<string, string> vars = {{"service_name", service->name()},
- {"prefix", prefix}};
- printer.Print(vars, "@protocol $prefix$$service_name$ <NSObject>\n\n");
+ map<string, string> vars = {{"service_class", ServiceClassName(service)}};
+
+ printer.Print(vars, "@protocol $service_class$ <NSObject>\n\n");
for (int i = 0; i < service->method_count(); i++) {
- PrintMethodDeclarations(&printer, service->method(i), vars);
+ PrintMethodDeclarations(&printer, service->method(i));
}
printer.Print("@end\n\n");
printer.Print("// Basic service implementation, over gRPC, that only does"
" marshalling and parsing.\n");
- printer.Print(vars, "@interface $prefix$$service_name$ :"
- " ProtoService<$prefix$$service_name$>\n");
+ printer.Print(vars, "@interface $service_class$ :"
+ " ProtoService<$service_class$>\n");
printer.Print("- (instancetype)initWithHost:(NSString *)host"
" NS_DESIGNATED_INITIALIZER;\n");
printer.Print("@end\n");
@@ -204,7 +205,7 @@ string GetHeader(const ServiceDescriptor *service, const string prefix) {
return output;
}
-string GetSource(const ServiceDescriptor *service, const string prefix) {
+string GetSource(const ServiceDescriptor *service) {
string output;
{
// Scope the output stream so it closes and finalizes output to the string.
@@ -212,15 +213,15 @@ string GetSource(const ServiceDescriptor *service, const string prefix) {
Printer printer(&output_stream, '$');
map<string, string> vars = {{"service_name", service->name()},
- {"package", service->file()->package()},
- {"prefix", prefix}};
+ {"service_class", ServiceClassName(service)},
+ {"package", service->file()->package()}};
printer.Print(vars,
"static NSString *const kPackageName = @\"$package$\";\n");
printer.Print(vars,
"static NSString *const kServiceName = @\"$service_name$\";\n\n");
- printer.Print(vars, "@implementation $prefix$$service_name$\n\n");
+ printer.Print(vars, "@implementation $service_class$\n\n");
printer.Print("// Designated initializer\n");
printer.Print("- (instancetype)initWithHost:(NSString *)host {\n");
@@ -236,7 +237,7 @@ string GetSource(const ServiceDescriptor *service, const string prefix) {
printer.Print("}\n\n\n");
for (int i = 0; i < service->method_count(); i++) {
- PrintMethodImplementations(&printer, service->method(i), vars);
+ PrintMethodImplementations(&printer, service->method(i));
}
printer.Print("@end\n");
diff --git a/src/compiler/objective_c_generator.h b/src/compiler/objective_c_generator.h
index 548e96fcf1..40a0c87f99 100644
--- a/src/compiler/objective_c_generator.h
+++ b/src/compiler/objective_c_generator.h
@@ -38,15 +38,16 @@
namespace grpc_objective_c_generator {
+using ::grpc::protobuf::ServiceDescriptor;
+using ::grpc::string;
+
// Returns the content to be included in the "global_scope" insertion point of
// the generated header file.
-grpc::string GetHeader(const grpc::protobuf::ServiceDescriptor *service,
- const grpc::string prefix);
+string GetHeader(const ServiceDescriptor *service);
// Returns the content to be included in the "global_scope" insertion point of
// the generated implementation file.
-grpc::string GetSource(const grpc::protobuf::ServiceDescriptor *service,
- const grpc::string prefix);
+string GetSource(const ServiceDescriptor *service);
} // namespace grpc_objective_c_generator
diff --git a/src/compiler/objective_c_generator_helpers.h b/src/compiler/objective_c_generator_helpers.h
index d92a2b5e9a..1f8c80014f 100644
--- a/src/compiler/objective_c_generator_helpers.h
+++ b/src/compiler/objective_c_generator_helpers.h
@@ -40,9 +40,19 @@
namespace grpc_objective_c_generator {
-inline grpc::string MessageHeaderName(const grpc::protobuf::FileDescriptor *file) {
+using ::grpc::protobuf::FileDescriptor;
+using ::grpc::protobuf::ServiceDescriptor;
+using ::grpc::string;
+
+inline string MessageHeaderName(const FileDescriptor *file) {
return grpc_generator::FileNameInUpperCamel(file) + ".pbobjc.h";
}
+inline string ServiceClassName(const ServiceDescriptor *service) {
+ const FileDescriptor *file = service->file();
+ string prefix = file->options().objc_class_prefix();
+ return prefix + service->name();
+}
+
}
#endif // GRPC_INTERNAL_COMPILER_OBJECTIVE_C_GENERATOR_HELPERS_H
diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc
index 3cb170e95c..b5ac2bafa9 100644
--- a/src/compiler/objective_c_plugin.cc
+++ b/src/compiler/objective_c_plugin.cc
@@ -77,7 +77,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
string declarations;
for (int i = 0; i < file->service_count(); i++) {
const grpc::protobuf::ServiceDescriptor *service = file->service(i);
- declarations += grpc_objective_c_generator::GetHeader(service, prefix);
+ declarations += grpc_objective_c_generator::GetHeader(service);
}
Write(context, file_name + ".pbrpc.h",
@@ -95,7 +95,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
string definitions;
for (int i = 0; i < file->service_count(); i++) {
const grpc::protobuf::ServiceDescriptor *service = file->service(i);
- definitions += grpc_objective_c_generator::GetSource(service, prefix);
+ definitions += grpc_objective_c_generator::GetSource(service);
}
Write(context, file_name + ".pbrpc.m", imports + '\n' + definitions);
diff --git a/src/csharp/buildall.bat b/src/csharp/buildall.bat
index 34ad923307..68c61ef039 100644
--- a/src/csharp/buildall.bat
+++ b/src/csharp/buildall.bat
@@ -5,7 +5,7 @@ setlocal
@call "%VS120COMNTOOLS%\..\..\vc\vcvarsall.bat" x86
@rem Build the C# native extension
-msbuild ..\..\vsprojects\grpc.sln /t:grpc_csharp_ext || goto :error
+msbuild ..\..\vsprojects\grpc.sln /t:grpc_csharp_ext /p:PlatformToolset=v120 || goto :error
msbuild Grpc.sln /p:Configuration=Debug || goto :error
msbuild Grpc.sln /p:Configuration=Release || goto :error
diff --git a/src/objective-c/examples/Sample/Podfile b/src/objective-c/examples/Sample/Podfile
index e8b78647ac..f3c49c12a1 100644
--- a/src/objective-c/examples/Sample/Podfile
+++ b/src/objective-c/examples/Sample/Podfile
@@ -3,13 +3,7 @@ platform :ios, '8.0'
pod 'gRPC', :path => "../../../.."
pod 'Protobuf', :git => 'https://github.com/google/protobuf.git'
-pod 'Route_guide', :path => "RouteGuideClient"
-pod 'RemoteTest', :path => "RemoteTestClient"
-
-link_with 'Sample', 'SampleTests'
+pod 'RemoteTest', :path => "../../generated_libraries/RemoteTestClient"
target 'Sample' do
end
-
-target 'SampleTests' do
-end
diff --git a/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj b/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj
index 17c2255b5a..611eb6032d 100644
--- a/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj
+++ b/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj
@@ -7,33 +7,16 @@
objects = {
/* Begin PBXBuildFile section */
- 60BBBBB15823BBF7639D7AA9 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DC7B7C4C0410F43B9621631 /* libPods.a */; };
- 6340F0491AE66E3300FB6A3D /* RemoteProtoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6340F0481AE66E3300FB6A3D /* RemoteProtoTests.m */; };
- 6356D1DE1AC11FE00075FBBC /* RemoteTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6356D1DD1AC11FE00075FBBC /* RemoteTests.m */; };
6369A2701A9322E20015FC5C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6369A26F1A9322E20015FC5C /* main.m */; };
6369A2731A9322E20015FC5C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6369A2721A9322E20015FC5C /* AppDelegate.m */; };
6369A2761A9322E20015FC5C /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6369A2751A9322E20015FC5C /* ViewController.m */; };
6369A2791A9322E20015FC5C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6369A2771A9322E20015FC5C /* Main.storyboard */; };
6369A27B1A9322E20015FC5C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6369A27A1A9322E20015FC5C /* Images.xcassets */; };
- 6369A27E1A9322E20015FC5C /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6369A27C1A9322E20015FC5C /* LaunchScreen.xib */; };
- 6369A28A1A9322E20015FC5C /* SampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6369A2891A9322E20015FC5C /* SampleTests.m */; };
FC81FE63CA655031F3524EC0 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DC7B7C4C0410F43B9621631 /* libPods.a */; };
/* End PBXBuildFile section */
-/* Begin PBXContainerItemProxy section */
- 6369A2841A9322E20015FC5C /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 6369A2621A9322E20015FC5C /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 6369A2691A9322E20015FC5C;
- remoteInfo = Sample;
- };
-/* End PBXContainerItemProxy section */
-
/* Begin PBXFileReference section */
2DC7B7C4C0410F43B9621631 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
- 6340F0481AE66E3300FB6A3D /* RemoteProtoTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RemoteProtoTests.m; sourceTree = "<group>"; };
- 6356D1DD1AC11FE00075FBBC /* RemoteTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RemoteTests.m; sourceTree = "<group>"; };
6369A26A1A9322E20015FC5C /* Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sample.app; sourceTree = BUILT_PRODUCTS_DIR; };
6369A26E1A9322E20015FC5C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6369A26F1A9322E20015FC5C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
@@ -43,10 +26,6 @@
6369A2751A9322E20015FC5C /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
6369A2781A9322E20015FC5C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
6369A27A1A9322E20015FC5C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
- 6369A27D1A9322E20015FC5C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
- 6369A2831A9322E20015FC5C /* SampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
- 6369A2881A9322E20015FC5C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
- 6369A2891A9322E20015FC5C /* SampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SampleTests.m; sourceTree = "<group>"; };
AC29DD6FCDF962F519FEBB0D /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
C68330F8D451CC6ACEABA09F /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -60,14 +39,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- 6369A2801A9322E20015FC5C /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 60BBBBB15823BBF7639D7AA9 /* libPods.a in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
@@ -75,7 +46,6 @@
isa = PBXGroup;
children = (
6369A26C1A9322E20015FC5C /* Sample */,
- 6369A2861A9322E20015FC5C /* SampleTests */,
6369A26B1A9322E20015FC5C /* Products */,
AB3331C9AE6488E61B2B094E /* Pods */,
C4C2C5219053E079C9EFB930 /* Frameworks */,
@@ -86,7 +56,6 @@
isa = PBXGroup;
children = (
6369A26A1A9322E20015FC5C /* Sample.app */,
- 6369A2831A9322E20015FC5C /* SampleTests.xctest */,
);
name = Products;
sourceTree = "<group>";
@@ -100,7 +69,6 @@
6369A2751A9322E20015FC5C /* ViewController.m */,
6369A2771A9322E20015FC5C /* Main.storyboard */,
6369A27A1A9322E20015FC5C /* Images.xcassets */,
- 6369A27C1A9322E20015FC5C /* LaunchScreen.xib */,
6369A26D1A9322E20015FC5C /* Supporting Files */,
);
path = Sample;
@@ -115,25 +83,6 @@
name = "Supporting Files";
sourceTree = "<group>";
};
- 6369A2861A9322E20015FC5C /* SampleTests */ = {
- isa = PBXGroup;
- children = (
- 6340F0481AE66E3300FB6A3D /* RemoteProtoTests.m */,
- 6369A2891A9322E20015FC5C /* SampleTests.m */,
- 6369A2871A9322E20015FC5C /* Supporting Files */,
- 6356D1DD1AC11FE00075FBBC /* RemoteTests.m */,
- );
- path = SampleTests;
- sourceTree = "<group>";
- };
- 6369A2871A9322E20015FC5C /* Supporting Files */ = {
- isa = PBXGroup;
- children = (
- 6369A2881A9322E20015FC5C /* Info.plist */,
- );
- name = "Supporting Files";
- sourceTree = "<group>";
- };
AB3331C9AE6488E61B2B094E /* Pods */ = {
isa = PBXGroup;
children = (
@@ -173,26 +122,6 @@
productReference = 6369A26A1A9322E20015FC5C /* Sample.app */;
productType = "com.apple.product-type.application";
};
- 6369A2821A9322E20015FC5C /* SampleTests */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 6369A2901A9322E20015FC5C /* Build configuration list for PBXNativeTarget "SampleTests" */;
- buildPhases = (
- 75C393B2FDC60A22B2121058 /* Check Pods Manifest.lock */,
- 6369A27F1A9322E20015FC5C /* Sources */,
- 6369A2801A9322E20015FC5C /* Frameworks */,
- 6369A2811A9322E20015FC5C /* Resources */,
- 7B8CDC152F76D6014A96C798 /* Copy Pods Resources */,
- );
- buildRules = (
- );
- dependencies = (
- 6369A2851A9322E20015FC5C /* PBXTargetDependency */,
- );
- name = SampleTests;
- productName = SampleTests;
- productReference = 6369A2831A9322E20015FC5C /* SampleTests.xctest */;
- productType = "com.apple.product-type.bundle.unit-test";
- };
/* End PBXNativeTarget section */
/* Begin PBXProject section */
@@ -205,10 +134,6 @@
6369A2691A9322E20015FC5C = {
CreatedOnToolsVersion = 6.1.1;
};
- 6369A2821A9322E20015FC5C = {
- CreatedOnToolsVersion = 6.1.1;
- TestTargetID = 6369A2691A9322E20015FC5C;
- };
};
};
buildConfigurationList = 6369A2651A9322E20015FC5C /* Build configuration list for PBXProject "Sample" */;
@@ -225,7 +150,6 @@
projectRoot = "";
targets = (
6369A2691A9322E20015FC5C /* Sample */,
- 6369A2821A9322E20015FC5C /* SampleTests */,
);
};
/* End PBXProject section */
@@ -236,18 +160,10 @@
buildActionMask = 2147483647;
files = (
6369A2791A9322E20015FC5C /* Main.storyboard in Resources */,
- 6369A27E1A9322E20015FC5C /* LaunchScreen.xib in Resources */,
6369A27B1A9322E20015FC5C /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
- 6369A2811A9322E20015FC5C /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
@@ -281,36 +197,6 @@
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;
};
- 75C393B2FDC60A22B2121058 /* Check Pods Manifest.lock */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Check Pods Manifest.lock";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- 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;
- };
- 7B8CDC152F76D6014A96C798 /* Copy Pods Resources */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Copy Pods Resources";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
- showEnvVarsInLog = 0;
- };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -324,26 +210,8 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- 6369A27F1A9322E20015FC5C /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 6369A28A1A9322E20015FC5C /* SampleTests.m in Sources */,
- 6340F0491AE66E3300FB6A3D /* RemoteProtoTests.m in Sources */,
- 6356D1DE1AC11FE00075FBBC /* RemoteTests.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
/* End PBXSourcesBuildPhase section */
-/* Begin PBXTargetDependency section */
- 6369A2851A9322E20015FC5C /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 6369A2691A9322E20015FC5C /* Sample */;
- targetProxy = 6369A2841A9322E20015FC5C /* PBXContainerItemProxy */;
- };
-/* End PBXTargetDependency section */
-
/* Begin PBXVariantGroup section */
6369A2771A9322E20015FC5C /* Main.storyboard */ = {
isa = PBXVariantGroup;
@@ -353,14 +221,6 @@
name = Main.storyboard;
sourceTree = "<group>";
};
- 6369A27C1A9322E20015FC5C /* LaunchScreen.xib */ = {
- isa = PBXVariantGroup;
- children = (
- 6369A27D1A9322E20015FC5C /* Base */,
- );
- name = LaunchScreen.xib;
- sourceTree = "<group>";
- };
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
@@ -464,42 +324,6 @@
};
name = Release;
};
- 6369A2911A9322E20015FC5C /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = AC29DD6FCDF962F519FEBB0D /* Pods.debug.xcconfig */;
- buildSettings = {
- BUNDLE_LOADER = "$(TEST_HOST)";
- FRAMEWORK_SEARCH_PATHS = (
- "$(SDKROOT)/Developer/Library/Frameworks",
- "$(inherited)",
- );
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- INFOPLIST_FILE = SampleTests/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- PRODUCT_NAME = "$(TARGET_NAME)";
- TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Sample.app/Sample";
- };
- name = Debug;
- };
- 6369A2921A9322E20015FC5C /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = C68330F8D451CC6ACEABA09F /* Pods.release.xcconfig */;
- buildSettings = {
- BUNDLE_LOADER = "$(TEST_HOST)";
- FRAMEWORK_SEARCH_PATHS = (
- "$(SDKROOT)/Developer/Library/Frameworks",
- "$(inherited)",
- );
- INFOPLIST_FILE = SampleTests/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- PRODUCT_NAME = "$(TARGET_NAME)";
- TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Sample.app/Sample";
- };
- name = Release;
- };
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@@ -521,15 +345,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- 6369A2901A9322E20015FC5C /* Build configuration list for PBXNativeTarget "SampleTests" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 6369A2911A9322E20015FC5C /* Debug */,
- 6369A2921A9322E20015FC5C /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
/* End XCConfigurationList section */
};
rootObject = 6369A2621A9322E20015FC5C /* Project object */;
diff --git a/src/objective-c/examples/Sample/Sample/AppDelegate.h b/src/objective-c/examples/Sample/Sample/AppDelegate.h
index b1857f28e0..102e7f3ade 100644
--- a/src/objective-c/examples/Sample/Sample/AppDelegate.h
+++ b/src/objective-c/examples/Sample/Sample/AppDelegate.h
@@ -34,8 +34,5 @@
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
-
@property (strong, nonatomic) UIWindow *window;
-
@end
-
diff --git a/src/objective-c/examples/Sample/Sample/AppDelegate.m b/src/objective-c/examples/Sample/Sample/AppDelegate.m
index 12e1ad9d67..a38e36651e 100644
--- a/src/objective-c/examples/Sample/Sample/AppDelegate.m
+++ b/src/objective-c/examples/Sample/Sample/AppDelegate.m
@@ -33,13 +33,5 @@
#import "AppDelegate.h"
-@interface AppDelegate ()
-@end
-
@implementation AppDelegate
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- return YES;
-}
-
@end
diff --git a/src/objective-c/examples/Sample/Sample/Base.lproj/LaunchScreen.xib b/src/objective-c/examples/Sample/Sample/Base.lproj/LaunchScreen.xib
deleted file mode 100644
index c51a8e199e..0000000000
--- a/src/objective-c/examples/Sample/Sample/Base.lproj/LaunchScreen.xib
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
- <dependencies>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
- <capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
- </dependencies>
- <objects>
- <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
- <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
- <view contentMode="scaleToFill" id="iN0-l3-epB">
- <rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <subviews>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 gRPC. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
- <rect key="frame" x="20" y="439" width="441" height="21"/>
- <fontDescription key="fontDescription" type="system" pointSize="17"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- </label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Sample" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
- <rect key="frame" x="20" y="140" width="441" height="43"/>
- <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
- <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
- <nil key="highlightedColor"/>
- </label>
- </subviews>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
- <constraints>
- <constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
- <constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
- <constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
- <constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
- <constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
- <constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
- </constraints>
- <nil key="simulatedStatusBarMetrics"/>
- <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
- <point key="canvasLocation" x="548" y="455"/>
- </view>
- </objects>
-</document>
diff --git a/src/objective-c/examples/Sample/Sample/Base.lproj/Main.storyboard b/src/objective-c/examples/Sample/Sample/Base.lproj/Main.storyboard
index f56d2f3bb5..8887b9e19f 100644
--- a/src/objective-c/examples/Sample/Sample/Base.lproj/Main.storyboard
+++ b/src/objective-c/examples/Sample/Sample/Base.lproj/Main.storyboard
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7702" systemVersion="14D131" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
+ <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
- <viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
+ <viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
@@ -15,7 +16,38 @@
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <subviews>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BWr-eN-L3y">
+ <rect key="frame" x="16" y="20" width="568" height="150"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="385" id="exg-IV-Kl0"/>
+ </constraints>
+ <string key="text">Sample app launch finished.
+Check ViewController.m for the gRPC calls made, and the logs of this app for their results.
+(You may need to make XCode's Debug Area visible).</string>
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ <variation key="default">
+ <mask key="constraints">
+ <exclude reference="exg-IV-Kl0"/>
+ </mask>
+ </variation>
+ </label>
+ </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ <constraints>
+ <constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="BWr-eN-L3y" secondAttribute="bottom" constant="430" id="KFC-7p-hRl"/>
+ <constraint firstAttribute="trailing" secondItem="BWr-eN-L3y" secondAttribute="trailing" constant="16" id="M9C-nN-tFv"/>
+ <constraint firstItem="BWr-eN-L3y" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" id="SaP-0S-2LK"/>
+ <constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="BWr-eN-L3y" secondAttribute="bottom" id="wjC-O4-kJg"/>
+ <constraint firstItem="BWr-eN-L3y" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" id="ygF-6t-hrg"/>
+ </constraints>
+ <variation key="default">
+ <mask key="constraints">
+ <exclude reference="KFC-7p-hRl"/>
+ </mask>
+ </variation>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
diff --git a/src/objective-c/examples/Sample/Sample/Info.plist b/src/objective-c/examples/Sample/Sample/Info.plist
index ffdc8b3012..4436635ab4 100644
--- a/src/objective-c/examples/Sample/Sample/Info.plist
+++ b/src/objective-c/examples/Sample/Sample/Info.plist
@@ -23,7 +23,7 @@
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
- <string>LaunchScreen</string>
+ <string>Main</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
diff --git a/src/objective-c/examples/Sample/Sample/ViewController.m b/src/objective-c/examples/Sample/Sample/ViewController.m
index 9b331fe43f..0011a4508d 100644
--- a/src/objective-c/examples/Sample/Sample/ViewController.m
+++ b/src/objective-c/examples/Sample/Sample/ViewController.m
@@ -40,9 +40,6 @@
#import <RemoteTest/Messages.pbobjc.h>
#import <RemoteTest/Test.pbrpc.h>
-@interface ViewController ()
-@end
-
@implementation ViewController
- (void)viewDidLoad {
diff --git a/src/objective-c/examples/Sample/SampleTests/Info.plist b/src/objective-c/examples/Sample/SampleTests/Info.plist
deleted file mode 100644
index f547b0b707..0000000000
--- a/src/objective-c/examples/Sample/SampleTests/Info.plist
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>en</string>
- <key>CFBundleExecutable</key>
- <string>$(EXECUTABLE_NAME)</string>
- <key>CFBundleIdentifier</key>
- <string>org.grpc.$(PRODUCT_NAME:rfc1034identifier)</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>$(PRODUCT_NAME)</string>
- <key>CFBundlePackageType</key>
- <string>BNDL</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1</string>
-</dict>
-</plist>
diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Empty.pbobjc.h b/src/objective-c/generated_libraries/RemoteTestClient/Empty.pbobjc.h
index 809d0dde6e..809d0dde6e 100644
--- a/src/objective-c/examples/Sample/RemoteTestClient/Empty.pbobjc.h
+++ b/src/objective-c/generated_libraries/RemoteTestClient/Empty.pbobjc.h
diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Empty.pbobjc.m b/src/objective-c/generated_libraries/RemoteTestClient/Empty.pbobjc.m
index 46d481af66..46d481af66 100644
--- a/src/objective-c/examples/Sample/RemoteTestClient/Empty.pbobjc.m
+++ b/src/objective-c/generated_libraries/RemoteTestClient/Empty.pbobjc.m
diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Messages.pbobjc.h b/src/objective-c/generated_libraries/RemoteTestClient/Messages.pbobjc.h
index 5f32314175..5f32314175 100644
--- a/src/objective-c/examples/Sample/RemoteTestClient/Messages.pbobjc.h
+++ b/src/objective-c/generated_libraries/RemoteTestClient/Messages.pbobjc.h
diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Messages.pbobjc.m b/src/objective-c/generated_libraries/RemoteTestClient/Messages.pbobjc.m
index 98eb1dc87c..98eb1dc87c 100644
--- a/src/objective-c/examples/Sample/RemoteTestClient/Messages.pbobjc.m
+++ b/src/objective-c/generated_libraries/RemoteTestClient/Messages.pbobjc.m
diff --git a/src/objective-c/examples/Sample/RemoteTestClient/RemoteTest.podspec b/src/objective-c/generated_libraries/RemoteTestClient/RemoteTest.podspec
index 36c2b509e8..36c2b509e8 100644
--- a/src/objective-c/examples/Sample/RemoteTestClient/RemoteTest.podspec
+++ b/src/objective-c/generated_libraries/RemoteTestClient/RemoteTest.podspec
diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Test.pbobjc.h b/src/objective-c/generated_libraries/RemoteTestClient/Test.pbobjc.h
index aaa0b6ce2d..aaa0b6ce2d 100644
--- a/src/objective-c/examples/Sample/RemoteTestClient/Test.pbobjc.h
+++ b/src/objective-c/generated_libraries/RemoteTestClient/Test.pbobjc.h
diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Test.pbobjc.m b/src/objective-c/generated_libraries/RemoteTestClient/Test.pbobjc.m
index 08562b828a..08562b828a 100644
--- a/src/objective-c/examples/Sample/RemoteTestClient/Test.pbobjc.m
+++ b/src/objective-c/generated_libraries/RemoteTestClient/Test.pbobjc.m
diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Test.pbrpc.h b/src/objective-c/generated_libraries/RemoteTestClient/Test.pbrpc.h
index f799c4fc92..f799c4fc92 100644
--- a/src/objective-c/examples/Sample/RemoteTestClient/Test.pbrpc.h
+++ b/src/objective-c/generated_libraries/RemoteTestClient/Test.pbrpc.h
diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Test.pbrpc.m b/src/objective-c/generated_libraries/RemoteTestClient/Test.pbrpc.m
index faba07769e..faba07769e 100644
--- a/src/objective-c/examples/Sample/RemoteTestClient/Test.pbrpc.m
+++ b/src/objective-c/generated_libraries/RemoteTestClient/Test.pbrpc.m
diff --git a/src/objective-c/examples/Sample/RemoteTestClient/empty.proto b/src/objective-c/generated_libraries/RemoteTestClient/empty.proto
index a678048289..a678048289 100644
--- a/src/objective-c/examples/Sample/RemoteTestClient/empty.proto
+++ b/src/objective-c/generated_libraries/RemoteTestClient/empty.proto
diff --git a/src/objective-c/examples/Sample/RemoteTestClient/messages.proto b/src/objective-c/generated_libraries/RemoteTestClient/messages.proto
index 85d93c2ff9..85d93c2ff9 100644
--- a/src/objective-c/examples/Sample/RemoteTestClient/messages.proto
+++ b/src/objective-c/generated_libraries/RemoteTestClient/messages.proto
diff --git a/src/objective-c/examples/Sample/RemoteTestClient/test.proto b/src/objective-c/generated_libraries/RemoteTestClient/test.proto
index 2f5a5489b3..2f5a5489b3 100644
--- a/src/objective-c/examples/Sample/RemoteTestClient/test.proto
+++ b/src/objective-c/generated_libraries/RemoteTestClient/test.proto
diff --git a/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.h b/src/objective-c/generated_libraries/RouteGuideClient/RouteGuide.pbobjc.h
index 6efaec7f02..6efaec7f02 100644
--- a/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.h
+++ b/src/objective-c/generated_libraries/RouteGuideClient/RouteGuide.pbobjc.h
diff --git a/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.m b/src/objective-c/generated_libraries/RouteGuideClient/RouteGuide.pbobjc.m
index 16f291a61c..16f291a61c 100644
--- a/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbobjc.m
+++ b/src/objective-c/generated_libraries/RouteGuideClient/RouteGuide.pbobjc.m
diff --git a/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.h b/src/objective-c/generated_libraries/RouteGuideClient/RouteGuide.pbrpc.h
index 9e60865d98..9e60865d98 100644
--- a/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.h
+++ b/src/objective-c/generated_libraries/RouteGuideClient/RouteGuide.pbrpc.h
diff --git a/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.m b/src/objective-c/generated_libraries/RouteGuideClient/RouteGuide.pbrpc.m
index 2ca3dc6768..2ca3dc6768 100644
--- a/src/objective-c/examples/Sample/RouteGuideClient/RouteGuide.pbrpc.m
+++ b/src/objective-c/generated_libraries/RouteGuideClient/RouteGuide.pbrpc.m
diff --git a/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.podspec b/src/objective-c/generated_libraries/RouteGuideClient/Route_guide.podspec
index 5b1a68aad5..5b1a68aad5 100644
--- a/src/objective-c/examples/Sample/RouteGuideClient/Route_guide.podspec
+++ b/src/objective-c/generated_libraries/RouteGuideClient/Route_guide.podspec
diff --git a/src/objective-c/examples/Sample/RouteGuideClient/route_guide.proto b/src/objective-c/generated_libraries/RouteGuideClient/route_guide.proto
index 16dce26a2b..16dce26a2b 100644
--- a/src/objective-c/examples/Sample/RouteGuideClient/route_guide.proto
+++ b/src/objective-c/generated_libraries/RouteGuideClient/route_guide.proto
diff --git a/src/objective-c/examples/Sample/SampleTests/RemoteTests.m b/src/objective-c/tests/GRPCClientTests.m
index ceb72cfaec..713ea2848a 100644
--- a/src/objective-c/examples/Sample/SampleTests/RemoteTests.m
+++ b/src/objective-c/tests/GRPCClientTests.m
@@ -40,10 +40,13 @@
#import <gRPC/GRXWriteable.h>
#import <RemoteTest/Messages.pbobjc.h>
-@interface RemoteTests : XCTestCase
+// These are a few tests similar to InteropTests, but which use the generic gRPC client (GRPCCall)
+// rather than a generated proto library on top of it.
+
+@interface GRPCClientTests : XCTestCase
@end
-@implementation RemoteTests
+@implementation GRPCClientTests
- (void)testConnectionToRemoteServer {
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"Server reachable."];
diff --git a/src/objective-c/examples/Sample/SampleTests/RemoteProtoTests.m b/src/objective-c/tests/InteropTests.m
index 8e0e11d23d..0a512c17dc 100644
--- a/src/objective-c/examples/Sample/SampleTests/RemoteProtoTests.m
+++ b/src/objective-c/tests/InteropTests.m
@@ -76,10 +76,10 @@
}
@end
-@interface RemoteProtoTests : XCTestCase
+@interface InteropTests : XCTestCase
@end
-@implementation RemoteProtoTests {
+@implementation InteropTests {
RMTTestService *_service;
}
@@ -192,7 +192,7 @@
[expectation fulfill];
}
}];
-
+
[self waitForExpectationsWithTimeout:4 handler:nil];
}
@@ -230,7 +230,7 @@
[requestsBuffer writesFinishedWithError:nil];
}
}
-
+
if (done) {
XCTAssertEqual(index, 4, @"Received %i responses instead of 4.", index);
[expectation fulfill];
@@ -283,9 +283,9 @@
[requestsBuffer writeValue:request];
__block ProtoRPC *call = [_service RPCToFullDuplexCallWithRequestsWriter:requestsBuffer
- handler:^(BOOL done,
- RMTStreamingOutputCallResponse *response,
- NSError *error) {
+ handler:^(BOOL done,
+ RMTStreamingOutputCallResponse *response,
+ NSError *error) {
if (receivedResponse) {
XCTAssert(done, @"Unexpected extra response %@", response);
XCTAssertEqual(error.code, GRPC_STATUS_CANCELLED);
diff --git a/src/objective-c/examples/Sample/SampleTests/SampleTests.m b/src/objective-c/tests/LocalClearTextTests.m
index 83cfd8c1b5..6a9496b623 100644
--- a/src/objective-c/examples/Sample/SampleTests/SampleTests.m
+++ b/src/objective-c/tests/LocalClearTextTests.m
@@ -41,13 +41,14 @@
#import <Route_guide/RouteGuide.pbobjc.h>
#import <Route_guide/RouteGuide.pbrpc.h>
-@interface SampleTests : XCTestCase
+// These tests require the gRPC-Java "RouteGuide" sample server to be running locally. To do so,
+// install Gradle by following the instructions here: https://docs.gradle.org/current/userguide/installation.html
+// And use it to run the server by following the instructions here: https://github.com/grpc/grpc-java/tree/master/examples
+
+@interface LocalClearTextTests : XCTestCase
@end
-// These tests require the gRPC-Java "RouteGuide" sample server to be running locally. Install the
-// gRPC-Java library following the instructions here: https://github.com/grpc/grpc-java And run the
-// server by following the instructions here: https://github.com/grpc/grpc-java/tree/master/examples
-@implementation SampleTests
+@implementation LocalClearTextTests
- (void)testConnectionToLocalServer {
__weak XCTestExpectation *expectation = [self expectationWithDescription:@"Server reachable."];
diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile
index 6df063a380..c099fb5182 100644
--- a/src/objective-c/tests/Podfile
+++ b/src/objective-c/tests/Podfile
@@ -1,7 +1,10 @@
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
-pod 'gRPC/RxLibrary', :path => "../../.."
+pod 'gRPC', :path => "../../.."
+pod 'Protobuf', :git => 'https://github.com/google/protobuf.git'
+pod 'RemoteTest', :path => "../generated_libraries/RemoteTestClient"
+pod 'Route_guide', :path => "../generated_libraries/RouteGuideClient"
link_with 'AllTests'
diff --git a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj
index 80059b7cbe..34be705db2 100644
--- a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj
+++ b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj
@@ -7,9 +7,12 @@
objects = {
/* Begin PBXBuildFile section */
+ 6312AE4E1B1BF49B00341DEE /* GRPCClientTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6312AE4D1B1BF49B00341DEE /* GRPCClientTests.m */; };
+ 63175DFF1B1B9FAF00027841 /* LocalClearTextTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 63175DFE1B1B9FAF00027841 /* LocalClearTextTests.m */; };
63423F4A1B150A5F006CF63C /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; };
63423F511B151B77006CF63C /* RxLibraryUnitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 63423F501B151B77006CF63C /* RxLibraryUnitTests.m */; };
635697CD1B14FC11007A7283 /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635697CC1B14FC11007A7283 /* Tests.m */; };
+ 635ED2EC1B1A3BC400FDE5C3 /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */; };
7D8A186224D39101F90230F6 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 35F2B6BF3BAE8F0DC4AFD76E /* libPods.a */; };
/* End PBXBuildFile section */
@@ -38,11 +41,14 @@
/* Begin PBXFileReference section */
0A4F89D9C90E9C30990218F0 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
35F2B6BF3BAE8F0DC4AFD76E /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 6312AE4D1B1BF49B00341DEE /* GRPCClientTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRPCClientTests.m; sourceTree = "<group>"; };
+ 63175DFE1B1B9FAF00027841 /* LocalClearTextTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocalClearTextTests.m; sourceTree = "<group>"; };
63423F441B150A5F006CF63C /* AllTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AllTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
63423F501B151B77006CF63C /* RxLibraryUnitTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RxLibraryUnitTests.m; sourceTree = "<group>"; };
635697C71B14FC11007A7283 /* libTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTests.a; sourceTree = BUILT_PRODUCTS_DIR; };
635697CC1B14FC11007A7283 /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; };
635697D81B14FC11007A7283 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteropTests.m; sourceTree = "<group>"; };
FF7B5489BCFE40111D768DD0 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -105,6 +111,9 @@
635697C91B14FC11007A7283 /* Tests */ = {
isa = PBXGroup;
children = (
+ 6312AE4D1B1BF49B00341DEE /* GRPCClientTests.m */,
+ 63175DFE1B1B9FAF00027841 /* LocalClearTextTests.m */,
+ 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */,
63423F501B151B77006CF63C /* RxLibraryUnitTests.m */,
635697CC1B14FC11007A7283 /* Tests.m */,
635697D71B14FC11007A7283 /* Supporting Files */,
@@ -243,7 +252,10 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 63175DFF1B1B9FAF00027841 /* LocalClearTextTests.m in Sources */,
63423F511B151B77006CF63C /* RxLibraryUnitTests.m in Sources */,
+ 6312AE4E1B1BF49B00341DEE /* GRPCClientTests.m in Sources */,
+ 635ED2EC1B1A3BC400FDE5C3 /* InteropTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};