murgatroid99 | 24754c0 | 2015-06-11 13:57:55 -0700 | [diff] [blame] | 1 | source 'https://github.com/CocoaPods/Specs.git' |
| 2 | platform :ios, '8.0' |
| 3 | |
Jorge Canizales | c09854b | 2016-07-01 10:24:17 -0700 | [diff] [blame] | 4 | install! 'cocoapods', :deterministic_uuids => false |
| 5 | |
| 6 | # Location of gRPC's repo root relative to this file. |
| 7 | GRPC_LOCAL_SRC = '../../..' |
Jorge Canizales | dfe91b5 | 2015-10-11 13:51:07 -0700 | [diff] [blame] | 8 | |
murgatroid99 | 24754c0 | 2015-06-11 13:57:55 -0700 | [diff] [blame] | 9 | target 'HelloWorld' do |
| 10 | # Depend on the generated HelloWorld library. |
| 11 | pod 'HelloWorld', :path => '.' |
Jorge Canizales | c09854b | 2016-07-01 10:24:17 -0700 | [diff] [blame] | 12 | |
| 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 |
murgatroid99 | 24754c0 | 2015-06-11 13:57:55 -0700 | [diff] [blame] | 23 | end |
Jorge Canizales | 0f213c3 | 2016-07-01 11:54:35 -0700 | [diff] [blame^] | 24 | |
| 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. |
| 27 | pre_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 | } |
| 43 | end |