1install! 'cocoapods', :deterministic_uuids => false 2 3use_frameworks! if ENV['FRAMEWORKS'] != 'NO' 4 5ROOT_DIR = '../../../..' 6 7def grpc_deps 8 pod 'gRPC-ProtoRPC', :path => ROOT_DIR 9 pod 'gRPC', :path => ROOT_DIR 10 pod 'gRPC-Core', :path => ROOT_DIR 11 pod 'gRPC-RxLibrary', :path => ROOT_DIR 12 pod 'RemoteTest', :path => "../RemoteTestClient" 13 pod '!ProtoCompiler-gRPCPlugin', :path => "#{ROOT_DIR}/src/objective-c" 14 pod 'BoringSSL-GRPC', :podspec => "#{ROOT_DIR}/src/objective-c" 15 pod '!ProtoCompiler', :path => "#{ROOT_DIR}/src/objective-c" 16end 17 18target 'watchOS-sample' do 19platform :ios, '9.0' 20 grpc_deps 21end 22 23target 'watchOS-sample WatchKit Extension' do 24platform :watchos, '4.0' 25 grpc_deps 26end 27 28pre_install do |installer| 29 grpc_core_spec = installer.pod_targets.find{|t| t.name.start_with?('gRPC-Core')}.root_spec 30 31 src_root = "$(PODS_TARGET_SRCROOT)" 32 grpc_core_spec.pod_target_xcconfig = { 33 'GRPC_SRC_ROOT' => src_root, 34 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"', 35 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"', 36 # If we don't set these two settings, `include/grpc/support/time.h` and 37 # `src/core/lib/gpr/string.h` shadow the system `<time.h>` and `<string.h>`, breaking the 38 # build. 39 'USE_HEADERMAP' => 'NO', 40 'ALWAYS_SEARCH_USER_PATHS' => 'NO', 41 } 42end 43 44