1source 'https://github.com/CocoaPods/Specs.git' 2platform :ios, '8.0' 3 4install! 'cocoapods', :deterministic_uuids => false 5 6use_frameworks! if ENV['FRAMEWORKS'] == 'YES' 7 8# Location of gRPC's repo root relative to this file. 9GRPC_LOCAL_SRC = '../../../..' 10 11target 'Sample' do 12 # Depend on the generated RemoteTestClient library 13 pod 'RemoteTest', :path => "../RemoteTestClient" 14 15 # Use the local versions of Protobuf, BoringSSL, and gRPC. You don't need any of the following 16 # lines in your application. 17 pod '!ProtoCompiler', :path => "#{GRPC_LOCAL_SRC}/src/objective-c" 18 pod '!ProtoCompiler-gRPCPlugin', :path => "#{GRPC_LOCAL_SRC}/src/objective-c" 19 20 pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf" 21 22 pod 'BoringSSL-GRPC', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" 23 24 pod 'gRPC', :path => GRPC_LOCAL_SRC 25 pod 'gRPC-Core', :path => GRPC_LOCAL_SRC 26 pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC 27 pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC 28end 29 30# This pre_install hook is only needed to use the local version of gRPC-Core. You don't need it in 31# your application. 32pre_install do |installer| 33 # This is the gRPC-Core podspec object, as initialized by its podspec file. 34 grpc_core_spec = installer.pod_targets.find{|t| t.name == 'gRPC-Core'}.root_spec 35 36 # Copied from gRPC-Core.podspec, except for the adjusted src_root: 37 src_root = "$(PODS_ROOT)/../#{GRPC_LOCAL_SRC}" 38 grpc_core_spec.pod_target_xcconfig = { 39 'GRPC_SRC_ROOT' => src_root, 40 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"', 41 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"', 42 # If we don't set these two settings, `include/grpc/support/time.h` and 43 # `src/core/lib/gpr/string.h` shadow the system `<time.h>` and `<string.h>`, breaking the 44 # build. 45 'USE_HEADERMAP' => 'NO', 46 'ALWAYS_SEARCH_USER_PATHS' => 'NO', 47 } 48end 49