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