blob: e1bb4ddfd5e49210cf8e59f22f2db0d42fdea21a [file] [log] [blame]
murgatroid9924754c02015-06-11 13:57:55 -07001source 'https://github.com/CocoaPods/Specs.git'
2platform :ios, '8.0'
3
Jorge Canizalesc09854b2016-07-01 10:24:17 -07004install! 'cocoapods', :deterministic_uuids => false
5
6# Location of gRPC's repo root relative to this file.
7GRPC_LOCAL_SRC = '../../..'
Jorge Canizalesdfe91b52015-10-11 13:51:07 -07008
murgatroid9924754c02015-06-11 13:57:55 -07009target 'HelloWorld' do
10 # Depend on the generated HelloWorld library.
11 pod 'HelloWorld', :path => '.'
Jorge Canizalesc09854b2016-07-01 10:24:17 -070012
13 # Use the local versions of Protobuf, BoringSSL, and gRPC. You don't need any of the following
14 # lines in your application.
15 pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf"
16
17 pod 'BoringSSL', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c"
18
19 pod 'gRPC', :path => GRPC_LOCAL_SRC
20 pod 'gRPC-Core', :path => GRPC_LOCAL_SRC
21 pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC
22 pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC
murgatroid9924754c02015-06-11 13:57:55 -070023end
Jorge Canizales0f213c32016-07-01 11:54:35 -070024
25# This pre_install hook is only needed to use the local version of gRPC-Core. You don't need it in
26# your application.
27pre_install do |installer|
28 # This is the gRPC-Core podspec object, as initialized by its podspec file.
29 grpc_core_spec = installer.pod_targets.find{|t| t.name == 'gRPC-Core'}.root_spec
30
31 # Copied from gRPC-Core.podspec, except for the adjusted src_root:
32 src_root = "$(PODS_ROOT)/../#{GRPC_LOCAL_SRC}"
33 grpc_core_spec.pod_target_xcconfig = {
34 'GRPC_SRC_ROOT' => src_root,
35 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"',
36 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"',
37 # If we don't set these two settings, `include/grpc/support/time.h` and
38 # `src/core/lib/support/string.h` shadow the system `<time.h>` and `<string.h>`, breaking the
39 # build.
40 'USE_HEADERMAP' => 'NO',
41 'ALWAYS_SEARCH_USER_PATHS' => 'NO',
42 }
43end