Skip to content

Commit

Permalink
Merge pull request grpc#19787 from Tony1023/tv/watchOS
Browse files Browse the repository at this point in the history
Added experimental tvOS and watchOS support
  • Loading branch information
muxi authored Aug 7, 2019
2 parents 0646739 + 08795cd commit 3ffa07c
Show file tree
Hide file tree
Showing 53 changed files with 2,914 additions and 45 deletions.
3 changes: 2 additions & 1 deletion gRPC-Core.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9'
s.tvos.deployment_target = '10.0'

s.watchos.deployment_target = '4.0'

s.requires_arc = false

name = 'grpc'
Expand Down
1 change: 1 addition & 0 deletions gRPC-ProtoRPC.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '4.0'

name = 'ProtoRPC'
s.module_name = name
Expand Down
1 change: 1 addition & 0 deletions gRPC-RxLibrary.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '4.0'

name = 'RxLibrary'
s.module_name = name
Expand Down
1 change: 1 addition & 0 deletions gRPC.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '4.0'

name = 'GRPCClient'
s.module_name = name
Expand Down
1 change: 1 addition & 0 deletions src/objective-c/!ProtoCompiler-gRPCPlugin.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '4.0'
# Restrict the gRPC runtime version to the one supported by this plugin.
s.dependency 'gRPC-ProtoRPC', v

Expand Down
1 change: 1 addition & 0 deletions src/objective-c/!ProtoCompiler.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.9'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '4.0'

# This is only for local development of protoc: If the Podfile brings this pod from a local
# directory using `:path`, CocoaPods won't download the zip file and so the compiler won't be
Expand Down
1 change: 1 addition & 0 deletions src/objective-c/BoringSSL-GRPC.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '7.0'
s.osx.deployment_target = '10.7'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '4.0'

name = 'openssl_grpc'

Expand Down
2 changes: 2 additions & 0 deletions src/objective-c/examples/RemoteTestClient/RemoteTest.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Pod::Spec.new do |s|

s.ios.deployment_target = '7.1'
s.osx.deployment_target = '10.9'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '4.0'

# Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients.
s.dependency "!ProtoCompiler-gRPCPlugin"
Expand Down
33 changes: 33 additions & 0 deletions src/objective-c/examples/tvOS-sample/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
platform :tvos, '10.0'

install! 'cocoapods', :deterministic_uuids => false

use_frameworks! if ENV['FRAMEWORKS'] != 'NO'

ROOT_DIR = '../../../..'

target 'tvOS-sample' do
pod 'gRPC-ProtoRPC', :path => ROOT_DIR
pod 'gRPC', :path => ROOT_DIR
pod 'gRPC-Core', :path => ROOT_DIR
pod 'gRPC-RxLibrary', :path => ROOT_DIR
pod 'RemoteTest', :path => "../RemoteTestClient"
pod '!ProtoCompiler-gRPCPlugin', :path => "#{ROOT_DIR}/src/objective-c"
end

pre_install do |installer|
grpc_core_spec = installer.pod_targets.find{|t| t.name.start_with?('gRPC-Core')}.root_spec

src_root = "$(PODS_TARGET_SRCROOT)"
grpc_core_spec.pod_target_xcconfig = {
'GRPC_SRC_ROOT' => src_root,
'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"',
'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"',
# If we don't set these two settings, `include/grpc/support/time.h` and
# `src/core/lib/gpr/string.h` shadow the system `<time.h>` and `<string.h>`, breaking the
# build.
'USE_HEADERMAP' => 'NO',
'ALWAYS_SEARCH_USER_PATHS' => 'NO',
}
end

Loading

0 comments on commit 3ffa07c

Please sign in to comment.