Skip to content

Commit

Permalink
Moved GRPCTypes into its own grpc_objc_library.
Browse files Browse the repository at this point in the history
  • Loading branch information
pbatg committed May 13, 2020
1 parent 28a0c0f commit 4918a51
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 9 deletions.
3 changes: 2 additions & 1 deletion gRPC.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ Pod::Spec.new do |s|
"src/objective-c/GRPCClient/GRPCCall+OAuth2.h",
"src/objective-c/GRPCClient/GRPCCall+Tests.h",
"src/objective-c/GRPCClient/GRPCCallLegacy.h",
"src/objective-c/GRPCClient/GRPCTypes.h"
"src/objective-c/GRPCClient/GRPCTypes.h",
"src/objective-c/GRPCClient/GRPCTypes.m"
ss.dependency "gRPC-RxLibrary/Interface", version

ss.ios.deployment_target = '7.0'
Expand Down
14 changes: 12 additions & 2 deletions src/objective-c/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,20 @@ grpc_objc_library(
"GRPCClient/GRPCCall+OAuth2.h",
"GRPCClient/GRPCCall+Tests.h",
"GRPCClient/GRPCCallLegacy.h",
"GRPCClient/GRPCTypes.h",
],
deps = [
"rx_library_headers",
":grpc_objc_interface_types",
":rx_library_headers",
],
)

grpc_objc_library(
name = "grpc_objc_interface_types",
srcs = [
"GRPCClient/GRPCTypes.m",
],
hdrs = [
"GRPCClient/GRPCTypes.h",
],
)

Expand Down
5 changes: 0 additions & 5 deletions src/objective-c/GRPCClient/GRPCCall.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
#import "GRPCTransport.h"
#import "private/GRPCTransport+Private.h"

NSString *const kGRPCHeadersKey = @"io.grpc.HeadersKey";
NSString *const kGRPCTrailersKey = @"io.grpc.TrailersKey";

NSString *const kGRPCErrorDomain = @"io.grpc";

/**
* The response dispatcher creates its own serial dispatch queue and target the queue to the
* dispatch queue of a user provided response handler. It removes the requirement of having to use
Expand Down
2 changes: 2 additions & 0 deletions src/objective-c/GRPCClient/GRPCTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
*/

#import <Foundation/Foundation.h>

/**
* gRPC error codes.
* Note that a few of these are never produced by the gRPC libraries, but are of
Expand Down
24 changes: 24 additions & 0 deletions src/objective-c/GRPCClient/GRPCTypes.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
*
* Copyright 2015 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

#import "GRPCTypes.h"

NSString *const kGRPCHeadersKey = @"io.grpc.HeadersKey";
NSString *const kGRPCTrailersKey = @"io.grpc.TrailersKey";

NSString *const kGRPCErrorDomain = @"io.grpc";
3 changes: 2 additions & 1 deletion templates/gRPC.podspec.template
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
"src/objective-c/GRPCClient/GRPCCall+OAuth2.h",
"src/objective-c/GRPCClient/GRPCCall+Tests.h",
"src/objective-c/GRPCClient/GRPCCallLegacy.h",
"src/objective-c/GRPCClient/GRPCTypes.h"
"src/objective-c/GRPCClient/GRPCTypes.h",
"src/objective-c/GRPCClient/GRPCTypes.m"
ss.dependency "gRPC-RxLibrary/Interface", version

ss.ios.deployment_target = '7.0'
Expand Down

0 comments on commit 4918a51

Please sign in to comment.